You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2019/04/04 19:42:27 UTC

[GitHub] [accumulo] ctubbsii commented on a change in pull request #1034: Fix #933 RuntimeException while stopping Accumulo

ctubbsii commented on a change in pull request #1034: Fix #933 RuntimeException while stopping Accumulo
URL: https://github.com/apache/accumulo/pull/1034#discussion_r272335478
 
 

 ##########
 File path: start/src/main/java/org/apache/accumulo/start/classloader/vfs/AccumuloReloadingVFSClassLoader.java
 ##########
 @@ -183,12 +184,23 @@ public AccumuloReloadingVFSClassLoader(String uris, FileSystemManager vfs,
     monitor.setDelay(monitorDelay);
     monitor.setRecursive(false);
     for (FileObject file : pathsToMonitor) {
-      monitor.addFile(file);
+      addFileToMonitor(file);
       log.debug("monitoring {}", file);
     }
     monitor.start();
   }
 
+  private void addFileToMonitor(FileObject file) {
+    try {
+      monitor.addFile(file);
+    } catch (RuntimeException re) {
+      if (re.getMessage().contains("files-cache"))
+        log.error("There is no implementation for files-cache in VFS2");
+      else
+        log.error(re.getMessage());
 
 Review comment:
   Not sure, but maybe we should re-throw here?
   
   ```suggestion
           throw re;
   ```
   
   At the very least, we should include the stack trace.
   
   ```suggestion
           log.error("Unknown error adding {} to VFS monitor", file, re);
   ```
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services