Permalink
Browse files

Default to printing out BADKEYs from ConsistencyCheck. Cleaned up deb…

…ug/trace messages in ConsistencyFix.java.
  • Loading branch information...
1 parent 0c6893c commit 104c92708483bcd7579d816f3680d003b3973600 @jayjwylie jayjwylie committed Feb 13, 2013
Showing with 10 additions and 8 deletions.
  1. +7 −7 src/java/voldemort/utils/ConsistencyCheck.java
  2. +3 −1 src/java/voldemort/utils/ConsistencyFix.java
@@ -284,14 +284,14 @@ public ConsistencyCheckStats execute() {
}
// print inconsistent keys
- if(verbose) {
- System.out.println("TYPE,Store,ParId,Key,ServerSet,VersionTS,VectorClock[,ValueHash]");
- for(Map.Entry<ByteArray, Map<Version, Set<PrefixNode>>> entry: keyVersionNodeSetMap.entrySet()) {
- ByteArray key = entry.getKey();
- Map<Version, Set<PrefixNode>> versionMap = entry.getValue();
- System.out.print(keyVersionToString(key, versionMap, storeName, partitionId));
- }
+ // if(verbose) {
+ System.out.println("TYPE,Store,ParId,Key,ServerSet,VersionTS,VectorClock[,ValueHash]");
+ for(Map.Entry<ByteArray, Map<Version, Set<PrefixNode>>> entry: keyVersionNodeSetMap.entrySet()) {
+ ByteArray key = entry.getKey();
+ Map<Version, Set<PrefixNode>> versionMap = entry.getValue();
+ System.out.print(keyVersionToString(key, versionMap, storeName, partitionId));
}
+ // }
ConsistencyCheckStats stats = new ConsistencyCheckStats();
stats.consistentKeys = consistentKeys;
@@ -397,6 +397,8 @@ public void run() {
throw new IOException("KeyNumVal line did not parse into two elements: "
+ keyNumVals);
}
+ logger.trace("parsed[0]: <" + parsed[0] + ">, parsed[1] <" + parsed[1]
+ + ">");
String key = parsed[0];
ByteArray keyByteArray = new ByteArray(ByteUtils.fromHexString(key));
int numVals = Integer.parseInt(parsed[1]);
@@ -471,7 +473,7 @@ public void run() {
badKeyResult = badKeyQOut.take();
}
} catch(IOException ioe) {
- logger.warn("IO exception reading badKeyFile " + badKeyFileOut + " : "
+ logger.warn("IO exception writing badKeyFile " + badKeyFileOut + " : "
+ ioe.getMessage());
} catch(InterruptedException ie) {
logger.warn("Interrupted exception during writing of badKeyFile " + badKeyFileOut

0 comments on commit 104c927

Please sign in to comment.