Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
oceanbase
oblogclient
提交
1f853910
O
oblogclient
项目概览
oceanbase
/
oblogclient
1 年多 前同步成功
通知
5
Star
15
Fork
11
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
oblogclient
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
未验证
提交
1f853910
编写于
1月 13, 2022
作者:
H
He Wang
提交者:
GitHub
1月 13, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cleanup unnecessary dependencies (#24)
上级
ce3379aa
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
23 addition
and
93 deletion
+23
-93
common/pom.xml
common/pom.xml
+0
-8
logproxy-client/pom.xml
logproxy-client/pom.xml
+5
-27
logproxy-client/src/main/java/com/oceanbase/clogproxy/client/config/ObReaderConfig.java
...com/oceanbase/clogproxy/client/config/ObReaderConfig.java
+2
-2
logproxy-client/src/main/java/com/oceanbase/clogproxy/client/connection/ClientStream.java
...m/oceanbase/clogproxy/client/connection/ClientStream.java
+1
-2
logproxy-client/src/test/java/com/oceanbase/clogproxy/client/LogProxyClientTest.java
...va/com/oceanbase/clogproxy/client/LogProxyClientTest.java
+10
-6
pom.xml
pom.xml
+5
-48
未找到文件。
common/pom.xml
浏览文件 @
1f853910
...
...
@@ -31,18 +31,10 @@ See the Mulan PSL v2 for more details.
<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>
<!-- SLF4J -->
<dependency>
...
...
logproxy-client/pom.xml
浏览文件 @
1f853910
...
...
@@ -26,44 +26,22 @@ See the Mulan PSL v2 for more details.
<description>
The Client for OceanBase Log Proxy.
</description>
<dependencies>
<!-- common dependency -->
<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 -->
<!-- test -->
<dependency>
<groupId>
ch.qos.logback
</groupId>
<artifactId>
logback-core
</artifactId>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<scope>
test
</scope>
</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>
...
...
logproxy-client/src/main/java/com/oceanbase/clogproxy/client/config/ObReaderConfig.java
浏览文件 @
1f853910
...
...
@@ -11,12 +11,12 @@ See the Mulan PSL v2 for more details. */
package
com.oceanbase.clogproxy.client.config
;
import
com.google.common.collect.Maps
;
import
com.oceanbase.clogproxy.client.util.Validator
;
import
com.oceanbase.clogproxy.common.config.SharedConf
;
import
com.oceanbase.clogproxy.common.packet.LogType
;
import
com.oceanbase.clogproxy.common.util.CryptoUtil
;
import
com.oceanbase.clogproxy.common.util.Hex
;
import
java.util.HashMap
;
import
java.util.Map
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -45,7 +45,7 @@ public class ObReaderConfig extends AbstractConnectionConfig {
/** Constructor with empty arguments. */
public
ObReaderConfig
()
{
super
(
Maps
.
newHashMap
());
super
(
new
HashMap
<>
());
}
/**
...
...
logproxy-client/src/main/java/com/oceanbase/clogproxy/client/connection/ClientStream.java
浏览文件 @
1f853910
...
...
@@ -21,7 +21,6 @@ import java.util.ArrayList;
import
java.util.List
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.atomic.AtomicBoolean
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -133,7 +132,7 @@ public class ClientStream {
/** Start the process thread. */
public
void
start
()
{
// if status listener exist, enable monitor
context
.
params
.
setEnableMonitor
(
CollectionUtils
.
isNotEmpty
(
statusListeners
));
context
.
params
.
setEnableMonitor
(
!
statusListeners
.
isEmpty
(
));
if
(
started
.
compareAndSet
(
false
,
true
))
{
thread
=
...
...
logproxy-client/src/test/java/com/oceanbase/clogproxy/client/LogProxyClientTest.java
浏览文件 @
1f853910
...
...
@@ -20,10 +20,14 @@ import io.netty.handler.ssl.SslContextBuilder;
import
javax.net.ssl.SSLException
;
import
org.junit.Ignore
;
import
org.junit.Test
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
@Ignore
public
class
LogProxyClientTest
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
LogProxyClientTest
.
class
);
@Test
public
void
testLogProxyClient
()
{
ObReaderConfig
config
=
new
ObReaderConfig
();
...
...
@@ -39,14 +43,14 @@ public class LogProxyClientTest {
new
RecordListener
()
{
@Override
public
void
notify
(
LogMessage
record
)
{
System
.
out
.
println
(
record
);
public
void
notify
(
LogMessage
message
)
{
logger
.
info
(
"LogMessage received: {}"
,
message
.
toString
()
);
}
@Override
public
void
onException
(
LogProxyClientException
e
)
{
if
(
e
.
needStop
())
{
System
.
out
.
println
(
e
.
getMessage
());
logger
.
error
(
e
.
getMessage
());
client
.
stop
();
}
}
...
...
@@ -70,14 +74,14 @@ public class LogProxyClientTest {
new
RecordListener
()
{
@Override
public
void
notify
(
LogMessage
record
)
{
System
.
out
.
println
(
record
);
public
void
notify
(
LogMessage
message
)
{
logger
.
info
(
"LogMessage received: {}"
,
message
.
toString
()
);
}
@Override
public
void
onException
(
LogProxyClientException
e
)
{
if
(
e
.
needStop
())
{
System
.
out
.
println
(
e
.
getMessage
());
logger
.
error
(
e
.
getMessage
());
client
.
stop
();
}
}
...
...
pom.xml
浏览文件 @
1f853910
...
...
@@ -70,9 +70,7 @@ See the Mulan PSL v2 for more details.
<maven.compiler.target>
${java.version}
</maven.compiler.target>
<commons-lang.version>
3.12.0
</commons-lang.version>
<commons-collection.version>
4.4
</commons-collection.version>
<commons-codec.version>
1.15
</commons-codec.version>
<guava.version>
31.0.1-jre
</guava.version>
<netty.version>
4.1.68.Final
</netty.version>
<protobuf.version>
3.18.2
</protobuf.version>
<lz4.version>
1.8.0
</lz4.version>
...
...
@@ -94,21 +92,11 @@ See the Mulan PSL v2 for more details.
<artifactId>
commons-lang3
</artifactId>
<version>
${commons-lang.version}
</version>
</dependency>
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-collections4
</artifactId>
<version>
${commons-collection.version}
</version>
</dependency>
<dependency>
<groupId>
commons-codec
</groupId>
<artifactId>
commons-codec
</artifactId>
<version>
${commons-codec.version}
</version>
</dependency>
<dependency>
<groupId>
com.google.guava
</groupId>
<artifactId>
guava
</artifactId>
<version>
${guava.version}
</version>
</dependency>
<!-- net -->
<dependency>
...
...
@@ -135,49 +123,18 @@ See the Mulan PSL v2 for more details.
<artifactId>
slf4j-api
</artifactId>
<version>
${slf4j.version}
</version>
</dependency>
<dependency>
<groupId>
org.slf4j
</groupId>
<artifactId>
log4j-over-slf4j
</artifactId>
<version>
${slf4j.version}
</version>
</dependency>
<dependency>
<groupId>
org.slf4j
</groupId>
<artifactId>
jcl-over-slf4j
</artifactId>
<version>
${slf4j.version}
</version>
</dependency>
<dependency>
<groupId>
org.slf4j
</groupId>
<artifactId>
jul-to-slf4j
</artifactId>
<version>
${slf4j.version}
</version>
</dependency>
<!--
logback
-->
<!--
test
-->
<dependency>
<groupId>
ch.qos.logback
</groupId>
<artifactId>
logback-core
</artifactId>
<version>
${logback.version}
</version>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
${junit.version}
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
ch.qos.logback
</groupId>
<artifactId>
logback-classic
</artifactId>
<version>
${logback.version}
</version>
<exclusions>
<exclusion>
<artifactId>
slf4j-api
</artifactId>
<groupId>
org.slf4j
</groupId>
</exclusion>
<exclusion>
<artifactId>
slf4j-log4j12
</artifactId>
<groupId>
org.slf4j
</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- test -->
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
${junit.version}
</version>
<scope>
test
</scope>
</dependency>
</dependencies>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录