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 2013/06/19 21:38:45 UTC

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

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);
+        }
       }
     }