Permalink
Browse files

Removing vector clock sort code from KeyVersionFetcher

  • Loading branch information...
1 parent 0a97728 commit fa12ee84bf2c5421c80190f9181ec16596a56299 @vinothchandar vinothchandar committed Sep 27, 2013
Showing with 12 additions and 5 deletions.
  1. +12 −5 src/java/voldemort/utils/KeyVersionFetcherCLI.java
@@ -231,6 +231,9 @@ public String call() throws Exception {
ZoneToNaryToString zoneToNaryToString = new ZoneToNaryToString();
for(int replicatingNodeId: replicatingNodeIds) {
+ // TODO Not sure why we can't do getVersions(..) here. Seems
+ // wasteful to fetch the value all the way over from the server
+ // and discard it here
List<Versioned<byte[]>> values = adminClient.storeOps.getNodeKey(storeName,
replicatingNodeId,
new ByteArray(key));
@@ -241,14 +244,18 @@ public String call() throws Exception {
// Sort the versions so that on-disk order of concurrent
// versions is not visible.
- TreeSet<Version> sortedVersions = new TreeSet<Version>();
- for(Versioned<byte[]> value: values) {
- sortedVersions.add(value.getVersion());
- }
+ // FIXME this will break since VectorClock is not a
+ // 'Comparable'.
+ /*
+ * TreeSet<Version> sortedVersions = new TreeSet<Version>();
+ * for(Versioned<byte[]> value: values) {
+ * sortedVersions.add(value.getVersion()); }
+ */
StringBuilder sb = new StringBuilder();
sb.append(ByteUtils.toHexString(key));
- for(Version version: sortedVersions) {
+ for(Versioned<byte[]> value: values) {
+ Version version = value.getVersion();
sb.append(" : ").append(version.toString());
}

0 comments on commit fa12ee8

Please sign in to comment.