public class HoodiePartitionMetadata extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
COMMIT_TIME_KEY |
static String |
HOODIE_PARTITION_METAFILE_PREFIX |
| Constructor and Description |
|---|
HoodiePartitionMetadata(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path partitionPath)
Construct metadata from existing partition.
|
HoodiePartitionMetadata(org.apache.hadoop.fs.FileSystem fs,
String instantTime,
org.apache.hadoop.fs.Path basePath,
org.apache.hadoop.fs.Path partitionPath,
Option<HoodieFileFormat> format)
Construct metadata object to be written out.
|
| Modifier and Type | Method and Description |
|---|---|
static Option<org.apache.hadoop.fs.Path> |
baseFormatMetaPathIfExists(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path partitionPath) |
int |
getPartitionDepth() |
static Option<org.apache.hadoop.fs.Path> |
getPartitionMetafilePath(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path partitionPath)
Returns the name of the partition metadata.
|
static boolean |
hasPartitionMetadata(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path partitionPath) |
void |
readFromFS()
Read out the metadata for this partition.
|
Option<String> |
readPartitionCreatedCommitTime()
Read out the COMMIT_TIME_KEY metadata for this partition.
|
static Option<org.apache.hadoop.fs.Path> |
textFormatMetaPathIfExists(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path partitionPath) |
void |
trySave(int taskPartitionId)
Write the metadata safely into partition atomically.
|
public static final String HOODIE_PARTITION_METAFILE_PREFIX
public static final String COMMIT_TIME_KEY
public HoodiePartitionMetadata(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path partitionPath)
public HoodiePartitionMetadata(org.apache.hadoop.fs.FileSystem fs,
String instantTime,
org.apache.hadoop.fs.Path basePath,
org.apache.hadoop.fs.Path partitionPath,
Option<HoodieFileFormat> format)
public int getPartitionDepth()
public void trySave(int taskPartitionId)
public void readFromFS()
throws IOException
IOExceptionpublic Option<String> readPartitionCreatedCommitTime()
public static boolean hasPartitionMetadata(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path partitionPath)
public static Option<org.apache.hadoop.fs.Path> getPartitionMetafilePath(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path partitionPath)
public static Option<org.apache.hadoop.fs.Path> baseFormatMetaPathIfExists(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path partitionPath) throws IOException
IOExceptionpublic static Option<org.apache.hadoop.fs.Path> textFormatMetaPathIfExists(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path partitionPath) throws IOException
IOExceptionCopyright © 2022 The Apache Software Foundation. All rights reserved.