You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/02/14 02:46:13 UTC

[GitHub] [rocketmq] caigy commented on a change in pull request #3761: [ISSUE #2986] Support for multiple ACL files in a fixed directory

caigy commented on a change in pull request #3761:
URL: https://github.com/apache/rocketmq/pull/3761#discussion_r805465656



##########
File path: srvutil/src/main/java/org/apache/rocketmq/srvutil/AclFileWatchService.java
##########
@@ -40,19 +40,24 @@
     private int aclFilesNum;
     @Deprecated
     private final Map<String, String> fileCurrentHash;
-    private final Map<String, Long> fileLastModifiedTime;
+    private Map<String, Long> fileLastModifiedTime;
     private List<String/**absolute pathname **/> fileList = new ArrayList<>();
     private final AclFileWatchService.Listener listener;
     private static final int WATCH_INTERVAL = 5000;
     private MessageDigest md = MessageDigest.getInstance("MD5");
+    private String defaultAclFile;
 
     public AclFileWatchService(String path, final AclFileWatchService.Listener listener) throws Exception {
         this.aclPath = path;
+        this.defaultAclFile = path.substring(0, path.length() - 4) + System.getProperty("rocketmq.acl.plain.file", "conf/plain_acl.yml");

Review comment:
       Just get parent directory instead of string truncation, or make `path` as a `List`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org