Package io.trino.testing
Class DistributedQueryRunner
- java.lang.Object
-
- io.trino.testing.DistributedQueryRunner
-
- All Implemented Interfaces:
QueryRunner,Closeable,AutoCloseable
public class DistributedQueryRunner extends Object implements QueryRunner
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDistributedQueryRunner.Builder<SELF extends DistributedQueryRunner.Builder<?>>-
Nested classes/interfaces inherited from interface io.trino.testing.QueryRunner
QueryRunner.MaterializedResultWithPlan
-
-
Method Summary
-
-
-
Method Detail
-
builder
public static DistributedQueryRunner.Builder<?> builder(Session defaultSession)
-
getClient
public TestingTrinoClient getClient()
-
getNodeCount
public int getNodeCount()
- Specified by:
getNodeCountin interfaceQueryRunner
-
getDefaultSession
public Session getDefaultSession()
- Specified by:
getDefaultSessionin interfaceQueryRunner
-
getTransactionManager
public TransactionManager getTransactionManager()
- Specified by:
getTransactionManagerin interfaceQueryRunner
-
getMetadata
public Metadata getMetadata()
- Specified by:
getMetadatain interfaceQueryRunner
-
getTypeManager
public TypeManager getTypeManager()
- Specified by:
getTypeManagerin interfaceQueryRunner
-
getQueryExplainer
public QueryExplainer getQueryExplainer()
- Specified by:
getQueryExplainerin interfaceQueryRunner
-
getSessionPropertyManager
public SessionPropertyManager getSessionPropertyManager()
- Specified by:
getSessionPropertyManagerin interfaceQueryRunner
-
getFunctionManager
public FunctionManager getFunctionManager()
- Specified by:
getFunctionManagerin interfaceQueryRunner
-
getSplitManager
public SplitManager getSplitManager()
- Specified by:
getSplitManagerin interfaceQueryRunner
-
getPageSourceManager
public PageSourceManager getPageSourceManager()
- Specified by:
getPageSourceManagerin interfaceQueryRunner
-
getNodePartitioningManager
public NodePartitioningManager getNodePartitioningManager()
- Specified by:
getNodePartitioningManagerin interfaceQueryRunner
-
getStatsCalculator
public StatsCalculator getStatsCalculator()
- Specified by:
getStatsCalculatorin interfaceQueryRunner
-
getAccessControl
public TestingAccessControlManager getAccessControl()
- Specified by:
getAccessControlin interfaceQueryRunner
-
getGroupProvider
public TestingGroupProvider getGroupProvider()
- Specified by:
getGroupProviderin interfaceQueryRunner
-
getSessionPropertyDefaults
public SessionPropertyDefaults getSessionPropertyDefaults()
-
getCoordinator
public TestingTrinoServer getCoordinator()
-
getBackupCoordinator
public Optional<TestingTrinoServer> getBackupCoordinator()
-
getServers
public List<TestingTrinoServer> getServers()
-
installPlugin
public void installPlugin(Plugin plugin)
- Specified by:
installPluginin interfaceQueryRunner
-
addFunctions
public void addFunctions(FunctionBundle functionBundle)
- Specified by:
addFunctionsin interfaceQueryRunner
-
createCatalog
public void createCatalog(String catalogName, String connectorName, Map<String,String> properties)
- Specified by:
createCatalogin interfaceQueryRunner
-
listTables
public List<QualifiedObjectName> listTables(Session session, String catalog, String schema)
- Specified by:
listTablesin interfaceQueryRunner
-
tableExists
public boolean tableExists(Session session, String table)
- Specified by:
tableExistsin interfaceQueryRunner
-
execute
public MaterializedResult execute(String sql)
- Specified by:
executein interfaceQueryRunner
-
execute
public MaterializedResult execute(Session session, String sql)
- Specified by:
executein interfaceQueryRunner
-
executeWithQueryId
public ResultWithQueryId<MaterializedResult> executeWithQueryId(Session session, String sql)
-
executeWithPlan
public QueryRunner.MaterializedResultWithPlan executeWithPlan(Session session, String sql, WarningCollector warningCollector)
- Specified by:
executeWithPlanin interfaceQueryRunner
-
createPlan
public Plan createPlan(Session session, String sql, WarningCollector warningCollector)
- Specified by:
createPlanin interfaceQueryRunner
-
getExclusiveLock
public Lock getExclusiveLock()
- Specified by:
getExclusiveLockin interfaceQueryRunner
-
injectTaskFailure
public void injectTaskFailure(String traceToken, int stageId, int partitionId, int attemptId, FailureInjector.InjectedFailureType injectionType, Optional<ErrorType> errorType)
- Specified by:
injectTaskFailurein interfaceQueryRunner
-
loadExchangeManager
public void loadExchangeManager(String name, Map<String,String> properties)
- Specified by:
loadExchangeManagerin interfaceQueryRunner
-
close
public final void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceQueryRunner
-
-