You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ec...@apache.org on 2012/03/20 20:47:53 UTC

svn commit: r1303116 - /incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/Accumulo.java

Author: ecn
Date: Tue Mar 20 19:47:52 2012
New Revision: 1303116

URL: http://svn.apache.org/viewvc?rev=1303116&view=rev
Log:
ACCUMULO-476 don't assume the configured file system is DFS (also fix logic for sleep back-off)

Modified:
    incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/Accumulo.java

Modified: incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/Accumulo.java
URL: http://svn.apache.org/viewvc/incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/Accumulo.java?rev=1303116&r1=1303115&r2=1303116&view=diff
==============================================================================
--- incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/Accumulo.java (original)
+++ incubator/accumulo/branches/1.4/src/server/src/main/java/org/apache/accumulo/server/Accumulo.java Tue Mar 20 19:47:52 2012
@@ -176,11 +176,13 @@ public class Accumulo {
     long sleep = 1000;
     while (true) {
       try {
+        FileSystem fs = FileSystem.get(CachedConfiguration.getInstance());
+        if (!(fs instanceof DistributedFileSystem))
+          break;
         DistributedFileSystem dfs = (DistributedFileSystem) FileSystem.get(CachedConfiguration.getInstance());
         if (!dfs.setSafeMode(SafeModeAction.SAFEMODE_GET))
           break;
         log.warn("Waiting for the NameNode to leave safemode");
-        sleep = 1000;
       } catch (IOException ex) {
         log.warn("Unable to connect to HDFS");
       }