You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "asin (JIRA)" <ji...@apache.org> on 2018/12/27 12:12:00 UTC

[jira] [Updated] (HADOOP-16021) SequenceFile.createWriter appendIfExists codec cause NullPointerException

     [ https://issues.apache.org/jira/browse/HADOOP-16021?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

asin updated HADOOP-16021:
--------------------------
    Description: 
 
 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]}}

  was:
 
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}}


> 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
>            Priority: Major
>              Labels: bug
>         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-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org