Class HiveLocationService
java.lang.Object
io.trino.plugin.hive.HiveLocationService
- All Implemented Interfaces:
LocationService
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.trino.plugin.hive.LocationService
LocationService.WriteInfo -
Constructor Summary
ConstructorsConstructorDescriptionHiveLocationService(TrinoFileSystemFactory fileSystemFactory, HiveConfig hiveConfig) -
Method Summary
Modifier and TypeMethodDescriptionforExistingTable(SemiTransactionalHiveMetastore metastore, ConnectorSession session, Table table) forNewTable(SemiTransactionalHiveMetastore metastore, ConnectorSession session, String schemaName, String tableName) forNewTableAsSelect(SemiTransactionalHiveMetastore metastore, ConnectorSession session, String schemaName, String tableName, Optional<Location> externalLocation) forOptimize(SemiTransactionalHiveMetastore metastore, ConnectorSession session, Table table) getPartitionWriteInfo(LocationHandle locationHandle, Optional<Partition> partition, String partitionName) Ifpartitionis present, returnsWriteInfofor appending existing partition; otherwise, returnsWriteInfofor writing new partition or overwriting existing partition.getQueryWriteInfo(LocationHandle locationHandle) targetPath and writePath will be root directory of all partition and table paths that may be returned byLocationService.getTableWriteInfo(LocationHandle, boolean)andLocationService.getPartitionWriteInfo(LocationHandle, Optional, String)method.getTableWriteInfo(LocationHandle locationHandle, boolean overwrite)
-
Constructor Details
-
HiveLocationService
-
-
Method Details
-
forNewTable
public Location forNewTable(SemiTransactionalHiveMetastore metastore, ConnectorSession session, String schemaName, String tableName) - Specified by:
forNewTablein interfaceLocationService
-
forNewTableAsSelect
public LocationHandle forNewTableAsSelect(SemiTransactionalHiveMetastore metastore, ConnectorSession session, String schemaName, String tableName, Optional<Location> externalLocation) - Specified by:
forNewTableAsSelectin interfaceLocationService
-
forExistingTable
public LocationHandle forExistingTable(SemiTransactionalHiveMetastore metastore, ConnectorSession session, Table table) - Specified by:
forExistingTablein interfaceLocationService
-
forOptimize
public LocationHandle forOptimize(SemiTransactionalHiveMetastore metastore, ConnectorSession session, Table table) - Specified by:
forOptimizein interfaceLocationService
-
getQueryWriteInfo
Description copied from interface:LocationServicetargetPath and writePath will be root directory of all partition and table paths that may be returned byLocationService.getTableWriteInfo(LocationHandle, boolean)andLocationService.getPartitionWriteInfo(LocationHandle, Optional, String)method.- Specified by:
getQueryWriteInfoin interfaceLocationService
-
getTableWriteInfo
public LocationService.WriteInfo getTableWriteInfo(LocationHandle locationHandle, boolean overwrite) - Specified by:
getTableWriteInfoin interfaceLocationService
-
getPartitionWriteInfo
public LocationService.WriteInfo getPartitionWriteInfo(LocationHandle locationHandle, Optional<Partition> partition, String partitionName) Description copied from interface:LocationServiceIfpartitionis present, returnsWriteInfofor appending existing partition; otherwise, returnsWriteInfofor writing new partition or overwriting existing partition.- Specified by:
getPartitionWriteInfoin interfaceLocationService
-