Till Westmann has submitted this change and it was merged.

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


tiny cleanup

Change-Id: I5263537acff90a0a02b25dd26371760cba9fb665
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1250
Sonar-Qube: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
Integration-Tests: Jenkins <[email protected]>
Reviewed-by: Yingyi Bu <[email protected]>
---
M 
hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/rewriter/runtime/SuperActivityOperatorNodePushable.java
1 file changed, 5 insertions(+), 10 deletions(-)

Approvals:
  Yingyi Bu: 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/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: merged
Gerrit-Change-Id: I5263537acff90a0a02b25dd26371760cba9fb665
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Till Westmann <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Till Westmann <[email protected]>
Gerrit-Reviewer: Yingyi Bu <[email protected]>

Reply via email to