Skip to content

Commit

Permalink
Merge branch 'apache:develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
hhy50 authored Apr 19, 2023
2 parents 1b0ff0f + f9f7147 commit e76407b
Show file tree
Hide file tree
Showing 12 changed files with 119 additions and 119 deletions.
8 changes: 4 additions & 4 deletions broker/src/main/resources/rmq.broker.logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,10 @@
<sift>
<appender name="RocketmqTrafficAppender"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/logs/rocketmqlogs/broker_traffic.log</file>
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}broker_traffic.log</file>
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/broker_traffic.%i.log.gz</fileNamePattern>
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}broker_traffic.%i.log.gz</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>10</maxIndex>
</rollingPolicy>
Expand Down Expand Up @@ -475,10 +475,10 @@
<sift>
<appender name="RocketmqPopAppender"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/logs/rocketmqlogs/pop.log</file>
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}pop.log</file>
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/pop.%i.log
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}pop.%i.log
</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>20</maxIndex>
Expand Down
16 changes: 8 additions & 8 deletions controller/src/main/resources/rmq.controller.logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
<configuration scan="true" scanPeriod="30 seconds">
<appender name="DefaultAppender"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/logs/rocketmqlogs/controller_default.log</file>
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}controller_default.log</file>
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/controller_default.%i.log.gz</fileNamePattern>
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}controller_default.%i.log.gz</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>5</maxIndex>
</rollingPolicy>
Expand All @@ -38,10 +38,10 @@

<appender name="DLedgerAppender_inner"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/logs/rocketmqlogs/dledger.log</file>
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}dledger.log</file>
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/dledger.%i.log.gz</fileNamePattern>
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}dledger.%i.log.gz</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>5</maxIndex>
</rollingPolicy>
Expand All @@ -62,10 +62,10 @@

<appender name="RocketmqTrafficAppender_inner"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/logs/rocketmqlogs/controller_traffic.log</file>
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}controller_traffic.log</file>
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/controller_traffic.%i.log.gz</fileNamePattern>
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}controller_traffic.%i.log.gz</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>10</maxIndex>
</rollingPolicy>
Expand All @@ -84,10 +84,10 @@

<appender name="RocketmqControllerAppender_inner"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/logs/rocketmqlogs/controller.log</file>
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}controller.log</file>
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/controller.%i.log.gz</fileNamePattern>
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}controller.%i.log.gz</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>5</maxIndex>
</rollingPolicy>
Expand Down
2 changes: 1 addition & 1 deletion distribution/bin/runbroker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,5 @@ then
numactl --cpunodebind=$RMQ_NUMA_NODE --membind=$RMQ_NUMA_NODE $JAVA ${JAVA_OPT} $@
fi
else
$JAVA ${JAVA_OPT} $@
"$JAVA" ${JAVA_OPT} $@
fi
2 changes: 1 addition & 1 deletion distribution/bin/runserver.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@ JAVA_OPT="${JAVA_OPT} -XX:-UseLargePages"
JAVA_OPT="${JAVA_OPT} ${JAVA_OPT_EXT}"
JAVA_OPT="${JAVA_OPT} -cp ${CLASSPATH}"

$JAVA ${JAVA_OPT} $@
"$JAVA" ${JAVA_OPT} $@
2 changes: 1 addition & 1 deletion distribution/bin/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ export CLASSPATH=.:${BASE_DIR}/conf:${BASE_DIR}/lib/*:${CLASSPATH}
JAVA_OPT="${JAVA_OPT} -server -Xms1g -Xmx1g -Xmn256m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=128m"
JAVA_OPT="${JAVA_OPT} -cp ${CLASSPATH}"

$JAVA ${JAVA_OPT} "$@"
"$JAVA" ${JAVA_OPT} "$@"
12 changes: 6 additions & 6 deletions namesrv/src/main/resources/rmq.namesrv.logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
<configuration scan="true" scanPeriod="30 seconds">
<appender name="DefaultAppender"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/logs/rocketmqlogs/namesrv_default.log</file>
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}namesrv_default.log</file>
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/namesrv_default.%i.log.gz</fileNamePattern>
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}namesrv_default.%i.log.gz</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>5</maxIndex>
</rollingPolicy>
Expand All @@ -38,10 +38,10 @@

<appender name="RocketmqNamesrvAppender_inner"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/logs/rocketmqlogs/namesrv.log</file>
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}namesrv.log</file>
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/namesrv.%i.log.gz</fileNamePattern>
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}namesrv.%i.log.gz</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>5</maxIndex>
</rollingPolicy>
Expand All @@ -61,10 +61,10 @@

<appender name="RocketmqTrafficAppender_inner"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/logs/rocketmqlogs/namesrv_traffic.log</file>
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}namesrv_traffic.log</file>
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/namesrv_traffic.%i.log.gz</fileNamePattern>
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}namesrv_traffic.%i.log.gz</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>10</maxIndex>
</rollingPolicy>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import org.apache.rocketmq.acl.AccessValidator;
import org.apache.rocketmq.acl.plain.PlainAccessValidator;
import org.apache.rocketmq.client.exception.MQClientException;
import org.apache.rocketmq.common.constant.LoggerName;
import org.apache.rocketmq.common.future.FutureTaskExt;
Expand Down Expand Up @@ -258,6 +259,7 @@ protected RequestPipeline createRequestPipeline() {
};

List<AccessValidator> accessValidatorList = new ArrayList<>();
accessValidatorList.add(new PlainAccessValidator());
// add pipeline
// the last pipe add will execute at the first
return pipeline.pipe(new AuthenticationPipeline(accessValidatorList));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import java.util.List;
import org.apache.rocketmq.acl.AccessResource;
import org.apache.rocketmq.acl.AccessValidator;
import org.apache.rocketmq.acl.plain.PlainAccessValidator;
import org.apache.rocketmq.proxy.common.ProxyContext;
import org.apache.rocketmq.proxy.config.ConfigurationManager;
import org.apache.rocketmq.proxy.config.ProxyConfig;
Expand All @@ -38,7 +37,6 @@ public AuthenticationPipeline(List<AccessValidator> accessValidatorList) {
public void execute(ChannelHandlerContext ctx, RemotingCommand request, ProxyContext context) throws Exception {
ProxyConfig config = ConfigurationManager.getProxyConfig();
if (config.isEnableACL()) {
accessValidatorList.add(new PlainAccessValidator());
for (AccessValidator accessValidator : accessValidatorList) {
AccessResource accessResource = accessValidator.parse(request, context.getRemoteAddress());
accessValidator.validate(accessResource);
Expand Down
Loading

0 comments on commit e76407b

Please sign in to comment.