From 8ca92f2d4a7fb2ecc912170bf1906494ef061a29 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Tue, 22 Jan 2019 22:47:13 -0800 Subject: [PATCH] Move TaskSource to execution package --- presto-main/src/main/java/io/prestosql/execution/SqlTask.java | 1 - .../main/java/io/prestosql/execution/SqlTaskExecution.java | 1 - .../java/io/prestosql/execution/SqlTaskExecutionFactory.java | 1 - .../src/main/java/io/prestosql/execution/SqlTaskManager.java | 1 - .../src/main/java/io/prestosql/execution/TaskManager.java | 1 - .../main/java/io/prestosql/{ => execution}/TaskSource.java | 4 +--- presto-main/src/main/java/io/prestosql/operator/Driver.java | 2 +- .../main/java/io/prestosql/operator/index/IndexLoader.java | 2 +- .../src/main/java/io/prestosql/server/TaskUpdateRequest.java | 2 +- .../java/io/prestosql/server/remotetask/HttpRemoteTask.java | 2 +- .../src/main/java/io/prestosql/testing/LocalQueryRunner.java | 2 +- .../src/test/java/io/prestosql/execution/TaskTestUtils.java | 1 - .../src/test/java/io/prestosql/execution/TestSqlTask.java | 1 - .../java/io/prestosql/execution/TestSqlTaskExecution.java | 1 - .../test/java/io/prestosql/execution/TestSqlTaskManager.java | 1 - .../java/io/prestosql/memory/TestSystemMemoryBlocking.java | 2 +- .../src/test/java/io/prestosql/operator/TestDriver.java | 2 +- .../io/prestosql/server/remotetask/TestHttpRemoteTask.java | 2 +- 18 files changed, 9 insertions(+), 20 deletions(-) rename presto-main/src/main/java/io/prestosql/{ => execution}/TaskSource.java (97%) diff --git a/presto-main/src/main/java/io/prestosql/execution/SqlTask.java b/presto-main/src/main/java/io/prestosql/execution/SqlTask.java index a2e59bc69b89..edf5ee0ab22d 100644 --- a/presto-main/src/main/java/io/prestosql/execution/SqlTask.java +++ b/presto-main/src/main/java/io/prestosql/execution/SqlTask.java @@ -24,7 +24,6 @@ import io.airlift.units.DataSize; import io.airlift.units.Duration; import io.prestosql.Session; -import io.prestosql.TaskSource; import io.prestosql.execution.StateMachine.StateChangeListener; import io.prestosql.execution.buffer.BufferResult; import io.prestosql.execution.buffer.LazyOutputBuffer; diff --git a/presto-main/src/main/java/io/prestosql/execution/SqlTaskExecution.java b/presto-main/src/main/java/io/prestosql/execution/SqlTaskExecution.java index 6bbbb9898ffe..151bd96506d1 100644 --- a/presto-main/src/main/java/io/prestosql/execution/SqlTaskExecution.java +++ b/presto-main/src/main/java/io/prestosql/execution/SqlTaskExecution.java @@ -23,7 +23,6 @@ import com.google.common.util.concurrent.ListenableFuture; import io.airlift.concurrent.SetThreadName; import io.airlift.units.Duration; -import io.prestosql.TaskSource; import io.prestosql.event.SplitMonitor; import io.prestosql.execution.StateMachine.StateChangeListener; import io.prestosql.execution.buffer.BufferState; diff --git a/presto-main/src/main/java/io/prestosql/execution/SqlTaskExecutionFactory.java b/presto-main/src/main/java/io/prestosql/execution/SqlTaskExecutionFactory.java index fcd4971c871d..de7618b2fe64 100644 --- a/presto-main/src/main/java/io/prestosql/execution/SqlTaskExecutionFactory.java +++ b/presto-main/src/main/java/io/prestosql/execution/SqlTaskExecutionFactory.java @@ -15,7 +15,6 @@ import io.airlift.concurrent.SetThreadName; import io.prestosql.Session; -import io.prestosql.TaskSource; import io.prestosql.event.SplitMonitor; import io.prestosql.execution.buffer.OutputBuffer; import io.prestosql.execution.executor.TaskExecutor; diff --git a/presto-main/src/main/java/io/prestosql/execution/SqlTaskManager.java b/presto-main/src/main/java/io/prestosql/execution/SqlTaskManager.java index 7c03aa335c19..497de5ea8f06 100644 --- a/presto-main/src/main/java/io/prestosql/execution/SqlTaskManager.java +++ b/presto-main/src/main/java/io/prestosql/execution/SqlTaskManager.java @@ -27,7 +27,6 @@ import io.airlift.units.DataSize; import io.airlift.units.Duration; import io.prestosql.Session; -import io.prestosql.TaskSource; import io.prestosql.event.SplitMonitor; import io.prestosql.execution.StateMachine.StateChangeListener; import io.prestosql.execution.buffer.BufferResult; diff --git a/presto-main/src/main/java/io/prestosql/execution/TaskManager.java b/presto-main/src/main/java/io/prestosql/execution/TaskManager.java index 97364355f0ed..61b8920fba8b 100644 --- a/presto-main/src/main/java/io/prestosql/execution/TaskManager.java +++ b/presto-main/src/main/java/io/prestosql/execution/TaskManager.java @@ -16,7 +16,6 @@ import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.DataSize; import io.prestosql.Session; -import io.prestosql.TaskSource; import io.prestosql.execution.StateMachine.StateChangeListener; import io.prestosql.execution.buffer.BufferResult; import io.prestosql.execution.buffer.OutputBuffers; diff --git a/presto-main/src/main/java/io/prestosql/TaskSource.java b/presto-main/src/main/java/io/prestosql/execution/TaskSource.java similarity index 97% rename from presto-main/src/main/java/io/prestosql/TaskSource.java rename to presto-main/src/main/java/io/prestosql/execution/TaskSource.java index 7004e4f50a9b..dcaa789887c0 100644 --- a/presto-main/src/main/java/io/prestosql/TaskSource.java +++ b/presto-main/src/main/java/io/prestosql/execution/TaskSource.java @@ -11,13 +11,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package io.prestosql; +package io.prestosql.execution; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableSet; -import io.prestosql.execution.Lifespan; -import io.prestosql.execution.ScheduledSplit; import io.prestosql.sql.planner.plan.PlanNodeId; import java.util.Set; diff --git a/presto-main/src/main/java/io/prestosql/operator/Driver.java b/presto-main/src/main/java/io/prestosql/operator/Driver.java index daa93dd939af..2af660821440 100644 --- a/presto-main/src/main/java/io/prestosql/operator/Driver.java +++ b/presto-main/src/main/java/io/prestosql/operator/Driver.java @@ -22,8 +22,8 @@ import com.google.common.util.concurrent.SettableFuture; import io.airlift.log.Logger; import io.airlift.units.Duration; -import io.prestosql.TaskSource; import io.prestosql.execution.ScheduledSplit; +import io.prestosql.execution.TaskSource; import io.prestosql.metadata.Split; import io.prestosql.spi.Page; import io.prestosql.spi.PrestoException; diff --git a/presto-main/src/main/java/io/prestosql/operator/index/IndexLoader.java b/presto-main/src/main/java/io/prestosql/operator/index/IndexLoader.java index 270027c80f02..bf9b2599040f 100644 --- a/presto-main/src/main/java/io/prestosql/operator/index/IndexLoader.java +++ b/presto-main/src/main/java/io/prestosql/operator/index/IndexLoader.java @@ -18,9 +18,9 @@ import com.google.common.collect.Iterables; import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.DataSize; -import io.prestosql.TaskSource; import io.prestosql.connector.ConnectorId; import io.prestosql.execution.ScheduledSplit; +import io.prestosql.execution.TaskSource; import io.prestosql.metadata.Split; import io.prestosql.operator.Driver; import io.prestosql.operator.DriverFactory; diff --git a/presto-main/src/main/java/io/prestosql/server/TaskUpdateRequest.java b/presto-main/src/main/java/io/prestosql/server/TaskUpdateRequest.java index c07a0e3ff42b..ef0f92f6ca02 100644 --- a/presto-main/src/main/java/io/prestosql/server/TaskUpdateRequest.java +++ b/presto-main/src/main/java/io/prestosql/server/TaskUpdateRequest.java @@ -17,7 +17,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.google.common.collect.ImmutableList; import io.prestosql.SessionRepresentation; -import io.prestosql.TaskSource; +import io.prestosql.execution.TaskSource; import io.prestosql.execution.buffer.OutputBuffers; import io.prestosql.sql.planner.PlanFragment; diff --git a/presto-main/src/main/java/io/prestosql/server/remotetask/HttpRemoteTask.java b/presto-main/src/main/java/io/prestosql/server/remotetask/HttpRemoteTask.java index efee3c505388..dcb873f17d71 100644 --- a/presto-main/src/main/java/io/prestosql/server/remotetask/HttpRemoteTask.java +++ b/presto-main/src/main/java/io/prestosql/server/remotetask/HttpRemoteTask.java @@ -32,7 +32,6 @@ import io.airlift.log.Logger; import io.airlift.units.Duration; import io.prestosql.Session; -import io.prestosql.TaskSource; import io.prestosql.execution.FutureStateChange; import io.prestosql.execution.Lifespan; import io.prestosql.execution.NodeTaskMap.PartitionedSplitCountTracker; @@ -41,6 +40,7 @@ import io.prestosql.execution.StateMachine.StateChangeListener; import io.prestosql.execution.TaskId; import io.prestosql.execution.TaskInfo; +import io.prestosql.execution.TaskSource; import io.prestosql.execution.TaskState; import io.prestosql.execution.TaskStatus; import io.prestosql.execution.buffer.BufferInfo; diff --git a/presto-main/src/main/java/io/prestosql/testing/LocalQueryRunner.java b/presto-main/src/main/java/io/prestosql/testing/LocalQueryRunner.java index 4e62aa816dd5..262489843a43 100644 --- a/presto-main/src/main/java/io/prestosql/testing/LocalQueryRunner.java +++ b/presto-main/src/main/java/io/prestosql/testing/LocalQueryRunner.java @@ -23,7 +23,6 @@ import io.prestosql.PagesIndexPageSorter; import io.prestosql.Session; import io.prestosql.SystemSessionProperties; -import io.prestosql.TaskSource; import io.prestosql.block.BlockEncodingManager; import io.prestosql.connector.ConnectorId; import io.prestosql.connector.ConnectorManager; @@ -64,6 +63,7 @@ import io.prestosql.execution.SetSessionTask; import io.prestosql.execution.StartTransactionTask; import io.prestosql.execution.TaskManagerConfig; +import io.prestosql.execution.TaskSource; import io.prestosql.execution.resourceGroups.NoOpResourceGroupManager; import io.prestosql.execution.scheduler.LegacyNetworkTopology; import io.prestosql.execution.scheduler.NodeScheduler; diff --git a/presto-main/src/test/java/io/prestosql/execution/TaskTestUtils.java b/presto-main/src/test/java/io/prestosql/execution/TaskTestUtils.java index df09d2ab933a..33b019e8bc61 100644 --- a/presto-main/src/test/java/io/prestosql/execution/TaskTestUtils.java +++ b/presto-main/src/test/java/io/prestosql/execution/TaskTestUtils.java @@ -16,7 +16,6 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import io.airlift.json.ObjectMapperProvider; -import io.prestosql.TaskSource; import io.prestosql.block.BlockEncodingManager; import io.prestosql.connector.ConnectorId; import io.prestosql.cost.StatsAndCosts; diff --git a/presto-main/src/test/java/io/prestosql/execution/TestSqlTask.java b/presto-main/src/test/java/io/prestosql/execution/TestSqlTask.java index 10d049e84faf..79f1366438ab 100644 --- a/presto-main/src/test/java/io/prestosql/execution/TestSqlTask.java +++ b/presto-main/src/test/java/io/prestosql/execution/TestSqlTask.java @@ -21,7 +21,6 @@ import io.airlift.stats.CounterStat; import io.airlift.stats.TestingGcMonitor; import io.airlift.units.DataSize; -import io.prestosql.TaskSource; import io.prestosql.execution.buffer.BufferResult; import io.prestosql.execution.buffer.BufferState; import io.prestosql.execution.buffer.OutputBuffers; diff --git a/presto-main/src/test/java/io/prestosql/execution/TestSqlTaskExecution.java b/presto-main/src/test/java/io/prestosql/execution/TestSqlTaskExecution.java index 260cddfd18c0..f703650df6d7 100644 --- a/presto-main/src/test/java/io/prestosql/execution/TestSqlTaskExecution.java +++ b/presto-main/src/test/java/io/prestosql/execution/TestSqlTaskExecution.java @@ -24,7 +24,6 @@ import io.airlift.stats.TestingGcMonitor; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.TaskSource; import io.prestosql.block.BlockEncodingManager; import io.prestosql.connector.ConnectorId; import io.prestosql.execution.buffer.BufferResult; diff --git a/presto-main/src/test/java/io/prestosql/execution/TestSqlTaskManager.java b/presto-main/src/test/java/io/prestosql/execution/TestSqlTaskManager.java index 566419f9d352..466e9f47c07a 100644 --- a/presto-main/src/test/java/io/prestosql/execution/TestSqlTaskManager.java +++ b/presto-main/src/test/java/io/prestosql/execution/TestSqlTaskManager.java @@ -21,7 +21,6 @@ import io.airlift.units.DataSize; import io.airlift.units.DataSize.Unit; import io.airlift.units.Duration; -import io.prestosql.TaskSource; import io.prestosql.execution.buffer.BufferResult; import io.prestosql.execution.buffer.BufferState; import io.prestosql.execution.buffer.OutputBuffers; diff --git a/presto-main/src/test/java/io/prestosql/memory/TestSystemMemoryBlocking.java b/presto-main/src/test/java/io/prestosql/memory/TestSystemMemoryBlocking.java index 23643b400f3c..5a7554f194b0 100644 --- a/presto-main/src/test/java/io/prestosql/memory/TestSystemMemoryBlocking.java +++ b/presto-main/src/test/java/io/prestosql/memory/TestSystemMemoryBlocking.java @@ -18,9 +18,9 @@ import com.google.common.util.concurrent.ListenableFuture; import io.airlift.units.DataSize; import io.airlift.units.Duration; -import io.prestosql.TaskSource; import io.prestosql.connector.ConnectorId; import io.prestosql.execution.ScheduledSplit; +import io.prestosql.execution.TaskSource; import io.prestosql.metadata.Split; import io.prestosql.operator.Driver; import io.prestosql.operator.DriverContext; diff --git a/presto-main/src/test/java/io/prestosql/operator/TestDriver.java b/presto-main/src/test/java/io/prestosql/operator/TestDriver.java index 2732c3363934..53193b4a7470 100644 --- a/presto-main/src/test/java/io/prestosql/operator/TestDriver.java +++ b/presto-main/src/test/java/io/prestosql/operator/TestDriver.java @@ -20,9 +20,9 @@ import com.google.common.util.concurrent.Uninterruptibles; import io.airlift.units.Duration; import io.prestosql.Session; -import io.prestosql.TaskSource; import io.prestosql.connector.ConnectorId; import io.prestosql.execution.ScheduledSplit; +import io.prestosql.execution.TaskSource; import io.prestosql.memory.context.LocalMemoryContext; import io.prestosql.metadata.Split; import io.prestosql.spi.HostAddress; diff --git a/presto-main/src/test/java/io/prestosql/server/remotetask/TestHttpRemoteTask.java b/presto-main/src/test/java/io/prestosql/server/remotetask/TestHttpRemoteTask.java index 7ce0d7fcade9..d56e880ba482 100644 --- a/presto-main/src/test/java/io/prestosql/server/remotetask/TestHttpRemoteTask.java +++ b/presto-main/src/test/java/io/prestosql/server/remotetask/TestHttpRemoteTask.java @@ -27,7 +27,6 @@ import io.airlift.json.JsonCodec; import io.airlift.json.JsonModule; import io.airlift.units.Duration; -import io.prestosql.TaskSource; import io.prestosql.client.NodeVersion; import io.prestosql.connector.ConnectorId; import io.prestosql.execution.Lifespan; @@ -37,6 +36,7 @@ import io.prestosql.execution.TaskId; import io.prestosql.execution.TaskInfo; import io.prestosql.execution.TaskManagerConfig; +import io.prestosql.execution.TaskSource; import io.prestosql.execution.TaskState; import io.prestosql.execution.TaskStatus; import io.prestosql.execution.TaskTestUtils;