Package io.trino.plugin.hive
Class HiveLocationService
- java.lang.Object
-
- io.trino.plugin.hive.HiveLocationService
-
- All Implemented Interfaces:
LocationService
public class HiveLocationService extends Object implements LocationService
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.trino.plugin.hive.LocationService
LocationService.WriteInfo
-
-
Constructor Summary
Constructors Constructor Description HiveLocationService(HdfsEnvironment hdfsEnvironment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LocationHandleforExistingTable(SemiTransactionalHiveMetastore metastore, ConnectorSession session, Table table)LocationHandleforNewTable(SemiTransactionalHiveMetastore metastore, ConnectorSession session, String schemaName, String tableName, Optional<org.apache.hadoop.fs.Path> externalLocation)LocationService.WriteInfogetPartitionWriteInfo(LocationHandle locationHandle, Optional<Partition> partition, String partitionName)Ifpartitionis present, returnsWriteInfofor appending existing partition; otherwise, returnsWriteInfofor writing new partition or overwriting existing partition.LocationService.WriteInfogetQueryWriteInfo(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.LocationService.WriteInfogetTableWriteInfo(LocationHandle locationHandle, boolean overwrite)
-
-
-
Constructor Detail
-
HiveLocationService
@Inject public HiveLocationService(HdfsEnvironment hdfsEnvironment)
-
-
Method Detail
-
forNewTable
public LocationHandle forNewTable(SemiTransactionalHiveMetastore metastore, ConnectorSession session, String schemaName, String tableName, Optional<org.apache.hadoop.fs.Path> externalLocation)
- Specified by:
forNewTablein interfaceLocationService
-
forExistingTable
public LocationHandle forExistingTable(SemiTransactionalHiveMetastore metastore, ConnectorSession session, Table table)
- Specified by:
forExistingTablein interfaceLocationService
-
getQueryWriteInfo
public LocationService.WriteInfo getQueryWriteInfo(LocationHandle locationHandle)
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
-
-