public class HiveLocationService extends Object implements LocationService
LocationService.WriteInfo| Constructor and Description |
|---|
HiveLocationService(HdfsEnvironment hdfsEnvironment) |
| Modifier and Type | Method and Description |
|---|---|
LocationHandle |
forExistingTable(SemiTransactionalHiveMetastore metastore,
ConnectorSession session,
Table table) |
LocationHandle |
forNewTable(SemiTransactionalHiveMetastore metastore,
ConnectorSession session,
String schemaName,
String tableName) |
LocationService.WriteInfo |
getPartitionWriteInfo(LocationHandle locationHandle,
Optional<Partition> partition,
String partitionName)
If
partition is present, returns WriteInfo for appending existing partition;
otherwise, returns WriteInfo for writing new partition or overwriting existing partition. |
LocationService.WriteInfo |
getQueryWriteInfo(LocationHandle locationHandle)
targetPath and writePath will be root directory of all partition and table paths
that may be returned by
LocationService.getTableWriteInfo(LocationHandle, boolean) and LocationService.getPartitionWriteInfo(LocationHandle, Optional, String) method. |
LocationService.WriteInfo |
getTableWriteInfo(LocationHandle locationHandle,
boolean overwrite) |
@Inject public HiveLocationService(HdfsEnvironment hdfsEnvironment)
public LocationHandle forNewTable(SemiTransactionalHiveMetastore metastore, ConnectorSession session, String schemaName, String tableName)
forNewTable in interface LocationServicepublic LocationHandle forExistingTable(SemiTransactionalHiveMetastore metastore, ConnectorSession session, Table table)
forExistingTable in interface LocationServicepublic LocationService.WriteInfo getQueryWriteInfo(LocationHandle locationHandle)
LocationServiceLocationService.getTableWriteInfo(LocationHandle, boolean) and LocationService.getPartitionWriteInfo(LocationHandle, Optional, String) method.getQueryWriteInfo in interface LocationServicepublic LocationService.WriteInfo getTableWriteInfo(LocationHandle locationHandle, boolean overwrite)
getTableWriteInfo in interface LocationServicepublic LocationService.WriteInfo getPartitionWriteInfo(LocationHandle locationHandle, Optional<Partition> partition, String partitionName)
LocationServicepartition is present, returns WriteInfo for appending existing partition;
otherwise, returns WriteInfo for writing new partition or overwriting existing partition.getPartitionWriteInfo in interface LocationServiceCopyright © 2012–2020. All rights reserved.