asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "abdullah alamoudi (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in hyracks[master]: PLEASE EDIT to provide a meaningful commit message!
Date Sun, 14 Feb 2016 07:55:40 GMT
abdullah alamoudi has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/634

Change subject: PLEASE EDIT to provide a meaningful commit message!
......................................................................

PLEASE EDIT to provide a meaningful commit message!

The following commits from your working branch will be included:

commit 3a9e1f0cecf84d74f8aa1735b513adae5e14e8e8
Author: Abdullah Alamoudi <bamousaa@gmail.com>
Date:   Sun Feb 14 10:59:50 2016 +0300

    allow frames with 0 tuples in project runtime

commit fab87abcdce1ee51bc7556364b075cd09c67aa22
Author: Abdullah Alamoudi <bamousaa@gmail.com>
Date:   Wed Feb 10 19:12:23 2016 +0300

    Fixed a Bug in the Register Node Work

    When registering a node, in order to allow multiple nodes to
    share an ip address, we store them in a map <ipaddress,List<nodeNames>>
    However, the way we check for the existence of an entry had a bug in it
    which causes the entry to never be found.

Change-Id: I87dc6eb83a748f7f91610e7d11ebaec9be914e29
---
M algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamProjectRuntimeFactory.java
M hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/RegisterNodeWork.java
2 files changed, 16 insertions(+), 13 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/hyracks refs/changes/34/634/1

diff --git a/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamProjectRuntimeFactory.java
b/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamProjectRuntimeFactory.java
index 001a598..43c63b5 100644
--- a/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamProjectRuntimeFactory.java
+++ b/algebricks/algebricks-runtime/src/main/java/org/apache/hyracks/algebricks/runtime/operators/std/StreamProjectRuntimeFactory.java
@@ -65,23 +65,26 @@
 
             @Override
             public void nextFrame(ByteBuffer buffer) throws HyracksDataException {
+                // what if numOfTuples is 0?
                 tAccess.reset(buffer);
                 int nTuple = tAccess.getTupleCount();
-
-                int t = 0;
-                if (nTuple > 1) {
-                    for (; t < nTuple - 1; t++) {
+                if (nTuple == 0) {
+                    appender.flush(writer);
+                } else {
+                    int t = 0;
+                    if (nTuple > 1) {
+                        for (; t < nTuple - 1; t++) {
+                            appendProjectionToFrame(t, projectionList);
+                        }
+                    }
+                    if (flushFramesRapidly) {
+                        // Whenever all the tuples in the incoming frame have been consumed,
the project operator
+                        // will push its frame to the next operator; i.e., it won't wait
until the frame gets full.
+                        appendProjectionToFrame(t, projectionList, true);
+                    } else {
                         appendProjectionToFrame(t, projectionList);
                     }
                 }
-                if (flushFramesRapidly) {
-                    // Whenever all the tuples in the incoming frame have been consumed,
the project operator
-                    // will push its frame to the next operator; i.e., it won't wait until
the frame gets full.
-                    appendProjectionToFrame(t, projectionList, true);
-                } else {
-                    appendProjectionToFrame(t, projectionList);
-                }
-
             }
 
             @Override
diff --git a/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/RegisterNodeWork.java
b/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/RegisterNodeWork.java
index 7ac0641..dd26ea4 100644
--- a/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/RegisterNodeWork.java
+++ b/hyracks/hyracks-control/hyracks-control-cc/src/main/java/org/apache/hyracks/control/cc/work/RegisterNodeWork.java
@@ -72,7 +72,7 @@
             }
             ncConfiguration = new HashMap<String, String>();
             state.getNCConfig().toMap(ncConfiguration);
-            Set<String> nodes = ipAddressNodeNameMap.get(ipAddress);
+            Set<String> nodes = ipAddressNodeNameMap.get(InetAddress.getByName(ipAddress));
             if (nodes == null) {
                 nodes = new HashSet<String>();
                 ipAddressNodeNameMap.put(InetAddress.getByName(ipAddress), nodes);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I87dc6eb83a748f7f91610e7d11ebaec9be914e29
Gerrit-PatchSet: 1
Gerrit-Project: hyracks
Gerrit-Branch: master
Gerrit-Owner: abdullah alamoudi <bamousaa@gmail.com>

Mime
View raw message