K - the key type of its partitions.@ThreadSafe public final class RemoteFileMetadata<K extends Serializable> extends FileMetadata<K>
| Modifier and Type | Method and Description |
|---|---|
void |
commitBlock()
Write the collected
PartitionMetadatas to the metadata file. |
static <T extends Serializable> |
create(String metaFilePath)
Creates a new block metadata.
|
void |
deleteMetadata()
Deletes the metadata.
|
static <T extends Serializable> |
open(String metaFilePath)
Opens a existing block metadata in file.
|
getPartitionMetadataIterable, setCommitted, writePartitionMetadatapublic void deleteMetadata()
throws IOException
FileMetadatadeleteMetadata in class FileMetadata<K extends Serializable>IOException - if fail to delete.FileMetadata.deleteMetadata()public void commitBlock()
throws IOException
PartitionMetadatas to the metadata file.
Notifies that all writes are finished for the block corresponding to this metadata.commitBlock in class FileMetadata<K extends Serializable>IOException - if fail to commit.public static <T extends Serializable> RemoteFileMetadata<T> create(String metaFilePath)
T - the key type of the block's partitions.metaFilePath - the path of the file to write metadata.public static <T extends Serializable> RemoteFileMetadata<T> open(String metaFilePath) throws IOException
T - the key type of the block's partitions.metaFilePath - the path of the file to write metadata.IOException - if fail to open.Copyright © 2018. All rights reserved.