Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

refactoring

  • Loading branch information...
commit cef05ca090570e5065da09087229cd776e66ff50 1 parent f5bf7c5
@vinothchandar vinothchandar authored
View
23 src/java/voldemort/store/InsufficientOperationalNodesException.java
@@ -69,15 +69,12 @@ public InsufficientOperationalNodesException(String message,
List<Node> preferenceList,
List<Node> failedList,
Collection<? extends Throwable> failures) {
- this(message.toString()
- + " Original replication set :"
- + stripNodeIds(replicationSet)
+ this(message.toString() + " Original replication set :" + stripNodeIds(replicationSet)
+ " Known failed nodes before operation :"
- + stripNodeIds(replicationSet.removeAll(preferenceList) ? replicationSet
- : replicationSet)
+ + stripNodeIds(difference(replicationSet, preferenceList))
+ " Estimated live nodes in preference list :" + stripNodeIds(preferenceList)
+ " New failed nodes during operation :"
- + stripNodeIds(failedList.removeAll(replicationSet) ? failedList : failedList),
+ + stripNodeIds(difference(failedList, replicationSet)),
failures.size() > 0 ? failures.iterator().next() : null);
if(logger.isDebugEnabled()) {
logger.debug(this.getMessage());
@@ -102,4 +99,18 @@ public InsufficientOperationalNodesException(String message,
}
return nodeidList;
}
+
+ /**
+ * Computes A-B
+ *
+ * @param listA
+ * @param listB
+ * @return
+ */
+ private static List<Node> difference(List<Node> listA, List<Node> listB) {
+ listA.removeAll(listB);
+ System.out.println(">>>>>>List A" + listA);
+ System.out.println(">>>>>>List B" + listB);
+ return listA;
+ }
}
Please sign in to comment.
Something went wrong with that request. Please try again.