accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1442627 - /accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/LocalityCheck.java
Date Tue, 05 Feb 2013 15:39:19 GMT
Author: ecn
Date: Tue Feb  5 15:39:19 2013
New Revision: 1442627

URL: http://svn.apache.org/viewvc?rev=1442627&view=rev
Log:
ACCUMULO-982 deal with cloned tables

Modified:
    accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/LocalityCheck.java

Modified: accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/LocalityCheck.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/LocalityCheck.java?rev=1442627&r1=1442626&r2=1442627&view=diff
==============================================================================
--- accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/LocalityCheck.java
(original)
+++ accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/LocalityCheck.java
Tue Feb  5 15:39:19 2013
@@ -62,7 +62,7 @@ public class LocalityCheck {
         addBlocks(fs, host, files, totalBlocks, localBlocks);
         files.clear();
       } else if (key.compareColumnFamily(Constants.METADATA_DATAFILE_COLUMN_FAMILY) == 0)
{
-        files.add(new String(KeyExtent.tableOfMetadataRow(key.getRow())) + key.getColumnQualifier().toString());
+        files.add(new String(KeyExtent.tableOfMetadataRow(key.getRow())) + slash(key.getColumnQualifier().toString()));
       }
     }
     System.out.println(" Server         %local  total blocks");
@@ -72,6 +72,12 @@ public class LocalityCheck {
     return 0;
   }
   
+  private static String slash(String path) {
+    if (path.startsWith("/"))
+      return path;
+    return "/" + path;
+  }
+
   private void addBlocks(FileSystem fs, String host, ArrayList<String> files, Map<String,Long>
totalBlocks, Map<String,Long> localBlocks) throws Exception {
     long allBlocks = 0;
     long matchingBlocks = 0;



Mime
View raw message