accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r1398402 - in /accumulo/trunk: ./ core/ fate/src/main/java/org/apache/accumulo/fate/ZooStore.java fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java server/ src/
Date Mon, 15 Oct 2012 17:24:45 GMT
Author: ecn
Date: Mon Oct 15 17:24:44 2012
New Revision: 1398402

URL: http://svn.apache.org/viewvc?rev=1398402&view=rev
Log:
ACCUMULO-131 throw an exception if you can not reach zookeeper in 2x timeout period merge
to trunk

Modified:
    accumulo/trunk/   (props changed)
    accumulo/trunk/core/   (props changed)
    accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java   (props changed)
    accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java 
 (contents, props changed)
    accumulo/trunk/server/   (props changed)
    accumulo/trunk/src/   (props changed)

Propchange: accumulo/trunk/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.4/src:r1398399
  Merged /accumulo/branches/1.4:r1398399

Propchange: accumulo/trunk/core/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.4/core:r1398399
  Merged /accumulo/branches/1.4/src/core:r1398399

Propchange: accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.4/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java:r1398399
  Merged /accumulo/branches/1.4/src/fate/src/main/java/org/apache/accumulo/fate/ZooStore.java:r1398399

Modified: accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java?rev=1398402&r1=1398401&r2=1398402&view=diff
==============================================================================
--- accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java (original)
+++ accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java Mon
Oct 15 17:24:44 2012
@@ -77,6 +77,8 @@ class ZooSession {
     int sleepTime = 100;
     ZooKeeper zooKeeper = null;
     
+    long startTime = System.currentTimeMillis();
+
     while (tryAgain) {
       try {
         zooKeeper = new ZooKeeper(host, timeout, watcher);
@@ -89,6 +91,10 @@ class ZooSession {
           } else
             UtilWaitThread.sleep(TIME_BETWEEN_CONNECT_CHECKS_MS);
         }
+        
+        if (System.currentTimeMillis() - startTime > 2 * timeout)
+          throw new RuntimeException("Failed to connect to zookeeper (" + host + ") within
2x zookeeper timeout period " + timeout);
+
       } catch (UnknownHostException uhe) {
         // do not expect to recover from this
         log.warn(uhe.getClass().getName() + " : " + uhe.getMessage());

Propchange: accumulo/trunk/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Mon Oct 15 17:24:44 2012
@@ -0,0 +1,16 @@
+/accumulo/branches/1.3/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:1309369,1328076,1330246,1330264,1330944,1349971,1354669
+/accumulo/branches/1.3/src/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:1309369,1328076,1330246,1349971,1354669
+/accumulo/branches/1.4/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:1305403-1382577,1382613,1388120,1388629,1393868,1396065,1396572,1396616,1396758,1396772,1397048,1397113,1397117,1397176,1397189,1397383,1397700,1397921,1398286,1398308,1398359
+/accumulo/branches/1.4/src/core/src/main/java/org/apache/accumulo/core/zookeeper/ZooSession.java:1398399
+/accumulo/branches/1.4/src/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:1305403-1356900,1358206,1363430,1364778,1365213,1382566,1382923,1388120,1396772,1397048,1397113,1397117,1397176,1397189,1397383,1397700,1397921,1398286,1398308,1398359
+/accumulo/branches/ACCUMULO-672/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:1357826,1357829,1357842,1357858,1358236,1359163
+/accumulo/trunk/src/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:1329425,1332224,1332278,1332347,1333047,1333070,1341000,1342373,1350779,1351691,1356400,1359721
+/incubator/accumulo/branches/1.3/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215,1227231,1227611,1228195,1230180,1230736,1231043,1236873,1245632
+/incubator/accumulo/branches/1.3/src/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:1190280,1190413,1190420,1190427,1190500,1195622,1195625,1195629,1195635,1196044,1196054,1196057,1196071-1196072,1196106,1197066,1198935,1199383,1203683,1204625,1205547,1205880,1206169,1208031,1209124,1209526,1209532,1209539,1209541,1209587,1209657,1210518,1210571,1210596,1210598,1213424,1214320,1225006,1227215,1227231,1227611,1228195,1230180,1230736,1231043,1236873,1245632
+/incubator/accumulo/branches/1.3.5rc/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:1209938
+/incubator/accumulo/branches/1.3.5rc/src/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:1209938
+/incubator/accumulo/branches/1.4/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:1201902-1305402
+/incubator/accumulo/branches/1.4/src/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:1201899-1305402
+/incubator/accumulo/branches/1.4.0rc/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:1304025,1305326
+/incubator/accumulo/branches/1.4.0rc/src/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:1304025,1305326
+/incubator/accumulo/trunk/src/fate/src/main/java/org/apache/accumulo/fate/zookeeper/ZooSession.java:1178656-1201898,1205476,1205570,1208726,1222413,1222719,1222725,1222733-1222734,1296160-1296495

Propchange: accumulo/trunk/server/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.4/server:r1398399
  Merged /accumulo/branches/1.4/src/server:r1398399

Propchange: accumulo/trunk/src/
------------------------------------------------------------------------------
  Merged /accumulo/branches/1.4/src:r1398399
  Merged /accumulo/branches/1.4/src/src:r1398399



Mime
View raw message