tiny cleanup
Change-Id: I5263537acff90a0a02b25dd26371760cba9fb665
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1250
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Yingyi Bu <buyingyi@gmail.com>
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.