👋 Hi!

Read More

Maven的pom配置

plugin配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
<!--配置生成Javadoc包-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<configuration>
<encoding>UTF-8</encoding>
<aggregate>true</aggregate>
<charset>UTF-8</charset>
<docencoding>UTF-8</docencoding>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!--配置生成源码包-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Read More

kafuka操作

topic

1
2
cd /home/kafka/kafka_2.10-0.10.0.1/bin
./kafka-topics.sh --list --zookeeper 172.16.11.5:2188/kafka-10

Read More

定位cup占用过高

  1. 定位cup占用过高步骤
    1
    2
    3
    4
    5
    6
    1.top定位进程PID。如7888
    2.找到PID,java -aux|grep PID,定位该进程所在的应用路径。如java -aux|grep 7888
    3.top -H -p PID,找到该进程中的线程ID(默认按照CPU占用率降序)。如top -H -p 7888找到8072
    4.使用printf %x PID,对找到的PID转成十六进制。如8072转为1f88
    5.cd到2中找到的jdk路径下,执行./jstack PID|grep -A 5 十六进制(id)。
    如./jstack 7888|grep -A 5 1f88,找到1f88线程后5行的内容

Read More

Git

1.Git概述

官方网站:https://git-scm.com

Read More