@InterfaceAudience.Private public class StoreUtils extends Object
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOG |
Constructor and Description |
---|
StoreUtils() |
Modifier and Type | Method and Description |
---|---|
static OptionalInt |
getDeterministicRandomSeed(Collection<HStoreFile> files)
Creates a deterministic hash code for store file collection.
|
(package private) static Optional<byte[]> |
getFileSplitPoint(HStoreFile file,
CellComparator comparator)
Gets the approximate mid-point of the given file that is optimal for use in splitting it.
|
(package private) static Optional<HStoreFile> |
getLargestFile(Collection<HStoreFile> candidates)
Gets the largest file (with reader) out of the list of files.
|
static long |
getLowestTimestamp(Collection<HStoreFile> candidates)
Gets lowest timestamp from candidate StoreFiles
|
static OptionalLong |
getMaxMemStoreTSInList(Collection<HStoreFile> sfs)
Return the largest memstoreTS found across all storefiles in the given list.
|
static OptionalLong |
getMaxSequenceIdInList(Collection<HStoreFile> sfs)
Return the highest sequence ID found across all storefiles in the given list.
|
(package private) static Optional<byte[]> |
getSplitPoint(Collection<HStoreFile> storefiles,
CellComparator comparator)
Gets the mid point of the largest file passed in as split point.
|
static boolean |
hasReferences(Collection<HStoreFile> files)
Determines whether any files in the collection are references.
|
private static final org.slf4j.Logger LOG
public StoreUtils()
public static OptionalInt getDeterministicRandomSeed(Collection<HStoreFile> files)
public static boolean hasReferences(Collection<HStoreFile> files)
files
- The files.public static long getLowestTimestamp(Collection<HStoreFile> candidates) throws IOException
IOException
static Optional<HStoreFile> getLargestFile(Collection<HStoreFile> candidates)
candidates
- The files to choose from.public static OptionalLong getMaxMemStoreTSInList(Collection<HStoreFile> sfs)
public static OptionalLong getMaxSequenceIdInList(Collection<HStoreFile> sfs)
static Optional<byte[]> getFileSplitPoint(HStoreFile file, CellComparator comparator) throws IOException
file
- the store filecomparator
- Comparator used to compare KVs.IOException
static Optional<byte[]> getSplitPoint(Collection<HStoreFile> storefiles, CellComparator comparator) throws IOException
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.