You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "asin (JIRA)" <ji...@apache.org> on 2018/12/27 12:09:00 UTC
[jira] [Created] (HADOOP-16021) SequenceFile.createWriter
appendIfExists codec cause NullPointerException
asin created HADOOP-16021:
-----------------------------
Summary: SequenceFile.createWriter appendIfExists codec cause NullPointerException
Key: HADOOP-16021
URL: https://issues.apache.org/jira/browse/HADOOP-16021
Project: Hadoop Common
Issue Type: Bug
Components: common
Affects Versions: 2.7.3
Environment: windows10, hadoop2.7.3, jdk8
Reporter: asin
Attachments: 57.png
I want append the data in a file , when i use SequenceFile.appendIfExists , it throw NullPointerException at at org.apache.hadoop.io.SequenceFile$Writer.(SequenceFile.java:1119)
when i remove the 'appendIfExists', it works, but it will cover old file.
when i try use CompressionType.RECORD or CompressionType.BLOCK throw "not support" exception
{code:java}
// my code
SequenceFile.Writer writer = null; writer = SequenceFile.createWriter(conf, SequenceFile.Writer.file(path), SequenceFile.Writer.keyClass(Text.class), SequenceFile.Writer.valueClass(Text.class), SequenceFile.Writer.appendIfExists(true) );
{code}
{{more info see:https://stackoverflow.com/questions/53943978/hadoop-sequencefile-createwriter-appendifexists-codec-cause-nullpointerexception}}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: common-dev-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-dev-help@hadoop.apache.org