public class OrcFile extends Object
NOTE: The file was copied and modified to support zstd-jni. This feature is only supported in ORC 2.0, but 2.0 only supports JDK17. We need to support JDK8.
| Modifier and Type | Class and Description |
|---|---|
static class |
OrcFile.BloomFilterVersion
BloomFilterVersion.
|
static class |
OrcFile.CompressionStrategy
CompressionStrategy Enum.
|
static class |
OrcFile.EncodingStrategy
EncodingStrategy Enum.
|
static class |
OrcFile.ReaderOptions
Orc ReaderOptions.
|
static class |
OrcFile.Version
Create a version number for the ORC file format, so that we can add non-forward compatible
changes in the future.
|
static interface |
OrcFile.WriterCallback
WriterCallback.
|
static interface |
OrcFile.WriterContext
WriterContext.
|
static class |
OrcFile.WriterImplementation
WriterImplementation Enum.
|
static class |
OrcFile.WriterOptions
Options for creating ORC file writers.
|
static class |
OrcFile.WriterVersion
Records the version of the writer in terms of which bugs have been fixed.
|
static class |
OrcFile.ZstdCompressOptions
ZstdCompressOptions.
|
| Modifier and Type | Field and Description |
|---|---|
static OrcFile.WriterVersion |
CURRENT_WRITER
The WriterVersion for this version of the software.
|
static String |
MAGIC |
| Modifier | Constructor and Description |
|---|---|
protected |
OrcFile() |
| Modifier and Type | Method and Description |
|---|---|
static org.apache.orc.Reader |
createReader(org.apache.hadoop.fs.Path path,
OrcFile.ReaderOptions options) |
static org.apache.orc.Writer |
createWriter(org.apache.hadoop.fs.Path path,
OrcFile.WriterOptions opts)
Create an ORC file writer.
|
static List<org.apache.hadoop.fs.Path> |
mergeFiles(org.apache.hadoop.fs.Path outputPath,
OrcFile.WriterOptions options,
List<org.apache.hadoop.fs.Path> inputFiles)
Merges multiple ORC files that all have the same schema to produce a single ORC file.
|
static OrcFile.ReaderOptions |
readerOptions(org.apache.hadoop.conf.Configuration conf) |
static OrcFile.WriterOptions |
writerOptions(org.apache.hadoop.conf.Configuration conf)
Create a set of writer options based on a configuration.
|
static OrcFile.WriterOptions |
writerOptions(Properties tableProperties,
org.apache.hadoop.conf.Configuration conf)
Create a set of write options based on a set of table properties and configuration.
|
public static final String MAGIC
public static final OrcFile.WriterVersion CURRENT_WRITER
public static OrcFile.ReaderOptions readerOptions(org.apache.hadoop.conf.Configuration conf)
public static org.apache.orc.Reader createReader(org.apache.hadoop.fs.Path path,
OrcFile.ReaderOptions options)
throws IOException
IOExceptionpublic static OrcFile.WriterOptions writerOptions(org.apache.hadoop.conf.Configuration conf)
conf - the configuration to use for valuespublic static OrcFile.WriterOptions writerOptions(Properties tableProperties, org.apache.hadoop.conf.Configuration conf)
tableProperties - the properties of the tableconf - the configuration of the querypublic static org.apache.orc.Writer createWriter(org.apache.hadoop.fs.Path path,
OrcFile.WriterOptions opts)
throws IOException
path - filename to write toopts - the optionsIOExceptionpublic static List<org.apache.hadoop.fs.Path> mergeFiles(org.apache.hadoop.fs.Path outputPath, OrcFile.WriterOptions options, List<org.apache.hadoop.fs.Path> inputFiles) throws IOException
outputPath - the output fileoptions - the options for writing with although the options related to the input files'
encodings are overriddeninputFiles - the list of files to mergeIOExceptionCopyright © 2023–2024 The Apache Software Foundation. All rights reserved.