asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mb...@apache.org
Subject [1/2] asterixdb git commit: [NO ISSUE][HYR] Heartbeat processing / NC exceptions
Date Thu, 09 Nov 2017 20:56:23 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master 7f00136dc -> 81c09a98a


[NO ISSUE][HYR] Heartbeat processing / NC exceptions

- Run heartbeat processing off of Worker thread, to prevent starvation
- Preserve stacktrace when creating node-scoped HyracksDataException
  clones

Change-Id: If8fd35a7fd488bed5f1d5e2146dd48892cb0a7a4
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2138
Reviewed-by: abdullah alamoudi <bamousaa@gmail.com>
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>


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

Branch: refs/heads/master
Commit: ed4b04680224ce9209bf417247d6c0424c4dfc3d
Parents: e32cb67
Author: Michael Blow <michael.blow@couchbase.com>
Authored: Wed Nov 8 21:12:12 2017 -0500
Committer: abdullah alamoudi <bamousaa@gmail.com>
Committed: Wed Nov 8 21:31:19 2017 -0800

----------------------------------------------------------------------
 .../hyracks/api/exceptions/HyracksDataException.java      | 10 ++++++++--
 .../apache/hyracks/control/cc/ClusterControllerIPCI.java  |  3 +--
 2 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ed4b0468/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/HyracksDataException.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/HyracksDataException.java
b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/HyracksDataException.java
index 4517730..7ae7cbf 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/HyracksDataException.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/HyracksDataException.java
@@ -38,7 +38,7 @@ public class HyracksDataException extends HyracksException {
             return (HyracksDataException) cause;
         } else if (cause instanceof Error) {
             // don't wrap errors, allow them to propagate
-            throw (Error)cause;
+            throw (Error) cause;
         } else if (cause instanceof InterruptedException && !Thread.currentThread().isInterrupted())
{
             // TODO(mblow): why not force interrupt on current thread?
             LOGGER.log(Level.WARNING,
@@ -78,6 +78,12 @@ public class HyracksDataException extends HyracksException {
         super(component, errorCode, message, cause, nodeId, params);
     }
 
+    public HyracksDataException(String component, int errorCode, String message, Throwable
cause, String nodeId,
+            StackTraceElement[] stackTrace, Serializable... params) {
+        super(component, errorCode, message, cause, nodeId, params);
+        setStackTrace(stackTrace);
+    }
+
     /**
      * @deprecated Error code is needed.
      */
@@ -141,6 +147,6 @@ public class HyracksDataException extends HyracksException {
 
     public static HyracksDataException create(HyracksDataException e, String nodeId) {
         return new HyracksDataException(e.getComponent(), e.getErrorCode(), e.getMessage(),
e.getCause(), nodeId,
-                e.getParams());
+                e.getStackTrace(), e.getParams());
     }
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ed4b0468/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerIPCI.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerIPCI.java
b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerIPCI.java
index 350984c..af5c102 100644
--- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerIPCI.java
+++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerIPCI.java
@@ -72,8 +72,7 @@ class ClusterControllerIPCI implements IIPCI {
                 break;
             case NODE_HEARTBEAT:
                 CCNCFunctions.NodeHeartbeatFunction nhf = (CCNCFunctions.NodeHeartbeatFunction)
fn;
-                ccs.getWorkQueue().schedule(new NodeHeartbeatWork(ccs, nhf.getNodeId(),
-                        nhf.getHeartbeatData()));
+                ccs.getExecutor().execute(new NodeHeartbeatWork(ccs, nhf.getNodeId(), nhf.getHeartbeatData()));
                 break;
             case NOTIFY_JOBLET_CLEANUP:
                 CCNCFunctions.NotifyJobletCleanupFunction njcf = (CCNCFunctions.NotifyJobletCleanupFunction)
fn;


Mime
View raw message