Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
@Test(singleThreaded = true)
public class TestMemoryRevokingScheduler
{
private final AtomicInteger idGeneator = new AtomicInteger();
private final AtomicInteger idGenerator = new AtomicInteger();
private final SpillSpaceTracker spillSpaceTracker = new SpillSpaceTracker(DataSize.of(10, GIGABYTE));
private final Map<QueryId, QueryContext> queryContexts = new HashMap<>();

Expand Down Expand Up @@ -219,9 +219,8 @@ private OperatorContext createContexts(SqlTask sqlTask)
TaskContext taskContext = getOrCreateTaskContext(sqlTask);
PipelineContext pipelineContext = taskContext.addPipelineContext(0, false, false, false);
DriverContext driverContext = pipelineContext.addDriverContext();
OperatorContext operatorContext = driverContext.addOperatorContext(1, new PlanNodeId("na"), "na");

return operatorContext;
return driverContext.addOperatorContext(1, new PlanNodeId("na"), "na");
}

private void requestMemoryRevoking(MemoryRevokingScheduler scheduler)
Expand Down Expand Up @@ -256,7 +255,7 @@ private SqlTask newSqlTask(QueryId queryId)
{
QueryContext queryContext = getOrCreateQueryContext(queryId);

TaskId taskId = new TaskId(new StageId(queryId.getId(), 0), idGeneator.incrementAndGet(), 0);
TaskId taskId = new TaskId(new StageId(queryId.getId(), 0), idGenerator.incrementAndGet(), 0);
URI location = URI.create("fake://task/" + taskId);

return createSqlTask(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ public void testBufferCloseOnCancel()
sqlTask.cancel();
assertEquals(sqlTask.getTaskInfo().getTaskStatus().getState(), TaskState.CANCELED);

// buffer future will complete.. the event is async so wait a bit for event to propagate
// buffer future will complete, the event is async so wait a bit for event to propagate
bufferResult.get(1, SECONDS);

bufferResult = sqlTask.getTaskResults(OUT, 0, DataSize.of(1, MEGABYTE));
Expand Down Expand Up @@ -332,7 +332,7 @@ public void testDynamicFilters()
ListenableFuture<?> future = sqlTask.getTaskStatus(STARTING_VERSION);
assertFalse(future.isDone());

// make sure future gets unblocked when dynamic filters version is updated
// make sure future gets unblocked when dynamic filters' version is updated
taskContext.updateDomains(ImmutableMap.of(new DynamicFilterId("filter"), Domain.none(BIGINT)));
assertEquals(sqlTask.getTaskStatus().getVersion(), STARTING_VERSION + 1);
assertEquals(sqlTask.getTaskStatus().getDynamicFiltersVersion(), INITIAL_DYNAMIC_FILTERS_VERSION + 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
import io.trino.spi.block.TestingBlockEncodingSerde;
import io.trino.spi.connector.ConnectorSplit;
import io.trino.spi.connector.UpdatablePageSource;
import io.trino.spi.type.Type;
import io.trino.spiller.SpillSpaceTracker;
import io.trino.sql.planner.LocalExecutionPlanner.LocalExecutionPlan;
import io.trino.sql.planner.plan.PlanNodeId;
Expand Down Expand Up @@ -82,7 +81,6 @@
import static io.trino.execution.buffer.OutputBuffers.createInitialEmptyOutputBuffers;
import static io.trino.execution.buffer.PagesSerde.getSerializedPagePositionCount;
import static io.trino.memory.context.AggregatedMemoryContext.newSimpleAggregatedMemoryContext;
import static io.trino.spi.type.VarcharType.VARCHAR;
import static java.util.Objects.requireNonNull;
import static java.util.concurrent.Executors.newScheduledThreadPool;
import static java.util.concurrent.TimeUnit.HOURS;
Expand Down Expand Up @@ -122,7 +120,7 @@ public void testSimple()
// |
// Scan
//
TestingScanOperatorFactory testingScanOperatorFactory = new TestingScanOperatorFactory(0, TABLE_SCAN_NODE_ID, ImmutableList.of(VARCHAR));
TestingScanOperatorFactory testingScanOperatorFactory = new TestingScanOperatorFactory(0, TABLE_SCAN_NODE_ID);
TaskOutputOperatorFactory taskOutputOperatorFactory = new TaskOutputOperatorFactory(
1,
TABLE_SCAN_NODE_ID,
Expand Down Expand Up @@ -337,8 +335,7 @@ public static class TestingScanOperatorFactory

public TestingScanOperatorFactory(
int operatorId,
PlanNodeId sourceId,
List<Type> types)
PlanNodeId sourceId)
{
this.operatorId = operatorId;
this.sourceId = requireNonNull(sourceId, "sourceId is null");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ private void runExperimentOverloadedCluster(SimulationController controller)

SECONDS.sleep(30);

// this gets the executor into a more realistic point-in-time state, where long running tasks start to make progress
// this gets the executor into a more realistic point-in-time state, where long-running tasks start to make progress
for (int i = 0; i < 20; i++) {
controller.clearPendingQueue();
MINUTES.sleep(1);
Expand Down