public class OrcUtils extends FileFormatUtils
| Constructor and Description |
|---|
OrcUtils() |
| Modifier and Type | Method and Description |
|---|---|
List<HoodieKey> |
fetchHoodieKeys(HoodieStorage storage,
StoragePath filePath)
Fetch
HoodieKeys from the given ORC file. |
List<HoodieKey> |
fetchHoodieKeys(HoodieStorage storage,
StoragePath filePath,
Option<BaseKeyGenerator> keyGeneratorOpt) |
Set<String> |
filterRowKeys(HoodieStorage storage,
StoragePath filePath,
Set<String> filter)
Read the rowKey list matching the given filter, from the given ORC file.
|
HoodieFileFormat |
getFormat() |
ClosableIterator<HoodieKey> |
getHoodieKeyIterator(HoodieStorage storage,
StoragePath filePath)
Provides a closable iterator for reading the given ORC file.
|
ClosableIterator<HoodieKey> |
getHoodieKeyIterator(HoodieStorage storage,
StoragePath filePath,
Option<BaseKeyGenerator> keyGeneratorOpt) |
long |
getRowCount(HoodieStorage storage,
StoragePath filePath) |
List<org.apache.avro.generic.GenericRecord> |
readAvroRecords(HoodieStorage storage,
StoragePath filePath)
NOTE: This literally reads the entire file contents, thus should be used with caution.
|
List<org.apache.avro.generic.GenericRecord> |
readAvroRecords(HoodieStorage storage,
StoragePath filePath,
org.apache.avro.Schema avroSchema)
NOTE: This literally reads the entire file contents, thus should be used with caution.
|
org.apache.avro.Schema |
readAvroSchema(HoodieStorage storage,
StoragePath filePath) |
List<HoodieColumnRangeMetadata<Comparable>> |
readColumnStatsFromMetadata(HoodieStorage storage,
StoragePath filePath,
List<String> columnList) |
Map<String,String> |
readFooter(HoodieStorage storage,
boolean required,
StoragePath filePath,
String... footerNames) |
byte[] |
serializeRecordsToLogBlock(HoodieStorage storage,
List<HoodieRecord> records,
org.apache.avro.Schema writerSchema,
org.apache.avro.Schema readerSchema,
String keyFieldName,
Map<String,String> paramsMap) |
void |
writeMetaFile(HoodieStorage storage,
StoragePath filePath,
Properties props) |
readBloomFilterFromMetadata, readMinMaxRecordKeys, readRowKeyspublic ClosableIterator<HoodieKey> getHoodieKeyIterator(HoodieStorage storage, StoragePath filePath)
getHoodieKeyIterator in class FileFormatUtilsstorage - HoodieStorage instance.filePath - The ORC file pathClosableIterator of HoodieKeys for reading the ORC filepublic List<HoodieKey> fetchHoodieKeys(HoodieStorage storage, StoragePath filePath)
HoodieKeys from the given ORC file.fetchHoodieKeys in class FileFormatUtilsstorage - HoodieStorage instance.filePath - The ORC file path.List of HoodieKeys fetched from the ORC filepublic List<HoodieKey> fetchHoodieKeys(HoodieStorage storage, StoragePath filePath, Option<BaseKeyGenerator> keyGeneratorOpt)
fetchHoodieKeys in class FileFormatUtilspublic ClosableIterator<HoodieKey> getHoodieKeyIterator(HoodieStorage storage, StoragePath filePath, Option<BaseKeyGenerator> keyGeneratorOpt)
getHoodieKeyIterator in class FileFormatUtilspublic List<org.apache.avro.generic.GenericRecord> readAvroRecords(HoodieStorage storage, StoragePath filePath)
readAvroRecords in class FileFormatUtilspublic List<org.apache.avro.generic.GenericRecord> readAvroRecords(HoodieStorage storage, StoragePath filePath, org.apache.avro.Schema avroSchema)
readAvroRecords in class FileFormatUtilspublic Set<String> filterRowKeys(HoodieStorage storage, StoragePath filePath, Set<String> filter) throws HoodieIOException
filterRowKeys in class FileFormatUtilsstorage - HoodieStorage instance.filePath - The ORC file path.filter - record keys filterHoodieIOExceptionpublic Map<String,String> readFooter(HoodieStorage storage, boolean required, StoragePath filePath, String... footerNames)
readFooter in class FileFormatUtilspublic org.apache.avro.Schema readAvroSchema(HoodieStorage storage, StoragePath filePath)
readAvroSchema in class FileFormatUtilspublic List<HoodieColumnRangeMetadata<Comparable>> readColumnStatsFromMetadata(HoodieStorage storage, StoragePath filePath, List<String> columnList)
readColumnStatsFromMetadata in class FileFormatUtilspublic HoodieFileFormat getFormat()
getFormat in class FileFormatUtilspublic long getRowCount(HoodieStorage storage, StoragePath filePath)
getRowCount in class FileFormatUtilspublic void writeMetaFile(HoodieStorage storage, StoragePath filePath, Properties props) throws IOException
writeMetaFile in class FileFormatUtilsIOExceptionpublic byte[] serializeRecordsToLogBlock(HoodieStorage storage, List<HoodieRecord> records, org.apache.avro.Schema writerSchema, org.apache.avro.Schema readerSchema, String keyFieldName, Map<String,String> paramsMap) throws IOException
serializeRecordsToLogBlock in class FileFormatUtilsIOExceptionCopyright © 2024 The Apache Software Foundation. All rights reserved.