diff options
| author | wanglihui <[email protected]> | 2021-08-11 18:37:43 +0800 |
|---|---|---|
| committer | wanglihui <[email protected]> | 2021-08-11 18:37:43 +0800 |
| commit | 6d0b774b4a2ddb8a40dfe6f6c968b6e0fbedf0c4 (patch) | |
| tree | 229543d2dcc41a12774ecb6b0e426a48b02aab0b | |
| parent | 4409401eda6da8b93f87aae99684e8de538b034e (diff) | |
修复配置文件中文乱码
修复maven打包jdk环境异常bug
| -rw-r--r-- | pom.xml | 152 | ||||
| -rw-r--r-- | src/main/resources/common.properties | 68 |
2 files changed, 142 insertions, 78 deletions
@@ -19,23 +19,50 @@ </repositories> <build> - <plugins> + <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-shade-plugin</artifactId> - <version>2.4.2</version> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.8.0</version> <configuration> - <createDependencyReducedPom>false</createDependencyReducedPom> + <source>1.8</source> + <target>1.8</target> + <!-- The semantics of this option are reversed, see MCOMPILER-209. --> + <useIncrementalCompilation>false</useIncrementalCompilation> + <compilerArgs> + <!-- Prevents recompilation due to missing package-info.class, see MCOMPILER-205 --> + <arg>-Xpkginfo:always</arg> + </compilerArgs> </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-shade-plugin</artifactId> <executions> <execution> + <id>storm-dos-detection</id> <phase>package</phase> <goals> <goal>shade</goal> </goals> + <configuration> + <finalName>storm-dos-detection</finalName> + <filters> + <filter> + <!-- Do not copy the signatures in the META-INF folder. + Otherwise, this might cause SecurityExceptions when using the JAR. --> + <artifact>*:*</artifact> + <excludes> + <exclude>META-INF</exclude> + <exclude>META-INF/*.SF</exclude> + <exclude>META-INF/*.DSA</exclude> + <exclude>META-INF/*.RSA</exclude> + </excludes> + </filter> + </filters> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> @@ -47,48 +74,77 @@ </executions> </plugin> - <plugin> - <groupId>io.github.zlika</groupId> - <artifactId>reproducible-build-maven-plugin</artifactId> - <version>0.2</version> - <executions> - <execution> - <goals> - <goal>strip-jar</goal> - </goals> - <phase>package</phase> - </execution> - </executions> - </plugin> + </plugins> + <!--<plugins>--> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>2.3.2</version> - <configuration> - <source>1.8</source> - <target>1.8</target> - </configuration> - </plugin> + <!--<plugin>--> + <!--<groupId>org.apache.maven.plugins</groupId>--> + <!--<artifactId>maven-shade-plugin</artifactId>--> + <!--<version>2.4.2</version>--> + <!--<configuration>--> + <!--<createDependencyReducedPom>false</createDependencyReducedPom>--> + <!--</configuration>--> - </plugins> + <!--<executions>--> + <!--<execution>--> + <!--<phase>package</phase>--> + <!--<goals>--> + <!--<goal>shade</goal>--> + <!--</goals>--> + <!--<configuration>--> + <!--<transformers>--> + <!--<transformer--> + <!--implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">--> + <!--<mainClass>com.zdjizhi.topology.LogFlowWriteTopology</mainClass>--> + <!--</transformer>--> + <!--</transformers>--> + <!--</configuration>--> + <!--</execution>--> + <!--</executions>--> + <!--</plugin>--> + + <!--<plugin>--> + <!--<groupId>io.github.zlika</groupId>--> + <!--<artifactId>reproducible-build-maven-plugin</artifactId>--> + <!--<version>0.2</version>--> + <!--<executions>--> + <!--<execution>--> + <!--<goals>--> + <!--<goal>strip-jar</goal>--> + <!--</goals>--> + <!--<phase>package</phase>--> + <!--</execution>--> + <!--</executions>--> + <!--</plugin>--> + + <!--<plugin>--> + <!--<groupId>org.apache.maven.plugins</groupId>--> + <!--<artifactId>maven-compiler-plugin</artifactId>--> + <!--<version>3.8.0</version>--> + <!--<configuration>--> + <!--<source>1.8</source>--> + <!--<target>1.8</target>--> + <!--</configuration>--> + <!--</plugin>--> + + <!--</plugins>--> - <resources> - <resource> - <directory>properties</directory> - <includes> - <include>**/*.properties</include> - </includes> - <filtering>false</filtering> - </resource> - <resource> - <directory>properties</directory> - <includes> - <include>log4j.properties</include> - </includes> - <filtering>false</filtering> - </resource> - </resources> + <!--<resources>--> + <!--<resource>--> + <!--<directory>properties</directory>--> + <!--<includes>--> + <!--<include>**/*.properties</include>--> + <!--</includes>--> + <!--<filtering>false</filtering>--> + <!--</resource>--> + <!--<resource>--> + <!--<directory>properties</directory>--> + <!--<includes>--> + <!--<include>log4j.properties</include>--> + <!--</includes>--> + <!--<filtering>false</filtering>--> + <!--</resource>--> + <!--</resources>--> </build> <properties> @@ -117,7 +173,7 @@ <groupId>org.apache.storm</groupId> <artifactId>storm-core</artifactId> <version>${storm.version}</version> - <!--<scope>provided</scope>--> + <scope>provided</scope> <exclusions> <exclusion> <artifactId>slf4j-log4j12</artifactId> @@ -200,6 +256,14 @@ <artifactId>log4j-over-slf4j</artifactId> <groupId>org.slf4j</groupId> </exclusion> + <exclusion> + <artifactId>zookeeper</artifactId> + <groupId>org.apache.zookeeper</groupId> + </exclusion> + <exclusion> + <artifactId>jdk.tools</artifactId> + <groupId>jdk.tools</groupId> + </exclusion> </exclusions> </dependency> diff --git a/src/main/resources/common.properties b/src/main/resources/common.properties index da0393b..5b9a379 100644 --- a/src/main/resources/common.properties +++ b/src/main/resources/common.properties @@ -1,74 +1,74 @@ -#����kafka���жȴ�С +#输入kafka并行度大小 kafka.input.parallelism=1 -#����kafka topic�� +#输入kafka topic名 kafka.input.topic.name=DOS-SKETCH-LOG -#����kafka��ַ +#输入kafka地址 kafka.input.bootstrap.servers=192.168.44.12:9092 -#��ȡkafkaģʽ +#读取kafka模式 kafka.input.scan.startup.mode=latest -#��ȡkafka group id +#读取kafka group id kafka.input.group.id=2108101137 -#����kafka metrics���жȴ�С +#发送kafka metrics并行度大小 kafka.output.metric.parallelism=1 -#����kafka metrics topic�� +#发送kafka metrics topic名 #kafka.output.metric.topic.name=TRAFFIC-TOP-DESTINATION-IP-METRICS-LOG kafka.output.metric.topic.name=test -#����kafka event���жȴ�С +#发送kafka event并行度大小 kafka.output.event.parallelism=1 -#����kafka event topic�� +#发送kafka event topic名 #kafka.output.event.topic.name=DOS-EVENT-LOG kafka.output.event.topic.name=test -#kafka�����ַ +#kafka输出地址 kafka.output.bootstrap.servers=192.168.44.12:9092 -#����kafka����С +#发送kafka批大小 kafka.output.metric.batch.num=1000 kafka.output.event.batch.num=1000 -#zookeeper��ַ +#zookeeper地址 hbase.zookeeper.quorum=192.168.44.12:2181 -#hbase baseline���� +#hbase baseline表名 hbase.baseline.table.name=ddos_traffic_baselines -#��ȡbaseline���� +#读取baseline限制 hbase.baseline.total.num=1000000 -#���㴰�ڴ�С��Ĭ��600s +#计算窗口大小,默认600s storm.window.max.time=60 -#�����״ξۺϲ��жȣ�4��key +#设置首次聚合并行度,4个key storm.first.agg.parallelism=1 -#���ö��ξۺϲ��жȣ�2��key +#设置二次聚合并行度,2个key storm.second.agg.parallelism=1 -#dos event�����distinct source IP���� +#dos event结果中distinct source IP限制 source.ip.list.limit=10000 data.center.id.num=15 -#IP mmdb��·�� +#IP mmdb库路径 ip.mmdb.path=D:\\data\\dat_test\\ #ip.mmdb.path=/home/bigdata/topology/dat/ -#����baseline�ж�dos������������ +#基于baseline判定dos攻击的上下限 baseline.sessions.minor.threshold=0.1 baseline.sessions.warning.threshold=0.5 baseline.sessions.major.threshold=1 baseline.sessions.severe.threshold=3 baseline.sessions.critical.threshold=8 -#����Ŀ��IP�ķ�������Ĭ��Ϊ10000��һ�㲻�� +#基于目的IP的分区数,默认为10000,一般不变 destination.ip.partition.num=10000 topology.spout.sleep.time=1 @@ -76,38 +76,38 @@ topology.spout.sleep.time=1 #storm topology workers topology.workers=2 -#producer���ԵĴ������� +#producer重试的次数设置 retries=0 -#һ��Batch������֮��������ã��������Batch��û��д���������뷢�ͳ�ȥ�� +#一个Batch被创建之后,最多过多久,不管这个Batch有没有写满,都必须发送出去了 linger.ms=5 -#����ڳ�ʱ֮ǰδ�յ���Ӧ���ͻ��˽��ڱ�Ҫʱ���·������� +#如果在超时之前未收到响应,客户端将在必要时重新发送请求 request.timeout.ms=30000 -#producer���ǰ���batch���з��͵�,���δ�С��Ĭ��:16384 +#producer都是按照batch进行发送的,批次大小,默认:16384 batch.size=262144 -#Producer�����ڻ�����Ϣ�Ļ�������С +#Producer端用于缓存消息的缓冲区大小 buffer.memory=67108864 -#�������������ÿ�η���Kafka���������������С,Ĭ��1048576 +#这个参数决定了每次发送给Kafka服务器请求的最大大小,默认1048576 max.request.size=5242880 -#worker���������ⷢ����Ϣ�Ļ����С +#worker进程中向外发送消息的缓存大小 transfer_buffer_size=32 -#executor�̵߳Ľ��ն��д�С����ҪΪ2�ı��� +#executor线程的接收队列大小;需要为2的倍数 executor_receive_buffer_size=16384 -#executor�̵߳ķ��Ͷ��д�С����ҪΪ2�ı��� +#executor线程的发送队列大小;需要为2的倍数 executor_send_buffer_size=16384 -#��bolt��������ʱ������spout�����ٶȣ����ۿ�ack��������Ч +#当bolt性能受限时,限制spout接收速度,理论看ack开启才有效 topology.config.max.spout.pending=150000 -#ack���� 1����ack 0������ack +#ack设置 1启动ack 0不启动ack topology.num.acks=0 -#������ack -producer.ack=1
\ No newline at end of file +#生产者ack +producer.ack=1 |
