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(HoodieStorage storage,
StoragePath partitionPath)
Construct metadata from existing partition.
|
HoodiePartitionMetadata(HoodieStorage storage,
String instantTime,
StoragePath basePath,
StoragePath partitionPath,
Option<HoodieFileFormat> format)
Construct metadata object to be written out.
|
| Modifier and Type | Method and Description |
|---|---|
static Option<StoragePath> |
baseFormatMetaPathIfExists(HoodieStorage storage,
StoragePath partitionPath) |
int |
getPartitionDepth() |
static Option<StoragePath> |
getPartitionMetafilePath(HoodieStorage storage,
StoragePath partitionPath)
Returns the name of the partition metadata.
|
static boolean |
hasPartitionMetadata(HoodieStorage storage,
StoragePath 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<StoragePath> |
textFormatMetaPathIfExists(HoodieStorage storage,
StoragePath partitionPath) |
void |
trySave()
Write the metadata safely into partition atomically.
|
public static final String HOODIE_PARTITION_METAFILE_PREFIX
public static final String COMMIT_TIME_KEY
public HoodiePartitionMetadata(HoodieStorage storage, StoragePath partitionPath)
public HoodiePartitionMetadata(HoodieStorage storage, String instantTime, StoragePath basePath, StoragePath partitionPath, Option<HoodieFileFormat> format)
public int getPartitionDepth()
public void trySave()
throws HoodieIOException
HoodieIOExceptionpublic void readFromFS()
throws IOException
IOExceptionpublic Option<String> readPartitionCreatedCommitTime()
public static boolean hasPartitionMetadata(HoodieStorage storage, StoragePath partitionPath)
public static Option<StoragePath> getPartitionMetafilePath(HoodieStorage storage, StoragePath partitionPath)
public static Option<StoragePath> baseFormatMetaPathIfExists(HoodieStorage storage, StoragePath partitionPath) throws IOException
IOExceptionpublic static Option<StoragePath> textFormatMetaPathIfExists(HoodieStorage storage, StoragePath partitionPath) throws IOException
IOExceptionCopyright © 2024 The Apache Software Foundation. All rights reserved.