Package org.apache.wayang.jdbc.execution
Class JdbcExecutor
- java.lang.Object
-
- org.apache.wayang.core.util.AbstractReferenceCountable
-
- org.apache.wayang.core.platform.ExecutorTemplate
-
- org.apache.wayang.jdbc.execution.JdbcExecutor
-
- All Implemented Interfaces:
CompositeExecutionResource
,ExecutionResource
,Executor
,ReferenceCountable
public class JdbcExecutor extends ExecutorTemplate
Executor
implementation for theJdbcPlatformTemplate
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.wayang.core.platform.Executor
Executor.Factory
-
-
Constructor Summary
Constructors Constructor Description JdbcExecutor(JdbcPlatformTemplate platform, Job job)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
createSqlQuery(java.lang.String tableName, java.util.Collection<java.lang.String> conditions, java.lang.String projection, java.util.Collection<java.lang.String> joins)
Creates a SQL query.void
dispose()
Releases any instances acquired by this instance to executeExecutionStage
s.void
execute(ExecutionStage stage, OptimizationContext optimizationContext, ExecutionState executionState)
Executes the givenstage
.Platform
getPlatform()
-
Methods inherited from class org.apache.wayang.core.platform.ExecutorTemplate
createPartialExecution, disposeUnreferenced, getConfiguration, getCrossPlatformExecutor, register, registerMeasuredCardinalities, registerMeasuredCardinality, toString, unregister
-
Methods inherited from class org.apache.wayang.core.util.AbstractReferenceCountable
disposeIfUnreferenced, getNumReferences, isDisposed, noteDiscardedReference, noteObtainedReference
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.wayang.core.util.ReferenceCountable
disposeIfUnreferenced, getNumReferences, isDisposed, noteDiscardedReference, noteObtainedReference
-
-
-
-
Constructor Detail
-
JdbcExecutor
public JdbcExecutor(JdbcPlatformTemplate platform, Job job)
-
-
Method Detail
-
execute
public void execute(ExecutionStage stage, OptimizationContext optimizationContext, ExecutionState executionState)
Description copied from interface:Executor
Executes the givenstage
.- Parameters:
stage
- should be executed; must be executable by this instance, thoughexecutionState
- provides and accepts execution-related objects @return collected metadata from instrumentation
-
createSqlQuery
protected java.lang.String createSqlQuery(java.lang.String tableName, java.util.Collection<java.lang.String> conditions, java.lang.String projection, java.util.Collection<java.lang.String> joins)
Creates a SQL query.- Parameters:
tableName
- the table to be queriedconditions
- conditions for theWHERE
clauseprojection
- projection for theSELECT
clausejoins
- join clauses for multipleJOIN
clauses- Returns:
- the SQL query
-
dispose
public void dispose()
Description copied from interface:Executor
Releases any instances acquired by this instance to executeExecutionStage
s.- Specified by:
dispose
in interfaceExecutionResource
- Specified by:
dispose
in interfaceExecutor
- Overrides:
dispose
in classExecutorTemplate
-
-