From 1224886e55454ca6d0c49a935328d4179cee7a4b Mon Sep 17 00:00:00 2001 From: David Phillips Date: Sat, 9 Feb 2019 14:01:56 -0800 Subject: [PATCH] Move TaskSource to execution package Extracted-From: https://github.com/prestosql/presto/commit/8ca92f2d4a7fb2ecc912170bf1906494ef061a29 --- .../src/main/java/com/facebook/presto/execution/SqlTask.java | 1 - .../java/com/facebook/presto/execution/SqlTaskExecution.java | 1 - .../facebook/presto/execution/SqlTaskExecutionFactory.java | 1 - .../java/com/facebook/presto/execution/SqlTaskManager.java | 1 - .../main/java/com/facebook/presto/execution/TaskManager.java | 1 - .../java/com/facebook/presto/{ => execution}/TaskSource.java | 4 +--- .../src/main/java/com/facebook/presto/operator/Driver.java | 2 +- .../java/com/facebook/presto/operator/index/IndexLoader.java | 2 +- .../java/com/facebook/presto/server/TaskUpdateRequest.java | 2 +- .../com/facebook/presto/server/remotetask/HttpRemoteTask.java | 2 +- .../java/com/facebook/presto/testing/LocalQueryRunner.java | 2 +- .../java/com/facebook/presto/execution/TaskTestUtils.java | 1 - .../test/java/com/facebook/presto/execution/TestSqlTask.java | 1 - .../com/facebook/presto/execution/TestSqlTaskExecution.java | 1 - .../com/facebook/presto/execution/TestSqlTaskManager.java | 1 - .../com/facebook/presto/memory/TestSystemMemoryBlocking.java | 2 +- .../test/java/com/facebook/presto/operator/TestDriver.java | 2 +- .../facebook/presto/server/remotetask/TestHttpRemoteTask.java | 2 +- 18 files changed, 9 insertions(+), 20 deletions(-) rename presto-main/src/main/java/com/facebook/presto/{ => execution}/TaskSource.java (97%) diff --git a/presto-main/src/main/java/com/facebook/presto/execution/SqlTask.java b/presto-main/src/main/java/com/facebook/presto/execution/SqlTask.java index cf5c5cc3bd11..1e379ceb0651 100644 --- a/presto-main/src/main/java/com/facebook/presto/execution/SqlTask.java +++ b/presto-main/src/main/java/com/facebook/presto/execution/SqlTask.java @@ -14,7 +14,6 @@ package com.facebook.presto.execution; import com.facebook.presto.Session; -import com.facebook.presto.TaskSource; import com.facebook.presto.execution.StateMachine.StateChangeListener; import com.facebook.presto.execution.buffer.BufferResult; import com.facebook.presto.execution.buffer.LazyOutputBuffer; diff --git a/presto-main/src/main/java/com/facebook/presto/execution/SqlTaskExecution.java b/presto-main/src/main/java/com/facebook/presto/execution/SqlTaskExecution.java index 8d920c05ed89..b1fab413a56e 100644 --- a/presto-main/src/main/java/com/facebook/presto/execution/SqlTaskExecution.java +++ b/presto-main/src/main/java/com/facebook/presto/execution/SqlTaskExecution.java @@ -13,7 +13,6 @@ */ package com.facebook.presto.execution; -import com.facebook.presto.TaskSource; import com.facebook.presto.event.SplitMonitor; import com.facebook.presto.execution.StateMachine.StateChangeListener; import com.facebook.presto.execution.buffer.BufferState; diff --git a/presto-main/src/main/java/com/facebook/presto/execution/SqlTaskExecutionFactory.java b/presto-main/src/main/java/com/facebook/presto/execution/SqlTaskExecutionFactory.java index bb2a0fce0463..b1ee7b9dfe3d 100644 --- a/presto-main/src/main/java/com/facebook/presto/execution/SqlTaskExecutionFactory.java +++ b/presto-main/src/main/java/com/facebook/presto/execution/SqlTaskExecutionFactory.java @@ -14,7 +14,6 @@ package com.facebook.presto.execution; import com.facebook.presto.Session; -import com.facebook.presto.TaskSource; import com.facebook.presto.event.SplitMonitor; import com.facebook.presto.execution.buffer.OutputBuffer; import com.facebook.presto.execution.executor.TaskExecutor; diff --git a/presto-main/src/main/java/com/facebook/presto/execution/SqlTaskManager.java b/presto-main/src/main/java/com/facebook/presto/execution/SqlTaskManager.java index 3645a29e15ae..892f952cc1ae 100644 --- a/presto-main/src/main/java/com/facebook/presto/execution/SqlTaskManager.java +++ b/presto-main/src/main/java/com/facebook/presto/execution/SqlTaskManager.java @@ -14,7 +14,6 @@ package com.facebook.presto.execution; import com.facebook.presto.Session; -import com.facebook.presto.TaskSource; import com.facebook.presto.event.SplitMonitor; import com.facebook.presto.execution.StateMachine.StateChangeListener; import com.facebook.presto.execution.buffer.BufferResult; diff --git a/presto-main/src/main/java/com/facebook/presto/execution/TaskManager.java b/presto-main/src/main/java/com/facebook/presto/execution/TaskManager.java index 204ccc0409c3..b2f0f0634e3b 100644 --- a/presto-main/src/main/java/com/facebook/presto/execution/TaskManager.java +++ b/presto-main/src/main/java/com/facebook/presto/execution/TaskManager.java @@ -14,7 +14,6 @@ package com.facebook.presto.execution; import com.facebook.presto.Session; -import com.facebook.presto.TaskSource; import com.facebook.presto.execution.StateMachine.StateChangeListener; import com.facebook.presto.execution.buffer.BufferResult; import com.facebook.presto.execution.buffer.OutputBuffers; diff --git a/presto-main/src/main/java/com/facebook/presto/TaskSource.java b/presto-main/src/main/java/com/facebook/presto/execution/TaskSource.java similarity index 97% rename from presto-main/src/main/java/com/facebook/presto/TaskSource.java rename to presto-main/src/main/java/com/facebook/presto/execution/TaskSource.java index 9bd4256aee61..7fa2afb04f63 100644 --- a/presto-main/src/main/java/com/facebook/presto/TaskSource.java +++ b/presto-main/src/main/java/com/facebook/presto/execution/TaskSource.java @@ -11,10 +11,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.facebook.presto; +package com.facebook.presto.execution; -import com.facebook.presto.execution.Lifespan; -import com.facebook.presto.execution.ScheduledSplit; import com.facebook.presto.sql.planner.plan.PlanNodeId; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/presto-main/src/main/java/com/facebook/presto/operator/Driver.java b/presto-main/src/main/java/com/facebook/presto/operator/Driver.java index 181c8e0c7b92..06ddc58cb3dd 100644 --- a/presto-main/src/main/java/com/facebook/presto/operator/Driver.java +++ b/presto-main/src/main/java/com/facebook/presto/operator/Driver.java @@ -13,8 +13,8 @@ */ package com.facebook.presto.operator; -import com.facebook.presto.TaskSource; import com.facebook.presto.execution.ScheduledSplit; +import com.facebook.presto.execution.TaskSource; import com.facebook.presto.metadata.Split; import com.facebook.presto.spi.Page; import com.facebook.presto.spi.PrestoException; diff --git a/presto-main/src/main/java/com/facebook/presto/operator/index/IndexLoader.java b/presto-main/src/main/java/com/facebook/presto/operator/index/IndexLoader.java index fe0d12fb9b24..49245db047ed 100644 --- a/presto-main/src/main/java/com/facebook/presto/operator/index/IndexLoader.java +++ b/presto-main/src/main/java/com/facebook/presto/operator/index/IndexLoader.java @@ -13,9 +13,9 @@ */ package com.facebook.presto.operator.index; -import com.facebook.presto.TaskSource; import com.facebook.presto.connector.ConnectorId; import com.facebook.presto.execution.ScheduledSplit; +import com.facebook.presto.execution.TaskSource; import com.facebook.presto.metadata.Split; import com.facebook.presto.operator.Driver; import com.facebook.presto.operator.DriverFactory; diff --git a/presto-main/src/main/java/com/facebook/presto/server/TaskUpdateRequest.java b/presto-main/src/main/java/com/facebook/presto/server/TaskUpdateRequest.java index 4a783144c755..925f7a234de3 100644 --- a/presto-main/src/main/java/com/facebook/presto/server/TaskUpdateRequest.java +++ b/presto-main/src/main/java/com/facebook/presto/server/TaskUpdateRequest.java @@ -14,7 +14,7 @@ package com.facebook.presto.server; import com.facebook.presto.SessionRepresentation; -import com.facebook.presto.TaskSource; +import com.facebook.presto.execution.TaskSource; import com.facebook.presto.execution.buffer.OutputBuffers; import com.facebook.presto.sql.planner.PlanFragment; import com.fasterxml.jackson.annotation.JsonCreator; diff --git a/presto-main/src/main/java/com/facebook/presto/server/remotetask/HttpRemoteTask.java b/presto-main/src/main/java/com/facebook/presto/server/remotetask/HttpRemoteTask.java index 52d97e5878ec..0a939d96ba53 100644 --- a/presto-main/src/main/java/com/facebook/presto/server/remotetask/HttpRemoteTask.java +++ b/presto-main/src/main/java/com/facebook/presto/server/remotetask/HttpRemoteTask.java @@ -14,7 +14,6 @@ package com.facebook.presto.server.remotetask; import com.facebook.presto.Session; -import com.facebook.presto.TaskSource; import com.facebook.presto.execution.FutureStateChange; import com.facebook.presto.execution.Lifespan; import com.facebook.presto.execution.NodeTaskMap.PartitionedSplitCountTracker; @@ -23,6 +22,7 @@ import com.facebook.presto.execution.StateMachine.StateChangeListener; import com.facebook.presto.execution.TaskId; import com.facebook.presto.execution.TaskInfo; +import com.facebook.presto.execution.TaskSource; import com.facebook.presto.execution.TaskState; import com.facebook.presto.execution.TaskStatus; import com.facebook.presto.execution.buffer.BufferInfo; diff --git a/presto-main/src/main/java/com/facebook/presto/testing/LocalQueryRunner.java b/presto-main/src/main/java/com/facebook/presto/testing/LocalQueryRunner.java index 01cf8fbc95bd..806c3c6f1644 100644 --- a/presto-main/src/main/java/com/facebook/presto/testing/LocalQueryRunner.java +++ b/presto-main/src/main/java/com/facebook/presto/testing/LocalQueryRunner.java @@ -17,7 +17,6 @@ import com.facebook.presto.PagesIndexPageSorter; import com.facebook.presto.Session; import com.facebook.presto.SystemSessionProperties; -import com.facebook.presto.TaskSource; import com.facebook.presto.block.BlockEncodingManager; import com.facebook.presto.connector.ConnectorId; import com.facebook.presto.connector.ConnectorManager; @@ -58,6 +57,7 @@ import com.facebook.presto.execution.SetSessionTask; import com.facebook.presto.execution.StartTransactionTask; import com.facebook.presto.execution.TaskManagerConfig; +import com.facebook.presto.execution.TaskSource; import com.facebook.presto.execution.resourceGroups.NoOpResourceGroupManager; import com.facebook.presto.execution.scheduler.LegacyNetworkTopology; import com.facebook.presto.execution.scheduler.NodeScheduler; diff --git a/presto-main/src/test/java/com/facebook/presto/execution/TaskTestUtils.java b/presto-main/src/test/java/com/facebook/presto/execution/TaskTestUtils.java index 38213bf1055b..0c358a5357f9 100644 --- a/presto-main/src/test/java/com/facebook/presto/execution/TaskTestUtils.java +++ b/presto-main/src/test/java/com/facebook/presto/execution/TaskTestUtils.java @@ -13,7 +13,6 @@ */ package com.facebook.presto.execution; -import com.facebook.presto.TaskSource; import com.facebook.presto.block.BlockEncodingManager; import com.facebook.presto.connector.ConnectorId; import com.facebook.presto.cost.StatsAndCosts; diff --git a/presto-main/src/test/java/com/facebook/presto/execution/TestSqlTask.java b/presto-main/src/test/java/com/facebook/presto/execution/TestSqlTask.java index b8134715aed7..c5daed10865c 100644 --- a/presto-main/src/test/java/com/facebook/presto/execution/TestSqlTask.java +++ b/presto-main/src/test/java/com/facebook/presto/execution/TestSqlTask.java @@ -13,7 +13,6 @@ */ package com.facebook.presto.execution; -import com.facebook.presto.TaskSource; import com.facebook.presto.execution.buffer.BufferResult; import com.facebook.presto.execution.buffer.BufferState; import com.facebook.presto.execution.buffer.OutputBuffers; diff --git a/presto-main/src/test/java/com/facebook/presto/execution/TestSqlTaskExecution.java b/presto-main/src/test/java/com/facebook/presto/execution/TestSqlTaskExecution.java index c23d46d55388..c0618064246a 100644 --- a/presto-main/src/test/java/com/facebook/presto/execution/TestSqlTaskExecution.java +++ b/presto-main/src/test/java/com/facebook/presto/execution/TestSqlTaskExecution.java @@ -13,7 +13,6 @@ */ package com.facebook.presto.execution; -import com.facebook.presto.TaskSource; import com.facebook.presto.block.BlockEncodingManager; import com.facebook.presto.connector.ConnectorId; import com.facebook.presto.execution.buffer.BufferResult; diff --git a/presto-main/src/test/java/com/facebook/presto/execution/TestSqlTaskManager.java b/presto-main/src/test/java/com/facebook/presto/execution/TestSqlTaskManager.java index 09d6f67cae6c..3ef74ababccb 100644 --- a/presto-main/src/test/java/com/facebook/presto/execution/TestSqlTaskManager.java +++ b/presto-main/src/test/java/com/facebook/presto/execution/TestSqlTaskManager.java @@ -13,7 +13,6 @@ */ package com.facebook.presto.execution; -import com.facebook.presto.TaskSource; import com.facebook.presto.execution.buffer.BufferResult; import com.facebook.presto.execution.buffer.BufferState; import com.facebook.presto.execution.buffer.OutputBuffers; diff --git a/presto-main/src/test/java/com/facebook/presto/memory/TestSystemMemoryBlocking.java b/presto-main/src/test/java/com/facebook/presto/memory/TestSystemMemoryBlocking.java index 07a1e241292b..2d1def9573f6 100644 --- a/presto-main/src/test/java/com/facebook/presto/memory/TestSystemMemoryBlocking.java +++ b/presto-main/src/test/java/com/facebook/presto/memory/TestSystemMemoryBlocking.java @@ -13,9 +13,9 @@ */ package com.facebook.presto.memory; -import com.facebook.presto.TaskSource; import com.facebook.presto.connector.ConnectorId; import com.facebook.presto.execution.ScheduledSplit; +import com.facebook.presto.execution.TaskSource; import com.facebook.presto.metadata.Split; import com.facebook.presto.operator.Driver; import com.facebook.presto.operator.DriverContext; diff --git a/presto-main/src/test/java/com/facebook/presto/operator/TestDriver.java b/presto-main/src/test/java/com/facebook/presto/operator/TestDriver.java index 31f0411b3703..dbbab019a52d 100644 --- a/presto-main/src/test/java/com/facebook/presto/operator/TestDriver.java +++ b/presto-main/src/test/java/com/facebook/presto/operator/TestDriver.java @@ -14,9 +14,9 @@ package com.facebook.presto.operator; import com.facebook.presto.Session; -import com.facebook.presto.TaskSource; import com.facebook.presto.connector.ConnectorId; import com.facebook.presto.execution.ScheduledSplit; +import com.facebook.presto.execution.TaskSource; import com.facebook.presto.memory.context.LocalMemoryContext; import com.facebook.presto.metadata.Split; import com.facebook.presto.spi.ColumnHandle; diff --git a/presto-main/src/test/java/com/facebook/presto/server/remotetask/TestHttpRemoteTask.java b/presto-main/src/test/java/com/facebook/presto/server/remotetask/TestHttpRemoteTask.java index 0ba105666272..02bed204852d 100644 --- a/presto-main/src/test/java/com/facebook/presto/server/remotetask/TestHttpRemoteTask.java +++ b/presto-main/src/test/java/com/facebook/presto/server/remotetask/TestHttpRemoteTask.java @@ -13,7 +13,6 @@ */ package com.facebook.presto.server.remotetask; -import com.facebook.presto.TaskSource; import com.facebook.presto.client.NodeVersion; import com.facebook.presto.connector.ConnectorId; import com.facebook.presto.execution.Lifespan; @@ -23,6 +22,7 @@ import com.facebook.presto.execution.TaskId; import com.facebook.presto.execution.TaskInfo; import com.facebook.presto.execution.TaskManagerConfig; +import com.facebook.presto.execution.TaskSource; import com.facebook.presto.execution.TaskState; import com.facebook.presto.execution.TaskStatus; import com.facebook.presto.execution.TaskTestUtils;