Crate sequencefile

Source
Expand description

Prototype streaming library for reading Hadoop sequencefiles

§Example

let path = Path::new("/path/to/seqfile");
let file = File::open(&path).unwrap();

let seqfile = match sequencefile::Reader::new(file) {
  Ok(val) => val,
  Err(err) => panic!("Failed to open sequence file: {}", err),
};

// Returns a Result<(ByteString, ByteString)>, where a ByteString is a Vec<u8>
// An Err from this will signal an unrecoverable error. Next call to Iterator
// Returns None
for kv in seqfile {
    println!("{:?}", kv);
}

Re-exports§

pub use errors::*;
pub use reader::*;

Modules§

errors
Error
reader
Implementation and structs for a sequencefile reader

Structs§

Header
Sequencefile header, metadata about the file, e.g. key/value types, version, compression and some internal state for properly decoding
Text
hadoop.io.Text

Enums§

Codec
Compression codec
CompressionType
Type of compression used on the sequencefile.

Type Aliases§

ByteString
Convenience typedef