zongtanghu commented on a change in pull request #662: Msg trace & Acl 
URL: https://github.com/apache/rocketmq/pull/662#discussion_r245572598
 
 

 ##########
 File path: 
tools/src/main/java/org/apache/rocketmq/tools/command/MQAdminStartup.java
 ##########
 @@ -243,4 +245,25 @@ private static SubCommand findSubCommand(final String 
name) {
     public static void initCommand(SubCommand command) {
         subCommandList.add(command);
     }
+
+    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 ,
+                JSONObject.class);
+
+        if (yamlDataObject == null || yamlDataObject.isEmpty()) {
+            System.out.printf(" Cannot find conf file %s, acl is not be 
enabled.%n" ,fileHome + fileName);
+            return null;
+        }
+        // admin ak sk
 
 Review comment:
   Okay,I will remove it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to