abdullah alamoudi has submitted this change and it was merged.

Change subject: [NO ISSUE][HYR] Heartbeat processing / NC exceptions
......................................................................


[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 <[email protected]>
Sonar-Qube: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
Contrib: Jenkins <[email protected]>
Integration-Tests: Jenkins <[email protected]>
---
M 
hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/exceptions/HyracksDataException.java
M 
hyracks-fullstack/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/ClusterControllerIPCI.java
2 files changed, 9 insertions(+), 4 deletions(-)

Approvals:
  Anon. E. Moose #1000171: 
  abdullah alamoudi: Looks good to me, approved
  Jenkins: Verified; No violations found; ; Verified



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 @@
             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,
@@ -76,6 +76,12 @@
     public HyracksDataException(String component, int errorCode, String 
message, Throwable cause, String nodeId,
             Serializable... params) {
         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);
     }
 
     /**
@@ -141,6 +147,6 @@
 
     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());
     }
 }
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 @@
                 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;

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/2138
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If8fd35a7fd488bed5f1d5e2146dd48892cb0a7a4
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: release-0.9.3-pre-rc
Gerrit-Owner: Michael Blow <[email protected]>
Gerrit-Reviewer: Anon. E. Moose #1000171
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Murtadha Hubail <[email protected]>
Gerrit-Reviewer: abdullah alamoudi <[email protected]>

Reply via email to