Class StoreUtils
java.lang.Object
org.apache.hadoop.hbase.regionserver.StoreUtils
Utility functions for region server storage layer.
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic org.apache.hadoop.conf.ConfigurationcreateStoreConfiguration(org.apache.hadoop.conf.Configuration conf, TableDescriptor td, ColumnFamilyDescriptor cfd) static intgetBytesPerChecksum(org.apache.hadoop.conf.Configuration conf) Returns the configured bytesPerChecksum value.static ChecksumTypegetChecksumType(org.apache.hadoop.conf.Configuration conf) Returns the configured checksum algorithm.static OptionalIntCreates 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 longgetLowestTimestamp(Collection<HStoreFile> candidates) Gets lowest timestamp from candidate StoreFilesstatic OptionalLongReturn the largest memstoreTS found across all storefiles in the given list.static OptionalLongReturn 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 longstatic longgetStorefilesSize(Collection<HStoreFile> files, Predicate<HStoreFile> predicate) static longgetTotalUncompressedBytes(List<HStoreFile> files) static booleanhasReferences(Collection<HStoreFile> files) Determines whether any files in the collection are references.static List<StoreFileInfo>toStoreFileInfo(Collection<HStoreFile> storefiles) 
- 
Field Details- 
LOG
 
- 
- 
Constructor Details- 
StoreUtilsprivate StoreUtils()
 
- 
- 
Method Details- 
getDeterministicRandomSeedCreates a deterministic hash code for store file collection.
- 
hasReferencesDetermines whether any files in the collection are references.- Parameters:
- files- The files.
 
- 
getLowestTimestampGets lowest timestamp from candidate StoreFiles- Throws:
- IOException
 
- 
getLargestFileGets the largest file (with reader) out of the list of files.- Parameters:
- candidates- The files to choose from.
- Returns:
- The largest file; null if no file has a reader.
 
- 
getMaxMemStoreTSInListReturn the largest memstoreTS found across all storefiles in the given list. Store files that were created by a mapreduce bulk load are ignored, as they do not correspond to any specific put operation, and thus do not have a memstoreTS associated with them.
- 
getMaxSequenceIdInListReturn the highest sequence ID found across all storefiles in the given list.
- 
getFileSplitPointstatic Optional<byte[]> getFileSplitPoint(HStoreFile file, CellComparator comparator) throws IOException Gets the approximate mid-point of the given file that is optimal for use in splitting it.- Parameters:
- file- the store file
- comparator- Comparator used to compare KVs.
- Returns:
- The split point row, or null if splitting is not possible, or reader is null.
- Throws:
- IOException
 
- 
getSplitPointstatic Optional<byte[]> getSplitPoint(Collection<HStoreFile> storefiles, CellComparator comparator) throws IOException Gets the mid point of the largest file passed in as split point.- Throws:
- IOException
 
- 
getChecksumTypeReturns the configured checksum algorithm.- Parameters:
- conf- The configuration
- Returns:
- The checksum algorithm that is set in the configuration
 
- 
getBytesPerChecksumReturns the configured bytesPerChecksum value.- Parameters:
- conf- The configuration
- Returns:
- The bytesPerChecksum that is set in the configuration
 
- 
createStoreConfigurationpublic static org.apache.hadoop.conf.Configuration createStoreConfiguration(org.apache.hadoop.conf.Configuration conf, TableDescriptor td, ColumnFamilyDescriptor cfd) 
- 
toStoreFileInfo
- 
getTotalUncompressedBytes
- 
getStorefilesSize
- 
getStorefileFieldSize
 
-