hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohit Anchlia <mohitanch...@gmail.com>
Subject Reading from sequence file using java FS api
Date Mon, 12 Nov 2012 23:16:12 GMT
I am looking for an example that read snappy compressed snappy file. Could
someone point me to it? What I have so far is this:


Configuration conf = *new* Configuration();

FileSystem fs = FileSystem.*get*(URI.*create*(uri), conf);

Path path = *new* Path(uri);

SequenceFile.Reader reader = *null*;

org.apache.hadoop.io.LongWritable key =
*new*org.apache.hadoop.io.LongWritable();

org.apache.hadoop.io.Text value = *new* org.apache.hadoop.io.Text();

*try* {

reader = *new* SequenceFile.Reader(fs, path, conf);

Mime
View raw message