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/02/05 16:39:19 UTC
svn commit: r1442627 -
/accumulo/trunk/server/src/main/java/org/apache/accumulo/server/util/LocalityCheck.java
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;