aboutsummaryrefslogtreecommitdiff
path: root/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment
diff options
context:
space:
mode:
authorSorabh Hamirwasia <shamirwasia@maprtech.com>2018-05-08 13:06:20 -0700
committerArina Ielchiieva <arina.yelchiyeva@gmail.com>2018-05-18 15:40:59 +0300
commit5dd8a6f60e006c2dc707f241b7619634e4e82bbd (patch)
tree2255dabe934929d5a39089d4e3a908b3c39b1b6c /exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment
parent5a3a73ad098f77ad01d9366dc1a0f8f4ac539746 (diff)
DRILL-6255: Drillbit while sending control message to itself creates a connection instead of submitting locally
closes #1253
Diffstat (limited to 'exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment')
-rw-r--r--exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/FragmentStatusReporter.java15
1 files changed, 4 insertions, 11 deletions
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/FragmentStatusReporter.java b/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/FragmentStatusReporter.java
index eb5765868..c0c5b0430 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/FragmentStatusReporter.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/work/fragment/FragmentStatusReporter.java
@@ -40,12 +40,9 @@ public class FragmentStatusReporter implements AutoCloseable {
protected final AtomicReference<DrillbitEndpoint> foremanDrillbit;
- protected final DrillbitEndpoint localDrillbit;
-
public FragmentStatusReporter(final ExecutorFragmentContext context) {
this.context = context;
this.foremanDrillbit = new AtomicReference<>(context.getForemanEndpoint());
- this.localDrillbit = context.getEndpoint();
}
/**
@@ -119,14 +116,10 @@ public class FragmentStatusReporter implements AutoCloseable {
return;
}
- if (localDrillbit.equals(foremanNode)) {
- // Update the status locally
- context.getWorkEventbus().statusUpdate(status);
- } else {
- // Send the status via Control Tunnel to remote foreman node
- final ControlTunnel tunnel = context.getController().getTunnel(foremanNode);
- tunnel.sendFragmentStatus(status);
- }
+ // Send status for both local and remote foreman node via Tunnel. For local there won't be any network connection
+ // created and it will be submitted locally using LocalControlConnectionManager
+ final ControlTunnel tunnel = context.getController().getTunnel(foremanNode);
+ tunnel.sendFragmentStatus(status);
}
/**