Package org.apache.parquet.format
Class Util
java.lang.Object
org.apache.parquet.format.Util
Utility to read/write metadata
We use the TCompactProtocol to serialize metadata
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classSimple default consumer that sets the fieldsstatic classTo read metadata in a streaming fashion. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BloomFilterHeaderstatic BloomFilterHeaderreadBloomFilterHeader(InputStream from, BlockCipher.Decryptor decryptor, byte[] AAD) static ColumnIndexreadColumnIndex(InputStream from) static ColumnIndexreadColumnIndex(InputStream from, BlockCipher.Decryptor decryptor, byte[] AAD) static ColumnMetaDatareadColumnMetaData(InputStream from, BlockCipher.Decryptor decryptor, byte[] AAD) static FileCryptoMetaDatastatic FileMetaDatareadFileMetaData(InputStream from) static FileMetaDatareadFileMetaData(InputStream from, boolean skipRowGroups) reads the meta data from the streamstatic FileMetaDatareadFileMetaData(InputStream from, boolean skipRowGroups, BlockCipher.Decryptor decryptor, byte[] AAD) static FileMetaDatareadFileMetaData(InputStream from, boolean skipRowGroups, BlockCipher.Decryptor decryptor, byte[] AAD, int maxMessageSize) static FileMetaDatareadFileMetaData(InputStream from, int maxMessageSize) static FileMetaDatareadFileMetaData(InputStream from, BlockCipher.Decryptor decryptor, byte[] AAD) static FileMetaDatareadFileMetaData(InputStream from, BlockCipher.Decryptor decryptor, byte[] AAD, int maxMessageSize) static voidreadFileMetaData(InputStream from, Util.FileMetaDataConsumer consumer) static voidreadFileMetaData(InputStream from, Util.FileMetaDataConsumer consumer, boolean skipRowGroups) static voidreadFileMetaData(InputStream input, Util.FileMetaDataConsumer consumer, boolean skipRowGroups, BlockCipher.Decryptor decryptor, byte[] AAD) static voidreadFileMetaData(InputStream input, Util.FileMetaDataConsumer consumer, boolean skipRowGroups, BlockCipher.Decryptor decryptor, byte[] AAD, int maxMessageSize) static voidreadFileMetaData(InputStream from, Util.FileMetaDataConsumer consumer, BlockCipher.Decryptor decryptor, byte[] AAD) static OffsetIndexreadOffsetIndex(InputStream from) static OffsetIndexreadOffsetIndex(InputStream from, BlockCipher.Decryptor decryptor, byte[] AAD) static PageHeaderreadPageHeader(InputStream from) static PageHeaderreadPageHeader(InputStream from, BlockCipher.Decryptor decryptor, byte[] AAD) static voidwriteBloomFilterHeader(BloomFilterHeader header, OutputStream out) static voidwriteBloomFilterHeader(BloomFilterHeader header, OutputStream out, BlockCipher.Encryptor encryptor, byte[] AAD) static voidwriteColumnIndex(ColumnIndex columnIndex, OutputStream to) static voidwriteColumnIndex(ColumnIndex columnIndex, OutputStream to, BlockCipher.Encryptor encryptor, byte[] AAD) static voidwriteColumnMetaData(ColumnMetaData columnMetaData, OutputStream to, BlockCipher.Encryptor encryptor, byte[] AAD) static voidwriteFileCryptoMetaData(FileCryptoMetaData cryptoMetadata, OutputStream to) static voidwriteFileMetaData(FileMetaData fileMetadata, OutputStream to) static voidwriteFileMetaData(FileMetaData fileMetadata, OutputStream to, BlockCipher.Encryptor encryptor, byte[] AAD) static voidwriteOffsetIndex(OffsetIndex offsetIndex, OutputStream to) static voidwriteOffsetIndex(OffsetIndex offsetIndex, OutputStream to, BlockCipher.Encryptor encryptor, byte[] AAD) static voidwritePageHeader(PageHeader pageHeader, OutputStream to) static voidwritePageHeader(PageHeader pageHeader, OutputStream to, BlockCipher.Encryptor encryptor, byte[] AAD)
-
Constructor Details
-
Util
public Util()
-
-
Method Details
-
writeColumnIndex
- Throws:
IOException
-
writeColumnIndex
public static void writeColumnIndex(ColumnIndex columnIndex, OutputStream to, BlockCipher.Encryptor encryptor, byte[] AAD) throws IOException - Throws:
IOException
-
readColumnIndex
- Throws:
IOException
-
readColumnIndex
public static ColumnIndex readColumnIndex(InputStream from, BlockCipher.Decryptor decryptor, byte[] AAD) throws IOException - Throws:
IOException
-
writeOffsetIndex
- Throws:
IOException
-
writeOffsetIndex
public static void writeOffsetIndex(OffsetIndex offsetIndex, OutputStream to, BlockCipher.Encryptor encryptor, byte[] AAD) throws IOException - Throws:
IOException
-
readOffsetIndex
- Throws:
IOException
-
readOffsetIndex
public static OffsetIndex readOffsetIndex(InputStream from, BlockCipher.Decryptor decryptor, byte[] AAD) throws IOException - Throws:
IOException
-
readBloomFilterHeader
- Throws:
IOException
-
writeBloomFilterHeader
public static void writeBloomFilterHeader(BloomFilterHeader header, OutputStream out) throws IOException - Throws:
IOException
-
readBloomFilterHeader
public static BloomFilterHeader readBloomFilterHeader(InputStream from, BlockCipher.Decryptor decryptor, byte[] AAD) throws IOException - Throws:
IOException
-
writeBloomFilterHeader
public static void writeBloomFilterHeader(BloomFilterHeader header, OutputStream out, BlockCipher.Encryptor encryptor, byte[] AAD) throws IOException - Throws:
IOException
-
writePageHeader
- Throws:
IOException
-
writePageHeader
public static void writePageHeader(PageHeader pageHeader, OutputStream to, BlockCipher.Encryptor encryptor, byte[] AAD) throws IOException - Throws:
IOException
-
readPageHeader
- Throws:
IOException
-
readPageHeader
public static PageHeader readPageHeader(InputStream from, BlockCipher.Decryptor decryptor, byte[] AAD) throws IOException - Throws:
IOException
-
writeFileMetaData
- Throws:
IOException
-
writeFileMetaData
public static void writeFileMetaData(FileMetaData fileMetadata, OutputStream to, BlockCipher.Encryptor encryptor, byte[] AAD) throws IOException - Throws:
IOException
-
readFileMetaData
- Throws:
IOException
-
readFileMetaData
public static FileMetaData readFileMetaData(InputStream from, BlockCipher.Decryptor decryptor, byte[] AAD) throws IOException - Throws:
IOException
-
readFileMetaData
public static FileMetaData readFileMetaData(InputStream from, int maxMessageSize) throws IOException - Throws:
IOException
-
readFileMetaData
public static FileMetaData readFileMetaData(InputStream from, BlockCipher.Decryptor decryptor, byte[] AAD, int maxMessageSize) throws IOException - Throws:
IOException
-
writeColumnMetaData
public static void writeColumnMetaData(ColumnMetaData columnMetaData, OutputStream to, BlockCipher.Encryptor encryptor, byte[] AAD) throws IOException - Throws:
IOException
-
readColumnMetaData
public static ColumnMetaData readColumnMetaData(InputStream from, BlockCipher.Decryptor decryptor, byte[] AAD) throws IOException - Throws:
IOException
-
readFileMetaData
public static FileMetaData readFileMetaData(InputStream from, boolean skipRowGroups) throws IOException reads the meta data from the stream- Parameters:
from- the stream to read the metadata fromskipRowGroups- whether row groups should be skipped- Returns:
- the resulting metadata
- Throws:
IOException- if any I/O error occurs during the reading
-
readFileMetaData
public static FileMetaData readFileMetaData(InputStream from, boolean skipRowGroups, BlockCipher.Decryptor decryptor, byte[] AAD) throws IOException - Throws:
IOException
-
readFileMetaData
public static FileMetaData readFileMetaData(InputStream from, boolean skipRowGroups, BlockCipher.Decryptor decryptor, byte[] AAD, int maxMessageSize) throws IOException - Throws:
IOException
-
writeFileCryptoMetaData
public static void writeFileCryptoMetaData(FileCryptoMetaData cryptoMetadata, OutputStream to) throws IOException - Throws:
IOException
-
readFileCryptoMetaData
- Throws:
IOException
-
readFileMetaData
public static void readFileMetaData(InputStream from, Util.FileMetaDataConsumer consumer) throws IOException - Throws:
IOException
-
readFileMetaData
public static void readFileMetaData(InputStream from, Util.FileMetaDataConsumer consumer, BlockCipher.Decryptor decryptor, byte[] AAD) throws IOException - Throws:
IOException
-
readFileMetaData
public static void readFileMetaData(InputStream from, Util.FileMetaDataConsumer consumer, boolean skipRowGroups) throws IOException - Throws:
IOException
-
readFileMetaData
public static void readFileMetaData(InputStream input, Util.FileMetaDataConsumer consumer, boolean skipRowGroups, BlockCipher.Decryptor decryptor, byte[] AAD) throws IOException - Throws:
IOException
-
readFileMetaData
public static void readFileMetaData(InputStream input, Util.FileMetaDataConsumer consumer, boolean skipRowGroups, BlockCipher.Decryptor decryptor, byte[] AAD, int maxMessageSize) throws IOException - Throws:
IOException
-