hadoop-zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ph...@apache.org
Subject svn commit: r960676 - in /hadoop/zookeeper/trunk: CHANGES.txt src/contrib/loggraph/src/java/org/apache/zookeeper/graph/JsonGenerator.java
Date Mon, 05 Jul 2010 19:57:44 GMT
Author: phunt
Date: Mon Jul  5 19:57:43 2010
New Revision: 960676

URL: http://svn.apache.org/viewvc?rev=960676&view=rev
Log:
ZOOKEEPER-798. Fixup loggraph for FLE changes

Modified:
    hadoop/zookeeper/trunk/CHANGES.txt
    hadoop/zookeeper/trunk/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/JsonGenerator.java

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=960676&r1=960675&r2=960676&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Mon Jul  5 19:57:43 2010
@@ -76,6 +76,8 @@ IMPROVEMENTS:
 
   ZOOKEEPER-789. Improve FLE log messages (flavio via phunt)
 
+  ZOOKEEPER-798. Fixup loggraph for FLE changes (Ivan Kelly via phunt)
+
 NEW FEATURES:
   ZOOKEEPER-729. Java client API to recursively delete a subtree.
   (Kay Kay via henry)

Modified: hadoop/zookeeper/trunk/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/JsonGenerator.java
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/JsonGenerator.java?rev=960676&r1=960675&r2=960676&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/JsonGenerator.java
(original)
+++ hadoop/zookeeper/trunk/src/contrib/loggraph/src/java/org/apache/zookeeper/graph/JsonGenerator.java
Mon Jul  5 19:57:43 2010
@@ -76,7 +76,7 @@ public class JsonGenerator {
 
 	Pattern stateChangeP = Pattern.compile("- (LOOKING|FOLLOWING|LEADING)");
 	Pattern newElectionP = Pattern.compile("New election. My id =  (\\d+), Proposed zxid = (\\d+)");
-	Pattern receivedProposalP = Pattern.compile("Notification: \\d+, (\\d+), (\\d+), \\d+, [^,]*,
[^,]*, (\\d+)");//, LOOKING, LOOKING, 2
+	Pattern receivedProposalP = Pattern.compile("Notification: (\\d+) \\(n.leader\\), (\\d+)
\\(n.zxid\\), (\\d+) \\(n.round\\), .+ \\(n.state\\), (\\d+) \\(n.sid\\), .+ \\(my state\\)");
 	Pattern exceptionP = Pattern.compile("xception");
 	
 	root = new JSONObject();
@@ -151,10 +151,10 @@ public class JsonGenerator {
 		    }
 		} else if ((m = receivedProposalP.matcher(e.getEntry())).find()) {
 		    // Pattern.compile("Notification: \\d+, (\\d+), (\\d+), \\d+, [^,]*, [^,]*, (\\d+)");//,
LOOKING, LOOKING, 2
-		    int src = Integer.valueOf(m.group(3));
-		    long zxid = Long.valueOf(m.group(1));
+		    int src = Integer.valueOf(m.group(4));
+		    long zxid = Long.valueOf(m.group(2));
 		    int dst = e.getNode();
-		    long epoch2 = Long.valueOf(m.group(2));
+		    long epoch2 = Long.valueOf(m.group(3));
 		    
 		    int count = (int)zxid;// & 0xFFFFFFFFL;
 		    int epoch = (int)Long.rotateRight(zxid, 32);// >> 32;
@@ -169,9 +169,6 @@ public class JsonGenerator {
 			leader = 0;
 		    }
 		    
-		    //	System.out.println("src: "+src+" dst: "+dst+ " zxid: "+zxid);
-		    
-		    //  System.out.println(cur);
 		    if (src != dst) {
 			JSONObject msg = new JSONObject();
 			msg.put("type", "delivermessage");



Mime
View raw message