Package org.apache.parquet.format
Class Util
- java.lang.Object
-
- org.apache.parquet.format.Util
-
public class Util extends Object
Utility to read/write metadata We use the TCompactProtocol to serialize metadata
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUtil.DefaultFileMetaDataConsumerSimple default consumer that sets the fieldsstatic classUtil.FileMetaDataConsumerTo read metadata in a streaming fashion.
-
Constructor Summary
Constructors Constructor Description Util()
-
Method Summary
-
-
-
Method Detail
-
writeColumnIndex
public static void writeColumnIndex(ColumnIndex columnIndex, OutputStream to) throws IOException
- Throws:
IOException
-
writeColumnIndex
public static void writeColumnIndex(ColumnIndex columnIndex, OutputStream to, BlockCipher.Encryptor encryptor, byte[] AAD) throws IOException
- Throws:
IOException
-
readColumnIndex
public static ColumnIndex readColumnIndex(InputStream from) throws IOException
- Throws:
IOException
-
readColumnIndex
public static ColumnIndex readColumnIndex(InputStream from, BlockCipher.Decryptor decryptor, byte[] AAD) throws IOException
- Throws:
IOException
-
writeOffsetIndex
public static void writeOffsetIndex(OffsetIndex offsetIndex, OutputStream to) throws IOException
- Throws:
IOException
-
writeOffsetIndex
public static void writeOffsetIndex(OffsetIndex offsetIndex, OutputStream to, BlockCipher.Encryptor encryptor, byte[] AAD) throws IOException
- Throws:
IOException
-
readOffsetIndex
public static OffsetIndex readOffsetIndex(InputStream from) throws IOException
- Throws:
IOException
-
readOffsetIndex
public static OffsetIndex readOffsetIndex(InputStream from, BlockCipher.Decryptor decryptor, byte[] AAD) throws IOException
- Throws:
IOException
-
readBloomFilterHeader
public static BloomFilterHeader readBloomFilterHeader(InputStream from) throws IOException
- 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
public static void writePageHeader(PageHeader pageHeader, OutputStream to) throws IOException
- Throws:
IOException
-
writePageHeader
public static void writePageHeader(PageHeader pageHeader, OutputStream to, BlockCipher.Encryptor encryptor, byte[] AAD) throws IOException
- Throws:
IOException
-
readPageHeader
public static PageHeader readPageHeader(InputStream from) throws IOException
- Throws:
IOException
-
readPageHeader
public static PageHeader readPageHeader(InputStream from, BlockCipher.Decryptor decryptor, byte[] AAD) throws IOException
- Throws:
IOException
-
writeFileMetaData
public static void writeFileMetaData(FileMetaData fileMetadata, OutputStream to) throws IOException
- Throws:
IOException
-
writeFileMetaData
public static void writeFileMetaData(FileMetaData fileMetadata, OutputStream to, BlockCipher.Encryptor encryptor, byte[] AAD) throws IOException
- Throws:
IOException
-
readFileMetaData
public static FileMetaData readFileMetaData(InputStream from) throws IOException
- Throws:
IOException
-
readFileMetaData
public static FileMetaData readFileMetaData(InputStream from, BlockCipher.Decryptor decryptor, byte[] AAD) 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
-
writeFileCryptoMetaData
public static void writeFileCryptoMetaData(FileCryptoMetaData cryptoMetadata, OutputStream to) throws IOException
- Throws:
IOException
-
readFileCryptoMetaData
public static FileCryptoMetaData readFileCryptoMetaData(InputStream from) throws IOException
- 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
-
-