public class ParquetUtils extends Object
| Constructor and Description |
|---|
ParquetUtils() |
| Modifier and Type | Method and Description |
|---|---|
static List<HoodieKey> |
fetchRecordKeyPartitionPathFromParquet(org.apache.hadoop.conf.Configuration configuration,
org.apache.hadoop.fs.Path filePath)
Fetch
HoodieKeys from the given parquet file. |
static Set<String> |
filterParquetRowKeys(org.apache.hadoop.conf.Configuration configuration,
org.apache.hadoop.fs.Path filePath,
Set<String> filter)
Read the rowKey list matching the given filter, from the given parquet file.
|
static long |
getRowCount(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path parquetFilePath)
Returns the number of records in the parquet file.
|
static List<org.apache.avro.generic.GenericRecord> |
readAvroRecords(org.apache.hadoop.conf.Configuration configuration,
org.apache.hadoop.fs.Path filePath)
NOTE: This literally reads the entire file contents, thus should be used with caution.
|
static org.apache.avro.Schema |
readAvroSchema(org.apache.hadoop.conf.Configuration configuration,
org.apache.hadoop.fs.Path parquetFilePath) |
static BloomFilter |
readBloomFilterFromParquetMetadata(org.apache.hadoop.conf.Configuration configuration,
org.apache.hadoop.fs.Path parquetFilePath)
Read out the bloom filter from the parquet file meta data.
|
static org.apache.parquet.hadoop.metadata.ParquetMetadata |
readMetadata(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path parquetFilePath) |
static String[] |
readMinMaxRecordKeys(org.apache.hadoop.conf.Configuration configuration,
org.apache.hadoop.fs.Path parquetFilePath) |
static Set<String> |
readRowKeysFromParquet(org.apache.hadoop.conf.Configuration configuration,
org.apache.hadoop.fs.Path filePath)
Read the rowKey list from the given parquet file.
|
static org.apache.parquet.schema.MessageType |
readSchema(org.apache.hadoop.conf.Configuration configuration,
org.apache.hadoop.fs.Path parquetFilePath)
Get the schema of the given parquet file.
|
public static Set<String> readRowKeysFromParquet(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path filePath)
filePath - The parquet file path.configuration - configuration to build fs objectpublic static Set<String> filterParquetRowKeys(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path filePath, Set<String> filter)
filePath - The parquet file path.configuration - configuration to build fs objectfilter - record keys filterpublic static List<HoodieKey> fetchRecordKeyPartitionPathFromParquet(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path filePath)
HoodieKeys from the given parquet file.public static org.apache.parquet.hadoop.metadata.ParquetMetadata readMetadata(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path parquetFilePath)
public static org.apache.parquet.schema.MessageType readSchema(org.apache.hadoop.conf.Configuration configuration,
org.apache.hadoop.fs.Path parquetFilePath)
public static org.apache.avro.Schema readAvroSchema(org.apache.hadoop.conf.Configuration configuration,
org.apache.hadoop.fs.Path parquetFilePath)
public static BloomFilter readBloomFilterFromParquetMetadata(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path parquetFilePath)
public static String[] readMinMaxRecordKeys(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path parquetFilePath)
public static List<org.apache.avro.generic.GenericRecord> readAvroRecords(org.apache.hadoop.conf.Configuration configuration, org.apache.hadoop.fs.Path filePath)
public static long getRowCount(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path parquetFilePath)
conf - ConfigurationparquetFilePath - path of the fileCopyright © 2021 The Apache Software Foundation. All rights reserved.