提交 18f9da1a 编写于 作者: H He Wang 提交者: 川粉

update package name

上级 951b2906
# This file is for unifying the coding style for different editors and IDEs
# See editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.java]
indent_size = 4
OceanBase Log Client OceanBase Log Client
--------------- ---------------
OceanBase Log Client is a Java client for [oblogproxy](https://github.com/oceanbase/oblogproxy). It uses [netty](https://github.com/netty/netty) to connect to the log proxy server and receive the incremental change log in real time. OceanBase Log Client is a library for obtaining log of [OceanBase](https://github.com/oceanbase/oceanbase). There are modules as following:
- `common`: some common utils
- `logproxy-client`: the client for [oblogproxy](https://github.com/oceanbase/oblogproxy)
Communication Communication
--------------- ---------------
...@@ -19,9 +22,9 @@ Example for Maven: ...@@ -19,9 +22,9 @@ Example for Maven:
```xml ```xml
<dependency> <dependency>
<groupId>com.oceanbase.logproxy.client</groupId> <groupId>com.oceanbase.logclient</groupId>
<artifactId>client</artifactId> <artifactId>logproxy-client</artifactId>
<version>x.y.z</version> <version>x.y.z</version>
</dependency> </dependency>
``` ```
...@@ -29,16 +32,16 @@ If you'd rather like the latest snapshots of the upcoming major version, use our ...@@ -29,16 +32,16 @@ If you'd rather like the latest snapshots of the upcoming major version, use our
```xml ```xml
<dependency> <dependency>
<groupId>com.oceanbase.logproxy.client</groupId> <groupId>com.oceanbase.logclient</groupId>
<artifactId>client</artifactId> <artifactId>logproxy-client</artifactId>
<version>x.y.z-SNAPSHOT</version> <version>x.y.z-SNAPSHOT</version>
</dependency> </dependency>
<repositories> <repositories>
<repository> <repository>
<id>sonatype-snapshots</id> <id>sonatype-snapshots</id>
<name>Sonatype Snapshot Repository</name> <name>Sonatype Snapshot Repository</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url> <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots> <snapshots>
<enabled>true</enabled> <enabled>true</enabled>
</snapshots> </snapshots>
...@@ -68,13 +71,13 @@ LogProxyClient client = new LogProxyClient("127.0.0.1", 2983, config); ...@@ -68,13 +71,13 @@ LogProxyClient client = new LogProxyClient("127.0.0.1", 2983, config);
// add handler // add handler
client.addListener(new RecordListener() { client.addListener(new RecordListener() {
@Override @Override
public void notify(LogMessage message){ public void notify(LogMessage message){
// process // process
} }
@Override @Override
public void onException(LogProxyClientException e) { public void onException(LogProxyClientException e) {
if (e.needStop()) { if (e.needStop()) {
// handle error and stop client // handle error and stop client
......
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.oceanbase.logproxy.client</groupId>
<artifactId>logproxy-client</artifactId>
<version>1.0.1-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>client</artifactId>
<packaging>jar</packaging>
<name>${project.groupId}:${project.artifactId}</name>
<dependencies>
<dependency>
<groupId>com.oceanbase.logproxy.client</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
<!-- SLF4J -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
</dependency>
<!-- logback -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
<!-- test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<modelVersion>4.0.0</modelVersion> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>com.oceanbase.logproxy.client</groupId> <groupId>com.oceanbase.logclient</groupId>
<artifactId>logproxy-client</artifactId> <artifactId>logclient</artifactId>
<version>1.0.1-SNAPSHOT</version> <version>1.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<artifactId>common</artifactId> <artifactId>common</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>${project.groupId}:${project.artifactId}</name>
<description>Common Utils for OceanBase Log Client.</description>
<name>${project.groupId}:${project.artifactId}</name> <dependencies>
<!-- common -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependencies> <!-- net -->
<!-- common --> <dependency>
<dependency> <groupId>io.netty</groupId>
<groupId>org.apache.commons</groupId> <artifactId>netty-all</artifactId>
<artifactId>commons-lang3</artifactId> </dependency>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<!-- net --> <!-- data protocol -->
<dependency> <dependency>
<groupId>io.netty</groupId> <groupId>com.google.protobuf</groupId>
<artifactId>netty-all</artifactId> <artifactId>protobuf-java</artifactId>
</dependency> </dependency>
<dependency>
<!-- data protocol --> <groupId>org.lz4</groupId>
<dependency> <artifactId>lz4-java</artifactId>
<groupId>com.google.protobuf</groupId> </dependency>
<artifactId>protobuf-java</artifactId> </dependencies>
</dependency>
<dependency>
<groupId>org.lz4</groupId>
<artifactId>lz4-java</artifactId>
</dependency>
</dependencies>
</project> </project>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.oceanbase.logclient</groupId>
<artifactId>logclient</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>logproxy-client</artifactId>
<packaging>jar</packaging>
<name>${project.groupId}:${project.artifactId}</name>
<description>The Client for OceanBase Log Proxy.</description>
<dependencies>
<dependency>
<groupId>com.oceanbase.logclient</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
<!-- SLF4J -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
</dependency>
<!-- logback -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
<!-- test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
...@@ -18,7 +18,6 @@ import com.oceanbase.clogproxy.client.listener.RecordListener; ...@@ -18,7 +18,6 @@ import com.oceanbase.clogproxy.client.listener.RecordListener;
import com.oceanbase.clogproxy.client.listener.StatusListener; import com.oceanbase.clogproxy.client.listener.StatusListener;
import com.oceanbase.clogproxy.client.util.ClientIdGenerator; import com.oceanbase.clogproxy.client.util.ClientIdGenerator;
import com.oceanbase.clogproxy.client.util.Validator; import com.oceanbase.clogproxy.client.util.Validator;
import com.oceanbase.clogproxy.common.packet.LogType;
import com.oceanbase.clogproxy.common.packet.ProtocolVersion; import com.oceanbase.clogproxy.common.packet.ProtocolVersion;
import io.netty.handler.ssl.SslContext; import io.netty.handler.ssl.SslContext;
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<modelVersion>4.0.0</modelVersion> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.oceanbase.logproxy.client</groupId>
<artifactId>logproxy-client</artifactId> <groupId>com.oceanbase.logclient</groupId>
<version>1.0.1-SNAPSHOT</version> <artifactId>logclient</artifactId>
<packaging>pom</packaging> <version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>${project.groupId}:${project.artifactId}</name>
<description>The Java Client for OceanBase LogProxy.</description> <name>${project.groupId}:${project.artifactId}</name>
<description>OceanBase Log Client.</description>
<url>https://github.com/oceanbase/oblogclient</url>
<licenses>
<license>
<name>Mulan Public License,Version 2</name>
<url>http://license.coscl.org.cn/MulanPSL2/</url>
</license>
</licenses>
<developers>
<developer>
<name>He Wang</name>
<email>wanghechn@qq.com</email>
<organization>OceanBase</organization>
<timezone>8</timezone>
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/oceanbase/oblogclient.git</connection>
<developerConnection>scm:git:https://github.com/oceanbase/oblogclient.git</developerConnection>
<url>https://github.com/oceanbase/oblogclient</url> <url>https://github.com/oceanbase/oblogclient</url>
<tag>HEAD</tag>
<licenses>
<license>
<name>Mulan Public License,Version 2</name>
<url>http://license.coscl.org.cn/MulanPSL2/</url>
</license>
</licenses>
<developers>
<developer>
<name>He Wang</name>
<email>wanghechn@qq.com</email>
<organization>OceanBase</organization>
<organizationUrl>https://open.oceanbase.com</organizationUrl>
<timezone>8</timezone>
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/oceanbase/oblogclient.git</connection>
<developerConnection>scm:git:https://github.com/oceanbase/oblogclient.git</developerConnection>
<url>https://github.com/oceanbase/oblogclient</url>
<tag>HEAD</tag>
</scm> </scm>
<properties> <properties>
<encoding>UTF-8</encoding> <encoding>UTF-8</encoding>
<project.build.sourceEncoding>${encoding}</project.build.sourceEncoding> <project.build.sourceEncoding>${encoding}</project.build.sourceEncoding>
<project.reporting.outputEncoding>${encoding}</project.reporting.outputEncoding> <project.reporting.outputEncoding>${encoding}</project.reporting.outputEncoding>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source> <maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target> <maven.compiler.target>${java.version}</maven.compiler.target>
<commons-lang.version>3.12.0</commons-lang.version> <commons-lang.version>3.12.0</commons-lang.version>
<commons-collection.version>4.4</commons-collection.version> <commons-collection.version>4.4</commons-collection.version>
<commons-codec.version>1.15</commons-codec.version> <commons-codec.version>1.15</commons-codec.version>
<guava.version>31.0.1-jre</guava.version> <guava.version>31.0.1-jre</guava.version>
<netty.version>4.1.68.Final</netty.version> <netty.version>4.1.68.Final</netty.version>
<protobuf.version>3.18.1</protobuf.version> <protobuf.version>3.18.1</protobuf.version>
<lz4.version>1.8.0</lz4.version> <lz4.version>1.8.0</lz4.version>
<slf4j.version>1.7.32</slf4j.version> <slf4j.version>1.7.32</slf4j.version>
<logback.version>1.2.6</logback.version> <logback.version>1.2.6</logback.version>
<junit.version>4.13.1</junit.version> <junit.version>4.13.1</junit.version>
</properties> </properties>
<modules> <modules>
<module>common</module> <module>common</module>
<module>client</module> <module>logproxy-client</module>
</modules> </modules>
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
<!-- common --> <!-- common -->
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId> <artifactId>commons-lang3</artifactId>
<version>${commons-lang.version}</version> <version>${commons-lang.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId> <artifactId>commons-collections4</artifactId>
<version>${commons-collection.version}</version> <version>${commons-collection.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>commons-codec</groupId> <groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId> <artifactId>commons-codec</artifactId>
<version>${commons-codec.version}</version> <version>${commons-codec.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.google.guava</groupId> <groupId>com.google.guava</groupId>
<artifactId>guava</artifactId> <artifactId>guava</artifactId>
<version>${guava.version}</version> <version>${guava.version}</version>
</dependency> </dependency>
<!-- net --> <!-- net -->
<dependency> <dependency>
<groupId>io.netty</groupId> <groupId>io.netty</groupId>
<artifactId>netty-all</artifactId> <artifactId>netty-all</artifactId>
<version>${netty.version}</version> <version>${netty.version}</version>
</dependency> </dependency>
<!-- data protocol --> <!-- data protocol -->
<dependency> <dependency>
<groupId>com.google.protobuf</groupId> <groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId> <artifactId>protobuf-java</artifactId>
<version>${protobuf.version}</version> <version>${protobuf.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.lz4</groupId> <groupId>org.lz4</groupId>
<artifactId>lz4-java</artifactId> <artifactId>lz4-java</artifactId>
<version>${lz4.version}</version> <version>${lz4.version}</version>
</dependency> </dependency>
<!-- SLF4J --> <!-- SLF4J -->
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId> <artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version> <version>${slf4j.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId> <artifactId>log4j-over-slf4j</artifactId>
<version>${slf4j.version}</version> <version>${slf4j.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId> <artifactId>jcl-over-slf4j</artifactId>
<version>${slf4j.version}</version> <version>${slf4j.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId> <artifactId>jul-to-slf4j</artifactId>
<version>${slf4j.version}</version> <version>${slf4j.version}</version>
</dependency> </dependency>
<!-- logback --> <!-- logback -->
<dependency> <dependency>
<groupId>ch.qos.logback</groupId> <groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId> <artifactId>logback-core</artifactId>
<version>${logback.version}</version> <version>${logback.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>ch.qos.logback</groupId> <groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId> <artifactId>logback-classic</artifactId>
<version>${logback.version}</version> <version>${logback.version}</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<artifactId>slf4j-api</artifactId> <artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
</exclusion> </exclusion>
<exclusion> <exclusion>
<artifactId>slf4j-log4j12</artifactId> <artifactId>slf4j-log4j12</artifactId>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<!-- test --> <!-- test -->
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>${junit.version}</version> <version>${junit.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
<distributionManagement> <distributionManagement>
<snapshotRepository> <snapshotRepository>
<id>sonatype-nexus-snapshots</id> <id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name> <name>Sonatype Nexus Snapshots</name>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url> <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository> </snapshotRepository>
<repository> <repository>
<id>sonatype-nexus-staging</id> <id>sonatype-nexus-staging</id>
<name>Nexus Release Repository</name> <name>Nexus Release Repository</name>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url> <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository> </repository>
</distributionManagement> </distributionManagement>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version> <version>3.8.1</version>
<configuration> <configuration>
<source>${maven.compiler.source}</source> <source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target> <target>${maven.compiler.target}</target>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId> <artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version> <version>3.2.1</version>
<executions> <executions>
<execution> <execution>
<id>attach-sources</id> <id>attach-sources</id>
<goals> <goals>
<goal>jar-no-fork</goal> <goal>jar-no-fork</goal>
</goals> </goals>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId> <artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.1</version> <version>3.3.1</version>
<executions> <executions>
<execution> <execution>
<id>attach-javadocs</id> <id>attach-javadocs</id>
<goals> <goals>
<goal>jar</goal> <goal>jar</goal>
</goals> </goals>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId> <artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version> <version>3.0.1</version>
<executions> <executions>
<execution> <execution>
<id>sign-artifacts</id> <id>sign-artifacts</id>
<phase>verify</phase> <phase>verify</phase>
<goals> <goals>
<goal>sign</goal> <goal>sign</goal>
</goals> </goals>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
</project> </project>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册