public class HoodieConsistentHashingMetadata extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected List<ConsistentHashingNode> |
childrenNodes |
static int |
HASH_VALUE_MASK
Upper-bound of the hash value
|
static String |
HASHING_METADATA_COMMIT_FILE_SUFFIX |
static String |
HASHING_METADATA_FILE_SUFFIX |
| Constructor and Description |
|---|
HoodieConsistentHashingMetadata(short version,
String partitionPath,
String instant,
int numBuckets,
int seqNo,
List<ConsistentHashingNode> nodes) |
HoodieConsistentHashingMetadata(String partitionPath,
int numBuckets)
Only used for creating new hashing metadata.
|
| Modifier and Type | Method and Description |
|---|---|
static HoodieConsistentHashingMetadata |
fromBytes(byte[] bytes) |
protected static <T> T |
fromJsonString(String jsonStr,
Class<T> clazz) |
List<ConsistentHashingNode> |
getChildrenNodes() |
String |
getFilename() |
String |
getInstant() |
List<ConsistentHashingNode> |
getNodes() |
int |
getNumBuckets() |
String |
getPartitionPath() |
int |
getSeqNo() |
static String |
getTimestampFromFile(String filename)
Get instant time from the hashing metadata filename
Pattern of the filename:
|
short |
getVersion() |
boolean |
isFirstCreated() |
void |
setChildrenNodes(List<ConsistentHashingNode> childrenNodes) |
byte[] |
toBytes() |
public static final int HASH_VALUE_MASK
public static final String HASHING_METADATA_FILE_SUFFIX
public static final String HASHING_METADATA_COMMIT_FILE_SUFFIX
protected List<ConsistentHashingNode> childrenNodes
public HoodieConsistentHashingMetadata(short version,
String partitionPath,
String instant,
int numBuckets,
int seqNo,
List<ConsistentHashingNode> nodes)
public HoodieConsistentHashingMetadata(String partitionPath, int numBuckets)
public short getVersion()
public String getPartitionPath()
public String getInstant()
public int getNumBuckets()
public int getSeqNo()
public boolean isFirstCreated()
public List<ConsistentHashingNode> getNodes()
public List<ConsistentHashingNode> getChildrenNodes()
public void setChildrenNodes(List<ConsistentHashingNode> childrenNodes)
public String getFilename()
public byte[] toBytes()
throws IOException
IOExceptionpublic static HoodieConsistentHashingMetadata fromBytes(byte[] bytes) throws IOException
IOExceptionprotected static <T> T fromJsonString(String jsonStr, Class<T> clazz) throws Exception
ExceptionCopyright © 2024 The Apache Software Foundation. All rights reserved.