accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bus...@apache.org
Subject [2/3] accumulo git commit: ACCUMULO-4335 Error conditions that result in a Halt should ensure non-zero exit code.
Date Wed, 08 Jun 2016 21:56:40 GMT
ACCUMULO-4335 Error conditions that result in a Halt should ensure non-zero exit code.


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/eff45476
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/eff45476
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/eff45476

Branch: refs/heads/master
Commit: eff45476511f66668e6c144664b07ef962c0ab0c
Parents: ec69f29
Author: Sean Busbey <busbey@cloudera.com>
Authored: Wed Jun 8 10:56:44 2016 -0500
Committer: Sean Busbey <busbey@cloudera.com>
Committed: Wed Jun 8 10:56:44 2016 -0500

----------------------------------------------------------------------
 .../main/java/org/apache/accumulo/server/rpc/TServerUtils.java   | 2 +-
 .../main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java | 2 +-
 .../src/main/java/org/apache/accumulo/tserver/TabletServer.java  | 4 ++--
 .../java/org/apache/accumulo/tserver/log/TabletServerLogger.java | 2 +-
 .../java/org/apache/accumulo/tserver/scan/NextBatchTask.java     | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/eff45476/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java
----------------------------------------------------------------------
diff --git a/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java b/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java
index 26150e8..70e1c59 100644
--- a/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java
+++ b/server/base/src/main/java/org/apache/accumulo/server/rpc/TServerUtils.java
@@ -522,7 +522,7 @@ public class TServerUtils {
         try {
           finalServer.serve();
         } catch (Error e) {
-          Halt.halt("Unexpected error in TThreadPoolServer " + e + ", halting.");
+          Halt.halt("Unexpected error in TThreadPoolServer " + e + ", halting.", 1);
         }
       }
     };

http://git-wip-us.apache.org/repos/asf/accumulo/blob/eff45476/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
----------------------------------------------------------------------
diff --git a/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java b/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
index cc43802..4fc0727 100644
--- a/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
+++ b/server/gc/src/main/java/org/apache/accumulo/gc/SimpleGarbageCollector.java
@@ -685,7 +685,7 @@ public class SimpleGarbageCollector extends AccumuloServerContext implements
Ifa
     LockWatcher lockWatcher = new LockWatcher() {
       @Override
       public void lostLock(LockLossReason reason) {
-        Halt.halt("GC lock in zookeeper lost (reason = " + reason + "), exiting!");
+        Halt.halt("GC lock in zookeeper lost (reason = " + reason + "), exiting!", 1);
       }
 
       @Override

http://git-wip-us.apache.org/repos/asf/accumulo/blob/eff45476/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
index 6427b29..5626f12 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
@@ -2323,7 +2323,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable
{
 
         @Override
         public void lostLock(final LockLossReason reason) {
-          Halt.halt(0, new Runnable() {
+          Halt.halt(serverStopRequested ? 0 : 1, new Runnable() {
             @Override
             public void run() {
               if (!serverStopRequested)
@@ -2335,7 +2335,7 @@ public class TabletServer extends AccumuloServerContext implements Runnable
{
 
         @Override
         public void unableToMonitorLockNode(final Throwable e) {
-          Halt.halt(0, new Runnable() {
+          Halt.halt(1, new Runnable() {
             @Override
             public void run() {
               log.error("Lost ability to monitor tablet server lock, exiting.", e);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/eff45476/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
index 1c9c5b9..3b0f9d7 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/log/TabletServerLogger.java
@@ -253,7 +253,7 @@ public class TabletServerLogger {
       } else {
         log.error("Repeatedly failed to create WAL. Going to exit tabletserver.", t);
         // We didn't have retries or we failed too many times.
-        Halt.halt("Experienced too many errors creating WALs, giving up");
+        Halt.halt("Experienced too many errors creating WALs, giving up", 1);
       }
 
       // The exception will trigger the log creation to be re-attempted.

http://git-wip-us.apache.org/repos/asf/accumulo/blob/eff45476/server/tserver/src/main/java/org/apache/accumulo/tserver/scan/NextBatchTask.java
----------------------------------------------------------------------
diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/scan/NextBatchTask.java
b/server/tserver/src/main/java/org/apache/accumulo/tserver/scan/NextBatchTask.java
index ec28367..110eda3 100644
--- a/server/tserver/src/main/java/org/apache/accumulo/tserver/scan/NextBatchTask.java
+++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/scan/NextBatchTask.java
@@ -88,7 +88,7 @@ public class NextBatchTask extends ScanTask<ScanBatch> {
     } catch (TooManyFilesException | SampleNotPresentException e) {
       addResult(e);
     } catch (OutOfMemoryError ome) {
-      Halt.halt("Ran out of memory scanning " + scanSession.extent + " for " + scanSession.client);
+      Halt.halt("Ran out of memory scanning " + scanSession.extent + " for " + scanSession.client,
1);
       addResult(ome);
     } catch (Throwable e) {
       log.warn("exception while scanning tablet " + (scanSession == null ? "(unknown)" :
scanSession.extent), e);


Mime
View raw message