asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Till Westmann (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: tiny cleanup
Date Tue, 04 Oct 2016 22:42:10 GMT
Till Westmann has uploaded a new change for review.

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

Change subject: tiny cleanup
......................................................................

tiny cleanup

Change-Id: I5263537acff90a0a02b25dd26371760cba9fb665
---
M hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/rewriter/runtime/SuperActivityOperatorNodePushable.java
1 file changed, 5 insertions(+), 10 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/50/1250/1

diff --git a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/rewriter/runtime/SuperActivityOperatorNodePushable.java
b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/rewriter/runtime/SuperActivityOperatorNodePushable.java
index 3e557a2..2ac392b 100644
--- a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/rewriter/runtime/SuperActivityOperatorNodePushable.java
+++ b/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/rewriter/runtime/SuperActivityOperatorNodePushable.java
@@ -27,7 +27,6 @@
 import java.util.Map;
 import java.util.Queue;
 import java.util.Map.Entry;
-import java.util.concurrent.Callable;
 import java.util.concurrent.Future;
 
 import org.apache.commons.lang3.tuple.Pair;
@@ -88,7 +87,7 @@
         });
     }
 
-    public void init() throws HyracksDataException {
+    private void init() throws HyracksDataException {
         Map<ActivityId, IOperatorNodePushable> startOperatorNodePushables = new HashMap<ActivityId,
IOperatorNodePushable>();
         Queue<Pair<Pair<IActivity, Integer>, Pair<IActivity, Integer>>>
childQueue = new LinkedList<Pair<Pair<IActivity, Integer>, Pair<IActivity,
Integer>>>();
         List<IConnectorDescriptor> outputConnectors = null;
@@ -206,20 +205,16 @@
         void runAction(IOperatorNodePushable op, int opIndex) throws HyracksDataException;
     }
 
-    private void runInParallel(OperatorNodePushableAction opAction)
-            throws HyracksDataException {
+    private void runInParallel(OperatorNodePushableAction opAction) throws HyracksDataException
{
         List<Future<Void>> initializationTasks = new ArrayList<>();
         try {
             int index = 0;
             // Run one action for all OperatorNodePushables in parallel through a thread
pool.
             for (final IOperatorNodePushable op : operatorNodePushablesBFSOrder) {
                 final int opIndex = index++;
-                initializationTasks.add(ctx.getExecutorService().submit(new Callable<Void>()
{
-                    @Override
-                    public Void call() throws Exception {
-                        opAction.runAction(op, opIndex);
-                        return null;
-                    }
+                initializationTasks.add(ctx.getExecutorService().submit(() -> {
+                    opAction.runAction(op, opIndex);
+                    return null;
                 }));
             }
             // Waits until all parallel actions to finish.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5263537acff90a0a02b25dd26371760cba9fb665
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Till Westmann <tillw@apache.org>

Mime
View raw message