Skip to content

Commit

Permalink
Pass InternalNode to HttpRemoteTask constructor
Browse files Browse the repository at this point in the history
This allows us to extract more info than just the node ID in the future.
  • Loading branch information
dekimir authored and losipiuk committed Jan 17, 2024
1 parent b3b82ba commit bd8470a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ public RemoteTask createRemoteTask(
session,
stageSpan,
taskId,
node.getNodeIdentifier(),
node,
speculative,
locationFactory.createTaskLocation(node, taskId),
fragment,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
import io.trino.execution.buffer.PipelinedBufferInfo;
import io.trino.execution.buffer.PipelinedOutputBuffers;
import io.trino.execution.buffer.SpoolingOutputStats;
import io.trino.metadata.InternalNode;
import io.trino.metadata.Split;
import io.trino.operator.RetryPolicy;
import io.trino.operator.TaskStats;
Expand Down Expand Up @@ -210,7 +211,7 @@ public HttpRemoteTask(
Session session,
Span stageSpan,
TaskId taskId,
String nodeId,
InternalNode node,
boolean speculative,
URI location,
PlanFragment planFragment,
Expand Down Expand Up @@ -240,7 +241,7 @@ public HttpRemoteTask(
requireNonNull(session, "session is null");
requireNonNull(stageSpan, "stageSpan is null");
requireNonNull(taskId, "taskId is null");
requireNonNull(nodeId, "nodeId is null");
requireNonNull(node, "node is null");
requireNonNull(location, "location is null");
requireNonNull(planFragment, "planFragment is null");
requireNonNull(outputBuffers, "outputBuffers is null");
Expand All @@ -258,7 +259,7 @@ public HttpRemoteTask(
this.taskId = taskId;
this.session = session;
this.stageSpan = stageSpan;
this.nodeId = nodeId;
this.nodeId = node.getNodeIdentifier();
this.speculative = new AtomicBoolean(speculative);
this.planFragment = planFragment;
this.outputBuffers.set(outputBuffers);
Expand Down

0 comments on commit bd8470a

Please sign in to comment.