Package org.apache.avro.hadoop.io
Class AvroSequenceFile.Reader.Options
java.lang.Object
org.apache.avro.hadoop.io.AvroSequenceFile.Reader.Options
- Enclosing class:
AvroSequenceFile.Reader
A helper class to encapsulate the options that can be used to construct a
Reader.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the Hadoop configuration.Gets the Hadoop configuration with Avro serialization registered.Gets the filesystem the SequenceFile should be read rom.Gets the input path for the sequence file.Sets the Hadoop configuration.withFileSystem
(FileSystem fileSystem) Sets the filesystem the SequenceFile should be read from.withInputPath
(Path inputPath) Sets the input path for the SequenceFile.withKeySchema
(Schema keyReaderSchema) Sets the reader schema of the key records when using Avro data.withValueSchema
(Schema valueReaderSchema) Sets the reader schema of the value records when using Avro data.
-
Constructor Details
-
Options
public Options()
-
-
Method Details
-
withFileSystem
Sets the filesystem the SequenceFile should be read from.- Parameters:
fileSystem
- The filesystem.- Returns:
- This options instance.
-
withInputPath
Sets the input path for the SequenceFile.- Parameters:
inputPath
- The input path.- Returns:
- This options instance.
-
withConfiguration
Sets the Hadoop configuration.- Parameters:
conf
- The configuration.- Returns:
- This options instance.
-
withKeySchema
Sets the reader schema of the key records when using Avro data.If not set, the writer schema will be used as the reader schema.
- Parameters:
keyReaderSchema
- The reader schema for the keys.- Returns:
- This options instance.
-
withValueSchema
Sets the reader schema of the value records when using Avro data.If not set, the writer schema will be used as the reader schema.
- Parameters:
valueReaderSchema
- The reader schema for the values.- Returns:
- This options instance.
-
getFileSystem
Gets the filesystem the SequenceFile should be read rom.- Returns:
- The file system to read from.
-
getInputPath
Gets the input path for the sequence file.- Returns:
- The input path.
-
getConfiguration
Gets the Hadoop configuration.- Returns:
- The Hadoop configuration.
-
getConfigurationWithAvroSerialization
Gets the Hadoop configuration with Avro serialization registered.- Returns:
- The Hadoop configuration.
- Throws:
IOException
- If there is an error configuring Avro serialization.
-