HDFS: Using HDFS API to append to a SequenceFile

来源:互联网 发布:windows窗口程序设计 编辑:程序博客网 时间:2024/05/30 07:13

// 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();


 

0 0