HDFS: Using HDFS API to append to a SequenceFile

// fs and conf are set up for HDFS, not as a LocalFileSystem

seqWriter = SequenceFile.createWriter(fs, conf, new Path(hdfsPath), keyClass, valueClass, SequenceFile.CompressionType.NONE);
seqWriter.append(new Text(key), new BytesWritable(value));
seqWriter.close();


 

你可能感兴趣的:(hadoop)