asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amo...@apache.org
Subject incubator-asterixdb-hyracks git commit: Add Another Signature to Send Messages to CC
Date Tue, 22 Mar 2016 19:25:44 GMT
Repository: incubator-asterixdb-hyracks
Updated Branches:
  refs/heads/master 1a97a8bfc -> 0d6d7c27e


Add Another Signature to Send Messages to CC

The existing interface to send messages from NC
to CC expects a byte[]. The new method takes
a Serializable and serialize it.

Change-Id: I0ec4e0898c341723f29af32043cec8c042377ed9
Reviewed-on: https://asterix-gerrit.ics.uci.edu/727
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Murtadha Hubail <hubailmor@gmail.com>


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

Branch: refs/heads/master
Commit: 0d6d7c27e80231368e6e1c43e45b308ae8e8075b
Parents: 1a97a8b
Author: Abdullah Alamoudi <bamousaa@gmail.com>
Authored: Fri Mar 18 00:33:16 2016 +0300
Committer: abdullah alamoudi <bamousaa@gmail.com>
Committed: Tue Mar 22 11:05:40 2016 -0700

----------------------------------------------------------------------
 .../org/apache/hyracks/api/context/IHyracksTaskContext.java   | 3 +++
 .../src/main/java/org/apache/hyracks/control/nc/Task.java     | 7 +++++++
 .../java/org/apache/hyracks/test/support/TestTaskContext.java | 5 +++++
 3 files changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/blob/0d6d7c27/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/context/IHyracksTaskContext.java
----------------------------------------------------------------------
diff --git a/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/context/IHyracksTaskContext.java
b/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/context/IHyracksTaskContext.java
index 3076a32..58adccb 100644
--- a/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/context/IHyracksTaskContext.java
+++ b/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/context/IHyracksTaskContext.java
@@ -18,6 +18,7 @@
  */
 package org.apache.hyracks.api.context;
 
+import java.io.Serializable;
 import java.util.concurrent.ExecutorService;
 
 import org.apache.hyracks.api.dataflow.TaskAttemptId;
@@ -45,4 +46,6 @@ public interface IHyracksTaskContext
     public void setSharedObject(Object sharedObject);
 
     public Object getSharedObject();
+
+    public void sendApplicationMessageToCC(Serializable message, DeploymentId deploymentId)
throws Exception;
 }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/blob/0d6d7c27/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/Task.java
----------------------------------------------------------------------
diff --git a/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/Task.java
b/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/Task.java
index 7855945..134154c 100644
--- a/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/Task.java
+++ b/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/Task.java
@@ -18,6 +18,7 @@
  */
 package org.apache.hyracks.control.nc;
 
+import java.io.Serializable;
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -51,6 +52,7 @@ import org.apache.hyracks.api.job.profiling.counters.ICounter;
 import org.apache.hyracks.api.job.profiling.counters.ICounterContext;
 import org.apache.hyracks.api.partitions.PartitionId;
 import org.apache.hyracks.api.resources.IDeallocatable;
+import org.apache.hyracks.api.util.JavaSerializationUtils;
 import org.apache.hyracks.control.common.job.PartitionState;
 import org.apache.hyracks.control.common.job.profiling.counters.Counter;
 import org.apache.hyracks.control.common.job.profiling.om.PartitionProfile;
@@ -387,6 +389,11 @@ public class Task implements IHyracksTaskContext, ICounterContext, Runnable
{
     }
 
     @Override
+    public void sendApplicationMessageToCC(Serializable message, DeploymentId deploymentId)
throws Exception {
+        this.ncs.sendApplicationMessageToCC(JavaSerializationUtils.serialize(message), deploymentId);
+    }
+
+    @Override
     public void setSharedObject(Object sharedObject) {
         this.sharedObject = sharedObject;
     }

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/blob/0d6d7c27/hyracks/hyracks-test-support/src/main/java/org/apache/hyracks/test/support/TestTaskContext.java
----------------------------------------------------------------------
diff --git a/hyracks/hyracks-test-support/src/main/java/org/apache/hyracks/test/support/TestTaskContext.java
b/hyracks/hyracks-test-support/src/main/java/org/apache/hyracks/test/support/TestTaskContext.java
index f796812..ee2bff5 100644
--- a/hyracks/hyracks-test-support/src/main/java/org/apache/hyracks/test/support/TestTaskContext.java
+++ b/hyracks/hyracks-test-support/src/main/java/org/apache/hyracks/test/support/TestTaskContext.java
@@ -18,6 +18,7 @@
  */
 package org.apache.hyracks.test.support;
 
+import java.io.Serializable;
 import java.nio.ByteBuffer;
 import java.util.HashMap;
 import java.util.Map;
@@ -138,6 +139,10 @@ public class TestTaskContext implements IHyracksTaskContext {
     }
 
     @Override
+    public void sendApplicationMessageToCC(Serializable message, DeploymentId deploymentId)
throws Exception {
+    }
+
+    @Override
     public ExecutorService getExecutorService() {
         return null;
     }


Mime
View raw message