Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小五666\n哈哈
Rocketmq
提交
1a80c5ba
R
Rocketmq
项目概览
小五666\n哈哈
/
Rocketmq
与 Fork 源项目一致
Fork自
Apache RocketMQ / Rocketmq
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rocketmq
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1a80c5ba
编写于
12月 29, 2018
作者:
D
dongeforever
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Trivial pilishment for acl and msg_trace
上级
06da1045
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
13 addition
and
55 deletion
+13
-55
acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionLoader.java
.../org/apache/rocketmq/acl/plain/PlainPermissionLoader.java
+1
-1
acl/src/main/java/org/apache/rocketmq/acl/plain/RemoteAddressStrategyFactory.java
...ache/rocketmq/acl/plain/RemoteAddressStrategyFactory.java
+1
-1
broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java
...pache/rocketmq/broker/processor/AdminBrokerProcessor.java
+0
-8
broker/src/main/java/org/apache/rocketmq/broker/topic/TopicConfigManager.java
.../org/apache/rocketmq/broker/topic/TopicConfigManager.java
+6
-12
client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPushConsumer.java
...pache/rocketmq/client/consumer/DefaultMQPushConsumer.java
+0
-4
client/src/main/java/org/apache/rocketmq/client/producer/DefaultMQProducer.java
...rg/apache/rocketmq/client/producer/DefaultMQProducer.java
+0
-3
common/src/main/java/org/apache/rocketmq/common/BrokerConfig.java
...rc/main/java/org/apache/rocketmq/common/BrokerConfig.java
+0
-10
common/src/main/java/org/apache/rocketmq/common/MixAll.java
common/src/main/java/org/apache/rocketmq/common/MixAll.java
+1
-2
common/src/main/java/org/apache/rocketmq/common/constant/LoggerName.java
.../java/org/apache/rocketmq/common/constant/LoggerName.java
+0
-1
common/src/test/java/org/apache/rocketmq/common/BrokerConfigTest.java
...est/java/org/apache/rocketmq/common/BrokerConfigTest.java
+0
-3
distribution/conf/2m-noslave/broker-a.properties
distribution/conf/2m-noslave/broker-a.properties
+0
-1
distribution/conf/2m-noslave/broker-b.properties
distribution/conf/2m-noslave/broker-b.properties
+0
-1
distribution/conf/2m-noslave/broker-trace.properties
distribution/conf/2m-noslave/broker-trace.properties
+0
-1
distribution/conf/broker.conf
distribution/conf/broker.conf
+0
-2
srvutil/src/main/java/org/apache/rocketmq/srvutil/ServerUtil.java
...src/main/java/org/apache/rocketmq/srvutil/ServerUtil.java
+2
-2
test/src/test/java/org/apache/rocketmq/test/base/BaseConf.java
...src/test/java/org/apache/rocketmq/test/base/BaseConf.java
+0
-1
tools/src/main/java/org/apache/rocketmq/tools/command/MQAdminStartup.java
...ava/org/apache/rocketmq/tools/command/MQAdminStartup.java
+2
-2
未找到文件。
acl/src/main/java/org/apache/rocketmq/acl/plain/PlainPermissionLoader.java
浏览文件 @
1a80c5ba
...
...
@@ -43,7 +43,7 @@ import org.apache.rocketmq.logging.InternalLoggerFactory;
public
class
PlainPermissionLoader
{
private
static
final
InternalLogger
log
=
InternalLoggerFactory
.
getLogger
(
LoggerName
.
ACL_PLUG
_LOGGER_NAME
);
private
static
final
InternalLogger
log
=
InternalLoggerFactory
.
getLogger
(
LoggerName
.
BROKER
_LOGGER_NAME
);
private
static
final
String
DEFAULT_PLAIN_ACL_FILE
=
"/conf/plain_acl.yml"
;
...
...
acl/src/main/java/org/apache/rocketmq/acl/plain/RemoteAddressStrategyFactory.java
浏览文件 @
1a80c5ba
...
...
@@ -27,7 +27,7 @@ import org.apache.rocketmq.logging.InternalLoggerFactory;
public
class
RemoteAddressStrategyFactory
{
private
static
final
InternalLogger
log
=
InternalLoggerFactory
.
getLogger
(
LoggerName
.
ACL_PLUG
_LOGGER_NAME
);
private
static
final
InternalLogger
log
=
InternalLoggerFactory
.
getLogger
(
LoggerName
.
BROKER
_LOGGER_NAME
);
public
static
final
NullRemoteAddressStrategy
NULL_NET_ADDRESS_STRATEGY
=
new
NullRemoteAddressStrategy
();
...
...
broker/src/main/java/org/apache/rocketmq/broker/processor/AdminBrokerProcessor.java
浏览文件 @
1a80c5ba
...
...
@@ -228,14 +228,6 @@ public class AdminBrokerProcessor implements NettyRequestProcessor {
return
response
;
}
if
(
this
.
brokerController
.
getBrokerConfig
().
isAutoTraceBrokerEnable
())
{
String
errorMsg
=
"the topic["
+
requestHeader
.
getTopic
()
+
"] is user self defined topic and this node is trace broker!"
;
log
.
warn
(
errorMsg
);
response
.
setCode
(
ResponseCode
.
SYSTEM_ERROR
);
response
.
setRemark
(
errorMsg
);
return
response
;
}
try
{
response
.
setCode
(
ResponseCode
.
SUCCESS
);
response
.
setOpaque
(
request
.
getOpaque
());
...
...
broker/src/main/java/org/apache/rocketmq/broker/topic/TopicConfigManager.java
浏览文件 @
1a80c5ba
...
...
@@ -125,14 +125,12 @@ public class TopicConfigManager extends ConfigManager {
this
.
topicConfigTable
.
put
(
topicConfig
.
getTopicName
(),
topicConfig
);
}
{
if
(
this
.
brokerController
.
getBrokerConfig
().
isAutoTraceBrokerEnable
())
{
String
topic
=
this
.
brokerController
.
getBrokerConfig
().
getMsgTraceTopicName
();
TopicConfig
topicConfig
=
new
TopicConfig
(
topic
);
this
.
systemTopicList
.
add
(
topic
);
topicConfig
.
setReadQueueNums
(
1
);
topicConfig
.
setWriteQueueNums
(
1
);
this
.
topicConfigTable
.
put
(
topicConfig
.
getTopicName
(),
topicConfig
);
}
String
topic
=
this
.
brokerController
.
getBrokerConfig
().
getMsgTraceTopicName
();
TopicConfig
topicConfig
=
new
TopicConfig
(
topic
);
this
.
systemTopicList
.
add
(
topic
);
topicConfig
.
setReadQueueNums
(
1
);
topicConfig
.
setWriteQueueNums
(
1
);
this
.
topicConfigTable
.
put
(
topicConfig
.
getTopicName
(),
topicConfig
);
}
}
...
...
@@ -164,10 +162,6 @@ public class TopicConfigManager extends ConfigManager {
if
(
topicConfig
!=
null
)
return
topicConfig
;
if
(
this
.
brokerController
.
getBrokerConfig
().
isAutoTraceBrokerEnable
())
{
return
topicConfig
;
}
TopicConfig
defaultTopicConfig
=
this
.
topicConfigTable
.
get
(
defaultTopic
);
if
(
defaultTopicConfig
!=
null
)
{
if
(
defaultTopic
.
equals
(
MixAll
.
AUTO_CREATE_TOPIC_KEY_TOPIC
))
{
...
...
client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPushConsumer.java
浏览文件 @
1a80c5ba
...
...
@@ -758,8 +758,4 @@ public class DefaultMQPushConsumer extends ClientConfig implements MQPushConsume
public
TraceDispatcher
getTraceDispatcher
()
{
return
traceDispatcher
;
}
public
void
setTraceDispatcher
(
TraceDispatcher
traceDispatcher
)
{
this
.
traceDispatcher
=
traceDispatcher
;
}
}
client/src/main/java/org/apache/rocketmq/client/producer/DefaultMQProducer.java
浏览文件 @
1a80c5ba
...
...
@@ -850,7 +850,4 @@ public class DefaultMQProducer extends ClientConfig implements MQProducer {
return
traceDispatcher
;
}
public
void
setTraceDispatcher
(
TraceDispatcher
traceDispatcher
)
{
this
.
traceDispatcher
=
traceDispatcher
;
}
}
common/src/main/java/org/apache/rocketmq/common/BrokerConfig.java
浏览文件 @
1a80c5ba
...
...
@@ -52,8 +52,6 @@ public class BrokerConfig {
private
boolean
autoCreateSubscriptionGroup
=
true
;
private
String
messageStorePlugIn
=
""
;
@ImportantField
private
boolean
autoTraceBrokerEnable
=
false
;
@ImportantField
private
String
msgTraceTopicName
=
MixAll
.
RMQ_SYS_TRACE_TOPIC
;
/**
* thread numbers for send message thread pool, since spin lock will be used by default since 4.0.x, the default
...
...
@@ -751,14 +749,6 @@ public class BrokerConfig {
this
.
waitTimeMillsInTransactionQueue
=
waitTimeMillsInTransactionQueue
;
}
public
boolean
isAutoTraceBrokerEnable
()
{
return
autoTraceBrokerEnable
;
}
public
void
setAutoTraceBrokerEnable
(
boolean
autoTraceBrokerEnable
)
{
this
.
autoTraceBrokerEnable
=
autoTraceBrokerEnable
;
}
public
String
getMsgTraceTopicName
()
{
return
msgTraceTopicName
;
}
...
...
common/src/main/java/org/apache/rocketmq/common/MixAll.java
浏览文件 @
1a80c5ba
...
...
@@ -82,8 +82,7 @@ public class MixAll {
public
static
final
long
CURRENT_JVM_PID
=
getPID
();
public
static
final
String
RETRY_GROUP_TOPIC_PREFIX
=
"%RETRY%"
;
public
static
final
String
TRACE_BROKER_NAME_SUFFIX
=
"trace"
;
public
static
final
String
DLQ_GROUP_TOPIC_PREFIX
=
"%DLQ%"
;
public
static
final
String
SYSTEM_TOPIC_PREFIX
=
"rmq_sys_"
;
public
static
final
String
UNIQUE_MSG_QUERY_FLAG
=
"_UNIQUE_KEY_QUERY"
;
...
...
common/src/main/java/org/apache/rocketmq/common/constant/LoggerName.java
浏览文件 @
1a80c5ba
...
...
@@ -37,5 +37,4 @@ public class LoggerName {
public
static
final
String
PROTECTION_LOGGER_NAME
=
"RocketmqProtection"
;
public
static
final
String
WATER_MARK_LOGGER_NAME
=
"RocketmqWaterMark"
;
public
static
final
String
FILTER_LOGGER_NAME
=
"RocketmqFilter"
;
public
static
final
String
ACL_PLUG_LOGGER_NAME
=
"RocketmqAclPlug"
;
}
common/src/test/java/org/apache/rocketmq/common/BrokerConfigTest.java
浏览文件 @
1a80c5ba
...
...
@@ -33,7 +33,6 @@ public class BrokerConfigTest {
BrokerConfig
brokerConfig
=
new
BrokerConfig
();
brokerConfig
.
setNamesrvAddr
(
"127.0.0.1:9876"
);
brokerConfig
.
setAutoCreateTopicEnable
(
false
);
brokerConfig
.
setAutoTraceBrokerEnable
(
true
);
brokerConfig
.
setBrokerName
(
"broker-a"
);
brokerConfig
.
setBrokerId
(
0
);
brokerConfig
.
setBrokerClusterName
(
"DefaultCluster"
);
...
...
@@ -44,7 +43,5 @@ public class BrokerConfigTest {
assertThat
(
brokerConfig
.
getBrokerId
()).
isEqualTo
(
0
);
assertThat
(
brokerConfig
.
getBrokerName
()).
isEqualTo
(
"broker-a"
);
assertThat
(
brokerConfig
.
isAutoCreateTopicEnable
()).
isEqualTo
(
false
);
assertThat
(
brokerConfig
.
isAutoTraceBrokerEnable
()).
isEqualTo
(
true
);
}
}
\ No newline at end of file
distribution/conf/2m-noslave/broker-a.properties
浏览文件 @
1a80c5ba
...
...
@@ -19,4 +19,3 @@ deleteWhen=04
fileReservedTime
=
48
brokerRole
=
ASYNC_MASTER
flushDiskType
=
ASYNC_FLUSH
autoTraceBrokerEnable
=
false
\ No newline at end of file
distribution/conf/2m-noslave/broker-b.properties
浏览文件 @
1a80c5ba
...
...
@@ -19,4 +19,3 @@ deleteWhen=04
fileReservedTime
=
48
brokerRole
=
ASYNC_MASTER
flushDiskType
=
ASYNC_FLUSH
autoTraceBrokerEnable
=
false
\ No newline at end of file
distribution/conf/2m-noslave/broker-trace.properties
浏览文件 @
1a80c5ba
...
...
@@ -21,4 +21,3 @@ deleteWhen=04
fileReservedTime
=
48
brokerRole
=
ASYNC_MASTER
flushDiskType
=
ASYNC_FLUSH
autoTraceBrokerEnable
=
true
\ No newline at end of file
distribution/conf/broker.conf
浏览文件 @
1a80c5ba
...
...
@@ -20,5 +20,3 @@ deleteWhen = 04
fileReservedTime
=
48
brokerRole
=
ASYNC_MASTER
flushDiskType
=
ASYNC_FLUSH
enableAcl
=
true
namesrvAddr
=
127
.
0
.
0
.
1
:
9876
srvutil/src/main/java/org/apache/rocketmq/srvutil/ServerUtil.java
浏览文件 @
1a80c5ba
...
...
@@ -35,8 +35,8 @@ public class ServerUtil {
new
Option
(
"n"
,
"namesrvAddr"
,
true
,
"Name server address list, eg: 192.168.0.1:9876;192.168.0.2:9876"
);
opt
.
setRequired
(
false
);
options
.
addOption
(
opt
);
options
.
addOption
(
opt
);
return
options
;
}
...
...
test/src/test/java/org/apache/rocketmq/test/base/BaseConf.java
浏览文件 @
1a80c5ba
...
...
@@ -24,7 +24,6 @@ import org.apache.log4j.Logger;
import
org.apache.rocketmq.broker.BrokerController
;
import
org.apache.rocketmq.common.MQVersion
;
import
org.apache.rocketmq.namesrv.NamesrvController
;
import
org.apache.rocketmq.remoting.netty.TlsSystemConfig
;
import
org.apache.rocketmq.remoting.protocol.RemotingCommand
;
import
org.apache.rocketmq.test.client.rmq.RMQAsyncSendProducer
;
import
org.apache.rocketmq.test.client.rmq.RMQNormalConsumer
;
...
...
tools/src/main/java/org/apache/rocketmq/tools/command/MQAdminStartup.java
浏览文件 @
1a80c5ba
...
...
@@ -132,7 +132,7 @@ public class MQAdminStartup {
System
.
setProperty
(
MixAll
.
NAMESRV_ADDR_PROPERTY
,
namesrvAddr
);
}
cmd
.
execute
(
commandLine
,
options
,
getAclRPCHook
(
commandLine
));
cmd
.
execute
(
commandLine
,
options
,
getAclRPCHook
());
}
else
{
System
.
out
.
printf
(
"The sub command %s not exist.%n"
,
args
[
0
]);
}
...
...
@@ -246,7 +246,7 @@ public class MQAdminStartup {
subCommandList
.
add
(
command
);
}
public
static
RPCHook
getAclRPCHook
(
CommandLine
commandLine
)
{
public
static
RPCHook
getAclRPCHook
()
{
String
fileHome
=
System
.
getProperty
(
MixAll
.
ROCKETMQ_HOME_PROPERTY
,
System
.
getenv
(
MixAll
.
ROCKETMQ_HOME_ENV
));
String
fileName
=
"/conf/tools.yml"
;
JSONObject
yamlDataObject
=
AclUtils
.
getYamlDataObject
(
fileHome
+
fileName
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录