accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1494746 - /accumulo/branches/ACCUMULO-118/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineScanner.java
Date Wed, 19 Jun 2013 19:38:45 GMT
Author: ecn
Date: Wed Jun 19 19:38:45 2013
New Revision: 1494746

URL: http://svn.apache.org/r1494746
Log:
ACCUMULO-118 fix last TODO

Modified:
    accumulo/branches/ACCUMULO-118/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineScanner.java

Modified: accumulo/branches/ACCUMULO-118/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineScanner.java
URL: http://svn.apache.org/viewvc/accumulo/branches/ACCUMULO-118/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineScanner.java?rev=1494746&r1=1494745&r2=1494746&view=diff
==============================================================================
--- accumulo/branches/ACCUMULO-118/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineScanner.java
(original)
+++ accumulo/branches/ACCUMULO-118/core/src/main/java/org/apache/accumulo/core/client/impl/OfflineScanner.java
Wed Jun 19 19:38:45 2013
@@ -231,19 +231,22 @@ class OfflineIterator implements Iterato
     if (currentExtent != null && !extent.isPreviousExtent(currentExtent))
       throw new AccumuloException(" " + currentExtent + " is not previous extent " + extent);
 
-    // TODO: ACCUMULO-118 needs fullpaths
-//    String tablesDir = instance.getConfiguration().get(Property.INSTANCE_DFS_DIR) + "/tables";
+    String tablesDir = instance.getConfiguration().get(Property.INSTANCE_DFS_DIR) + "/tables";
+    String[] volumes = instance.getConfiguration().get(Property.INSTANCE_VOLUMES).split(",");
+    if (volumes.length > 1) {
+      tablesDir = volumes[0] + tablesDir;
+    }
     List<String> absFiles = new ArrayList<String>();
     for (String relPath : relFiles) {
       if (relFiles.contains(":")) {
         absFiles.add(relPath);
       } else {
-        throw new RuntimeException("Unimplemented: offline scanner over relative paths");
-//        if (relPath.startsWith("..")) {
-//          absFiles.add(fs.getFullPath(tablesDir + relPath.substring(2));
-//        } else {
-//          absFiles.add(tablesDir + "/" + tableId + relPath);
-//        }
+        // handle old-style relative paths
+        if (relPath.startsWith("..")) {
+          absFiles.add(tablesDir + relPath.substring(2));
+        } else {
+          absFiles.add(tablesDir + "/" + tableId + relPath);
+        }
       }
     }
     



Mime
View raw message