Path dstPath = new Path(filePath);
FileSystem hdfs = dstPath.getFileSystem(conf);
if (conf.getBoolean("hdfs.append.support", false) == true && hdfs.isFile
(dstPath)) {
FSDataOutputStream outStream = hdfs.append(dstPath);
writer = SequenceFile.createWriter(conf, outStream, fmt.getKeyClass(),
fmt.getValueClass(), compType, codeC);
} else {
writer = SequenceFile.createWriter(hdfs, conf, dstPath,
fmt.getKeyClass(), fmt.getValueClass(), compType, codeC);