You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by ti...@apache.org on 2016/10/06 01:59:34 UTC
asterixdb git commit: tiny cleanup
Repository: asterixdb
Updated Branches:
refs/heads/master 58f631628 -> 0309d51a5
tiny cleanup
Change-Id: I5263537acff90a0a02b25dd26371760cba9fb665
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1250
Sonar-Qube: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Yingyi Bu <bu...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/0309d51a
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/0309d51a
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/0309d51a
Branch: refs/heads/master
Commit: 0309d51a50f6894f10474ff417e4ce184c91618a
Parents: 58f6316
Author: Till Westmann <ti...@apache.org>
Authored: Tue Oct 4 15:41:32 2016 -0700
Committer: Till Westmann <ti...@apache.org>
Committed: Wed Oct 5 18:59:10 2016 -0700
----------------------------------------------------------------------
.../runtime/SuperActivityOperatorNodePushable.java | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/0309d51a/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/rewriter/runtime/SuperActivityOperatorNodePushable.java
----------------------------------------------------------------------
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.List;
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 class SuperActivityOperatorNodePushable implements IOperatorNodePushable
});
}
- 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 @@ public class SuperActivityOperatorNodePushable implements IOperatorNodePushable
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.