public class HiveLocationService extends Object implements LocationService
| 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) |
org.apache.hadoop.fs.Path |
targetPath(LocationHandle locationHandle,
Optional<String> partitionName)
Target path for the specified new partition (or unpartitioned table).
|
org.apache.hadoop.fs.Path |
targetPath(LocationHandle locationHandle,
Partition partition,
String partitionName)
Target path for the specified existing partition.
|
org.apache.hadoop.fs.Path |
targetPathRoot(LocationHandle locationHandle)
Root directory of all paths that may be returned by targetPath.
|
Optional<org.apache.hadoop.fs.Path> |
writePath(LocationHandle locationHandle,
Optional<String> partitionName)
Temporary path for writing to the specified partition (or unpartitioned table).
|
Optional<org.apache.hadoop.fs.Path> |
writePathRoot(LocationHandle locationHandle)
Root directory of all paths that may be returned by writePath.
|
@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 org.apache.hadoop.fs.Path targetPath(LocationHandle locationHandle, Partition partition, String partitionName)
LocationServicetargetPath in interface LocationServicepublic org.apache.hadoop.fs.Path targetPath(LocationHandle locationHandle, Optional<String> partitionName)
LocationServicetargetPath in interface LocationServicepublic org.apache.hadoop.fs.Path targetPathRoot(LocationHandle locationHandle)
LocationServicetargetPathRoot in interface LocationServicepublic Optional<org.apache.hadoop.fs.Path> writePath(LocationHandle locationHandle, Optional<String> partitionName)
LocationServiceWhen temporary path is not to be used, this function may return an empty Optional or a path same as the one returned from targetPath. When it is empty, special cleanups need to be carried out. Otherwise, it is not necessary.
A non-empty write path is required for new tables. However, it may be the same as targetPath.
writePath in interface LocationServicepublic Optional<org.apache.hadoop.fs.Path> writePathRoot(LocationHandle locationHandle)
LocationServicewritePathRoot in interface LocationServiceCopyright © 2012-2017. All Rights Reserved.