From 3933194da34fbc945af0122eb58db715dc025c76 Mon Sep 17 00:00:00 2001 From: zhanghongqing Date: Mon, 6 Dec 2021 14:38:52 +0800 Subject: [PATCH] 21.12 update --- TSG发布版本更新记录/TSG-21.12/docker/jdk.yml | 42 +++++++++++++ .../TSG-21.12/druid/traffic_app_stat_log.json | 61 +++++++++++++++++++ .../TSG-21.12/hbase/update-hbase.txt | 3 + .../TSG-21.12/hbase/update-phoenix.txt | 11 ++++ 4 files changed, 117 insertions(+) create mode 100644 TSG发布版本更新记录/TSG-21.12/docker/jdk.yml create mode 100644 TSG发布版本更新记录/TSG-21.12/druid/traffic_app_stat_log.json create mode 100644 TSG发布版本更新记录/TSG-21.12/hbase/update-hbase.txt create mode 100644 TSG发布版本更新记录/TSG-21.12/hbase/update-phoenix.txt diff --git a/TSG发布版本更新记录/TSG-21.12/docker/jdk.yml b/TSG发布版本更新记录/TSG-21.12/docker/jdk.yml new file mode 100644 index 0000000..3061dd2 --- /dev/null +++ b/TSG发布版本更新记录/TSG-21.12/docker/jdk.yml @@ -0,0 +1,42 @@ +#1.指定基础镜像,并且必须是第一条指令 +#FROM alpine:latest +FROM alpine:3.15.0 + +#2.指明该镜像的作者和其电子邮件 +MAINTAINER galaxy + +#3.在构建镜像时,指定镜像的工作目录,之后的命令都是基于此工作目录,如果不存在,则会创建目录 +WORKDIR /opt/jdk1.8.0_73 + +#4.将一些安装包复制到镜像中,语法:ADD/COPY ... +## ADD与COPY的区别:ADD复制并解压,COPY仅复制 +## 注意~~~上传的瘦身后的jre +COPY jdk1.8.0_73 /opt/jdk1.8.0_73 +## glibc安装包如果从网络下载速度实在是太慢了,先提前下载复制到镜像中 +#COPY glibc-2.29-r0.apk /opt/jdk/ +#COPY glibc-bin-2.29-r0.apk /opt/jdk/ +#COPY glibc-i18n-2.29-r0.apk /opt/jdk/ + +#5.更新Alpine的软件源为阿里云,因为从默认官源拉取实在太慢了 +#RUN echo http://mirrors.aliyun.com/alpine/v3.10/main/ > /etc/apk/repositories && \ +# echo http://mirrors.aliyun.com/alpine/v3.10/community/ >> /etc/apk/repositories +#RUN apk update && apk upgrade + +#6.运行指定的命令 +## Alpine linux为了精简本身并没有安装太多的常用软件,apk类似于ubuntu的apt-get, +## 用来安装一些常用软V件,其语法如下:apk add bash wget curl git make vim docker +## wget是linux下的ftp/http传输工具,没安装会报错“/bin/sh:   wget: not found”,网上例子少安装wget +## ca-certificates证书服务,是安装glibc前置依赖 +RUN apk --no-cache add ca-certificates wget \ + && wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub \ + && apk add glibc-2.29-r0.apk glibc-bin-2.29-r0.apk glibc-i18n-2.29-r0.apk \ + && rm -rf /var/cache/apk/* glibc-2.29-r0.apk glibc-bin-2.29-r0.apk glibc-i18n-2.29-r0.apk + +#7.配置环境变量 +## 注意~~~没有jdk啦,直接指向jre +ENV JAVA_HOME=/opt/jdk1.8.0_73 +ENV PATH=$JAVA_HOME/bin:$PATH +ENV CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar + +#容器启动时需要执行的命令 +#CMD ["java","-version"] \ No newline at end of file diff --git a/TSG发布版本更新记录/TSG-21.12/druid/traffic_app_stat_log.json b/TSG发布版本更新记录/TSG-21.12/druid/traffic_app_stat_log.json new file mode 100644 index 0000000..df52f6b --- /dev/null +++ b/TSG发布版本更新记录/TSG-21.12/druid/traffic_app_stat_log.json @@ -0,0 +1,61 @@ +{ + "type": "kafka", + "dataSchema": { + "dataSource": "traffic_app_stat_log", + "parser": { + "type": "string", + "parseSpec": { + "format": "json", + "timestampSpec": { + "column": "stat_time", + "format": "posix" + }, + "dimensionsSpec": { + "dimensions": [ + "app_name" + ] + } + } + }, + "metricsSpec" : [ + { "type" : "longSum", "name" : "session_num","fieldName" : "session_num"}, + { "type" : "longSum", "name" : "c2s_pkt_num", "fieldName" : "c2s_pkt_num" }, + { "type" : "longSum", "name" : "s2c_pkt_num", "fieldName" : "s2c_pkt_num" }, + { "type" : "longSum", "name" : "c2s_byte_num", "fieldName" : "c2s_byte_num" }, + { "type" : "longSum", "name" : "s2c_byte_num", "fieldName" : "s2c_byte_num" } + ], + "granularitySpec": { + "type": "uniform", + "segmentGranularity": "DAY", + "queryGranularity": {"type": "period", "period": "PT5M", "timeZone": "Asia/Hong_Kong"}, + "rollup": true + }, + "transformSpec" :{ + "transforms":[ + ], + "filter": { + "type": "not", + "field":{ "type": "selector", "dimension": "app_name", "value": "" } + } + } + }, + "tuningConfig": { + "type": "kafka", + "resetOffsetAutomatically": true, + "reportParseExceptions": false + }, + "ioConfig": { + "topic": "TRAFFIC-APP-STAT", + "taskCount": 1, + "replicas": 1, + "taskDuration": "PT1H", + "completionTimeout": "PT30M", + "earlyMessageRejectionPeriod": "PT6H", + "consumerProperties": { + "bootstrap.servers": "192.168.44.12:9094", + "sasl.mechanism": "PLAIN", + "security.protocol": "SASL_PLAINTEXT", + "sasl.jaas.config": "org.apache.kafka.common.security.scram.ScramLoginModule required username=\"admin\" password=\"galaxy2019\";" + } + } +} diff --git a/TSG发布版本更新记录/TSG-21.12/hbase/update-hbase.txt b/TSG发布版本更新记录/TSG-21.12/hbase/update-hbase.txt new file mode 100644 index 0000000..91db508 --- /dev/null +++ b/TSG发布版本更新记录/TSG-21.12/hbase/update-hbase.txt @@ -0,0 +1,3 @@ +-- hbase新增表 + +create 'tsg_galaxy:recommendation_app_cip', {NAME => 'common', VERSIONS => 1} \ No newline at end of file diff --git a/TSG发布版本更新记录/TSG-21.12/hbase/update-phoenix.txt b/TSG发布版本更新记录/TSG-21.12/hbase/update-phoenix.txt new file mode 100644 index 0000000..7144a6f --- /dev/null +++ b/TSG发布版本更新记录/TSG-21.12/hbase/update-phoenix.txt @@ -0,0 +1,11 @@ +-- phoenix 新增字段: + +alter view "tsg_galaxy"."relation_account_framedip" add "radius"."acct_status_type" UNSIGNED_INT; + + +-- Phoenix新增表 +CREATE view "tsg_galaxy"."recommendation_app_cip"( +ROWKEY VARCHAR PRIMARY KEY, +"common"."app_label" VARCHAR, +"common"."client_ip_list" VARCHAR, +"common"."last_update_time" UNSIGNED_LONG); \ No newline at end of file