You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by "Brock Noland (JIRA)" <ji...@apache.org> on 2012/08/02 15:31:02 UTC

[jira] [Created] (FLUME-1420) Exception should be thrown if we cannot instaniate an EventSerializer

Brock Noland created FLUME-1420:
-----------------------------------

             Summary: Exception should be thrown if we cannot instaniate an EventSerializer
                 Key: FLUME-1420
                 URL: https://issues.apache.org/jira/browse/FLUME-1420
             Project: Flume
          Issue Type: Bug
          Components: Sinks+Sources
    Affects Versions: v1.2.0
            Reporter: Brock Noland


Currently EventSerailizerFactory returns null if it cannot instantiate the class. Then the caller NPEs because they don't expect null. If we cannot satisfy the caller we should throw an exception

{noformat}
2012-08-02 16:38:26,489 ERROR serialization.EventSerializerFactory: Unable to instantiate Builder from org.apache.flume.serialization.BodyTextEventSerializer
2012-08-02 16:38:26,490 WARN hdfs.HDFSEventSink: HDFS IO error
java.io.IOException: java.lang.NullPointerException
        at org.apache.flume.sink.hdfs.BucketWriter.doOpen(BucketWriter.java:202)
        at org.apache.flume.sink.hdfs.BucketWriter.access$000(BucketWriter.java:48)
        at org.apache.flume.sink.hdfs.BucketWriter$1.run(BucketWriter.java:155)
        at org.apache.flume.sink.hdfs.BucketWriter$1.run(BucketWriter.java:152)
        at org.apache.flume.sink.hdfs.BucketWriter.runPrivileged(BucketWriter.java:125)
        at org.apache.flume.sink.hdfs.BucketWriter.open(BucketWriter.java:152)
        at org.apache.flume.sink.hdfs.BucketWriter.append(BucketWriter.java:307)
        at org.apache.flume.sink.hdfs.HDFSEventSink$1.call(HDFSEventSink.java:717)
        at org.apache.flume.sink.hdfs.HDFSEventSink$1.call(HDFSEventSink.java:714)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
        at org.apache.flume.sink.hdfs.HDFSDataStream.open(HDFSDataStream.java:75)
        at org.apache.flume.sink.hdfs.BucketWriter.doOpen(BucketWriter.java:188)
        ... 13 more
{noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FLUME-1420) Exception should be thrown if we cannot instaniate an EventSerializer

Posted by "Brock Noland (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLUME-1420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13428220#comment-13428220 ] 

Brock Noland commented on FLUME-1420:
-------------------------------------

Patch looks good, but it looks like we still return null in the "build the builder" section?
                
> Exception should be thrown if we cannot instaniate an EventSerializer
> ---------------------------------------------------------------------
>
>                 Key: FLUME-1420
>                 URL: https://issues.apache.org/jira/browse/FLUME-1420
>             Project: Flume
>          Issue Type: Bug
>          Components: Sinks+Sources
>    Affects Versions: v1.2.0
>            Reporter: Brock Noland
>            Assignee: Patrick Wendell
>         Attachments: FLUME-1420.patch.v1.txt
>
>
> Currently EventSerailizerFactory returns null if it cannot instantiate the class. Then the caller NPEs because they don't expect null. If we cannot satisfy the caller we should throw an exception
> {noformat}
> 2012-08-02 16:38:26,489 ERROR serialization.EventSerializerFactory: Unable to instantiate Builder from org.apache.flume.serialization.BodyTextEventSerializer
> 2012-08-02 16:38:26,490 WARN hdfs.HDFSEventSink: HDFS IO error
> java.io.IOException: java.lang.NullPointerException
>         at org.apache.flume.sink.hdfs.BucketWriter.doOpen(BucketWriter.java:202)
>         at org.apache.flume.sink.hdfs.BucketWriter.access$000(BucketWriter.java:48)
>         at org.apache.flume.sink.hdfs.BucketWriter$1.run(BucketWriter.java:155)
>         at org.apache.flume.sink.hdfs.BucketWriter$1.run(BucketWriter.java:152)
>         at org.apache.flume.sink.hdfs.BucketWriter.runPrivileged(BucketWriter.java:125)
>         at org.apache.flume.sink.hdfs.BucketWriter.open(BucketWriter.java:152)
>         at org.apache.flume.sink.hdfs.BucketWriter.append(BucketWriter.java:307)
>         at org.apache.flume.sink.hdfs.HDFSEventSink$1.call(HDFSEventSink.java:717)
>         at org.apache.flume.sink.hdfs.HDFSEventSink$1.call(HDFSEventSink.java:714)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.NullPointerException
>         at org.apache.flume.sink.hdfs.HDFSDataStream.open(HDFSDataStream.java:75)
>         at org.apache.flume.sink.hdfs.BucketWriter.doOpen(BucketWriter.java:188)
>         ... 13 more
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (FLUME-1420) Exception should be thrown if we cannot instaniate an EventSerializer

Posted by "Patrick Wendell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FLUME-1420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Wendell updated FLUME-1420:
-----------------------------------

    Attachment: FLUME-1420.patch.v1.txt

This patch throws a FlumeException if the serializer can't be instantiated or its class can't be found. This is appropriate since Flume can make no progress in these situations.
                
> Exception should be thrown if we cannot instaniate an EventSerializer
> ---------------------------------------------------------------------
>
>                 Key: FLUME-1420
>                 URL: https://issues.apache.org/jira/browse/FLUME-1420
>             Project: Flume
>          Issue Type: Bug
>          Components: Sinks+Sources
>    Affects Versions: v1.2.0
>            Reporter: Brock Noland
>            Assignee: Patrick Wendell
>         Attachments: FLUME-1420.patch.v1.txt
>
>
> Currently EventSerailizerFactory returns null if it cannot instantiate the class. Then the caller NPEs because they don't expect null. If we cannot satisfy the caller we should throw an exception
> {noformat}
> 2012-08-02 16:38:26,489 ERROR serialization.EventSerializerFactory: Unable to instantiate Builder from org.apache.flume.serialization.BodyTextEventSerializer
> 2012-08-02 16:38:26,490 WARN hdfs.HDFSEventSink: HDFS IO error
> java.io.IOException: java.lang.NullPointerException
>         at org.apache.flume.sink.hdfs.BucketWriter.doOpen(BucketWriter.java:202)
>         at org.apache.flume.sink.hdfs.BucketWriter.access$000(BucketWriter.java:48)
>         at org.apache.flume.sink.hdfs.BucketWriter$1.run(BucketWriter.java:155)
>         at org.apache.flume.sink.hdfs.BucketWriter$1.run(BucketWriter.java:152)
>         at org.apache.flume.sink.hdfs.BucketWriter.runPrivileged(BucketWriter.java:125)
>         at org.apache.flume.sink.hdfs.BucketWriter.open(BucketWriter.java:152)
>         at org.apache.flume.sink.hdfs.BucketWriter.append(BucketWriter.java:307)
>         at org.apache.flume.sink.hdfs.HDFSEventSink$1.call(HDFSEventSink.java:717)
>         at org.apache.flume.sink.hdfs.HDFSEventSink$1.call(HDFSEventSink.java:714)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.NullPointerException
>         at org.apache.flume.sink.hdfs.HDFSDataStream.open(HDFSDataStream.java:75)
>         at org.apache.flume.sink.hdfs.BucketWriter.doOpen(BucketWriter.java:188)
>         ... 13 more
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FLUME-1420) Exception should be thrown if we cannot instaniate an EventSerializer

Posted by "Brock Noland (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLUME-1420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13428226#comment-13428226 ] 

Brock Noland commented on FLUME-1420:
-------------------------------------

There is actually 4 places that method can return null?  Do you see this section:

{code}

    // build the builder
    EventSerializer.Builder builder;
    try {
      builder = builderClass.newInstance();
    } catch (InstantiationException ex) {
      logger.error("Cannot instantiate builder: " + serializerType, ex);
      return null;
    } catch (IllegalAccessException ex) {
      logger.error("Cannot instantiate builder: " + serializerType, ex);
      return null;
    }

    return builder.build(context, out);
{code}
                
> Exception should be thrown if we cannot instaniate an EventSerializer
> ---------------------------------------------------------------------
>
>                 Key: FLUME-1420
>                 URL: https://issues.apache.org/jira/browse/FLUME-1420
>             Project: Flume
>          Issue Type: Bug
>          Components: Sinks+Sources
>    Affects Versions: v1.2.0
>            Reporter: Brock Noland
>            Assignee: Patrick Wendell
>         Attachments: FLUME-1420.patch.v1.txt
>
>
> Currently EventSerailizerFactory returns null if it cannot instantiate the class. Then the caller NPEs because they don't expect null. If we cannot satisfy the caller we should throw an exception
> {noformat}
> 2012-08-02 16:38:26,489 ERROR serialization.EventSerializerFactory: Unable to instantiate Builder from org.apache.flume.serialization.BodyTextEventSerializer
> 2012-08-02 16:38:26,490 WARN hdfs.HDFSEventSink: HDFS IO error
> java.io.IOException: java.lang.NullPointerException
>         at org.apache.flume.sink.hdfs.BucketWriter.doOpen(BucketWriter.java:202)
>         at org.apache.flume.sink.hdfs.BucketWriter.access$000(BucketWriter.java:48)
>         at org.apache.flume.sink.hdfs.BucketWriter$1.run(BucketWriter.java:155)
>         at org.apache.flume.sink.hdfs.BucketWriter$1.run(BucketWriter.java:152)
>         at org.apache.flume.sink.hdfs.BucketWriter.runPrivileged(BucketWriter.java:125)
>         at org.apache.flume.sink.hdfs.BucketWriter.open(BucketWriter.java:152)
>         at org.apache.flume.sink.hdfs.BucketWriter.append(BucketWriter.java:307)
>         at org.apache.flume.sink.hdfs.HDFSEventSink$1.call(HDFSEventSink.java:717)
>         at org.apache.flume.sink.hdfs.HDFSEventSink$1.call(HDFSEventSink.java:714)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.NullPointerException
>         at org.apache.flume.sink.hdfs.HDFSDataStream.open(HDFSDataStream.java:75)
>         at org.apache.flume.sink.hdfs.BucketWriter.doOpen(BucketWriter.java:188)
>         ... 13 more
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (FLUME-1420) Exception should be thrown if we cannot instaniate an EventSerializer

Posted by "Brock Noland (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FLUME-1420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brock Noland resolved FLUME-1420.
---------------------------------

       Resolution: Fixed
    Fix Version/s: v1.3.0

Committed here https://git-wip-us.apache.org/repos/asf?p=flume.git;a=commit;h=e01403004af5aa5964f1df3312549c7bb9e2c686

Thank you for your contribution Patrick!
                
> Exception should be thrown if we cannot instaniate an EventSerializer
> ---------------------------------------------------------------------
>
>                 Key: FLUME-1420
>                 URL: https://issues.apache.org/jira/browse/FLUME-1420
>             Project: Flume
>          Issue Type: Bug
>          Components: Sinks+Sources
>    Affects Versions: v1.2.0
>            Reporter: Brock Noland
>            Assignee: Patrick Wendell
>             Fix For: v1.3.0
>
>         Attachments: FLUME-1420.patch.v1.txt, FLUME-1420.patch.v2.txt
>
>
> Currently EventSerailizerFactory returns null if it cannot instantiate the class. Then the caller NPEs because they don't expect null. If we cannot satisfy the caller we should throw an exception
> {noformat}
> 2012-08-02 16:38:26,489 ERROR serialization.EventSerializerFactory: Unable to instantiate Builder from org.apache.flume.serialization.BodyTextEventSerializer
> 2012-08-02 16:38:26,490 WARN hdfs.HDFSEventSink: HDFS IO error
> java.io.IOException: java.lang.NullPointerException
>         at org.apache.flume.sink.hdfs.BucketWriter.doOpen(BucketWriter.java:202)
>         at org.apache.flume.sink.hdfs.BucketWriter.access$000(BucketWriter.java:48)
>         at org.apache.flume.sink.hdfs.BucketWriter$1.run(BucketWriter.java:155)
>         at org.apache.flume.sink.hdfs.BucketWriter$1.run(BucketWriter.java:152)
>         at org.apache.flume.sink.hdfs.BucketWriter.runPrivileged(BucketWriter.java:125)
>         at org.apache.flume.sink.hdfs.BucketWriter.open(BucketWriter.java:152)
>         at org.apache.flume.sink.hdfs.BucketWriter.append(BucketWriter.java:307)
>         at org.apache.flume.sink.hdfs.HDFSEventSink$1.call(HDFSEventSink.java:717)
>         at org.apache.flume.sink.hdfs.HDFSEventSink$1.call(HDFSEventSink.java:714)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.NullPointerException
>         at org.apache.flume.sink.hdfs.HDFSDataStream.open(HDFSDataStream.java:75)
>         at org.apache.flume.sink.hdfs.BucketWriter.doOpen(BucketWriter.java:188)
>         ... 13 more
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (FLUME-1420) Exception should be thrown if we cannot instaniate an EventSerializer

Posted by "Patrick Wendell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FLUME-1420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Wendell reassigned FLUME-1420:
--------------------------------------

    Assignee: Patrick Wendell
    
> Exception should be thrown if we cannot instaniate an EventSerializer
> ---------------------------------------------------------------------
>
>                 Key: FLUME-1420
>                 URL: https://issues.apache.org/jira/browse/FLUME-1420
>             Project: Flume
>          Issue Type: Bug
>          Components: Sinks+Sources
>    Affects Versions: v1.2.0
>            Reporter: Brock Noland
>            Assignee: Patrick Wendell
>
> Currently EventSerailizerFactory returns null if it cannot instantiate the class. Then the caller NPEs because they don't expect null. If we cannot satisfy the caller we should throw an exception
> {noformat}
> 2012-08-02 16:38:26,489 ERROR serialization.EventSerializerFactory: Unable to instantiate Builder from org.apache.flume.serialization.BodyTextEventSerializer
> 2012-08-02 16:38:26,490 WARN hdfs.HDFSEventSink: HDFS IO error
> java.io.IOException: java.lang.NullPointerException
>         at org.apache.flume.sink.hdfs.BucketWriter.doOpen(BucketWriter.java:202)
>         at org.apache.flume.sink.hdfs.BucketWriter.access$000(BucketWriter.java:48)
>         at org.apache.flume.sink.hdfs.BucketWriter$1.run(BucketWriter.java:155)
>         at org.apache.flume.sink.hdfs.BucketWriter$1.run(BucketWriter.java:152)
>         at org.apache.flume.sink.hdfs.BucketWriter.runPrivileged(BucketWriter.java:125)
>         at org.apache.flume.sink.hdfs.BucketWriter.open(BucketWriter.java:152)
>         at org.apache.flume.sink.hdfs.BucketWriter.append(BucketWriter.java:307)
>         at org.apache.flume.sink.hdfs.HDFSEventSink$1.call(HDFSEventSink.java:717)
>         at org.apache.flume.sink.hdfs.HDFSEventSink$1.call(HDFSEventSink.java:714)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.NullPointerException
>         at org.apache.flume.sink.hdfs.HDFSDataStream.open(HDFSDataStream.java:75)
>         at org.apache.flume.sink.hdfs.BucketWriter.doOpen(BucketWriter.java:188)
>         ... 13 more
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (FLUME-1420) Exception should be thrown if we cannot instaniate an EventSerializer

Posted by "Patrick Wendell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FLUME-1420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13428224#comment-13428224 ] 

Patrick Wendell commented on FLUME-1420:
----------------------------------------

Both of the "return null" statements are removed in this diff - am I missing something?
                
> Exception should be thrown if we cannot instaniate an EventSerializer
> ---------------------------------------------------------------------
>
>                 Key: FLUME-1420
>                 URL: https://issues.apache.org/jira/browse/FLUME-1420
>             Project: Flume
>          Issue Type: Bug
>          Components: Sinks+Sources
>    Affects Versions: v1.2.0
>            Reporter: Brock Noland
>            Assignee: Patrick Wendell
>         Attachments: FLUME-1420.patch.v1.txt
>
>
> Currently EventSerailizerFactory returns null if it cannot instantiate the class. Then the caller NPEs because they don't expect null. If we cannot satisfy the caller we should throw an exception
> {noformat}
> 2012-08-02 16:38:26,489 ERROR serialization.EventSerializerFactory: Unable to instantiate Builder from org.apache.flume.serialization.BodyTextEventSerializer
> 2012-08-02 16:38:26,490 WARN hdfs.HDFSEventSink: HDFS IO error
> java.io.IOException: java.lang.NullPointerException
>         at org.apache.flume.sink.hdfs.BucketWriter.doOpen(BucketWriter.java:202)
>         at org.apache.flume.sink.hdfs.BucketWriter.access$000(BucketWriter.java:48)
>         at org.apache.flume.sink.hdfs.BucketWriter$1.run(BucketWriter.java:155)
>         at org.apache.flume.sink.hdfs.BucketWriter$1.run(BucketWriter.java:152)
>         at org.apache.flume.sink.hdfs.BucketWriter.runPrivileged(BucketWriter.java:125)
>         at org.apache.flume.sink.hdfs.BucketWriter.open(BucketWriter.java:152)
>         at org.apache.flume.sink.hdfs.BucketWriter.append(BucketWriter.java:307)
>         at org.apache.flume.sink.hdfs.HDFSEventSink$1.call(HDFSEventSink.java:717)
>         at org.apache.flume.sink.hdfs.HDFSEventSink$1.call(HDFSEventSink.java:714)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.NullPointerException
>         at org.apache.flume.sink.hdfs.HDFSDataStream.open(HDFSDataStream.java:75)
>         at org.apache.flume.sink.hdfs.BucketWriter.doOpen(BucketWriter.java:188)
>         ... 13 more
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (FLUME-1420) Exception should be thrown if we cannot instaniate an EventSerializer

Posted by "Patrick Wendell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FLUME-1420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Wendell updated FLUME-1420:
-----------------------------------

    Attachment: FLUME-1420.patch.v2.txt

Oh I see. This one catches all four locations.
                
> Exception should be thrown if we cannot instaniate an EventSerializer
> ---------------------------------------------------------------------
>
>                 Key: FLUME-1420
>                 URL: https://issues.apache.org/jira/browse/FLUME-1420
>             Project: Flume
>          Issue Type: Bug
>          Components: Sinks+Sources
>    Affects Versions: v1.2.0
>            Reporter: Brock Noland
>            Assignee: Patrick Wendell
>         Attachments: FLUME-1420.patch.v1.txt, FLUME-1420.patch.v2.txt
>
>
> Currently EventSerailizerFactory returns null if it cannot instantiate the class. Then the caller NPEs because they don't expect null. If we cannot satisfy the caller we should throw an exception
> {noformat}
> 2012-08-02 16:38:26,489 ERROR serialization.EventSerializerFactory: Unable to instantiate Builder from org.apache.flume.serialization.BodyTextEventSerializer
> 2012-08-02 16:38:26,490 WARN hdfs.HDFSEventSink: HDFS IO error
> java.io.IOException: java.lang.NullPointerException
>         at org.apache.flume.sink.hdfs.BucketWriter.doOpen(BucketWriter.java:202)
>         at org.apache.flume.sink.hdfs.BucketWriter.access$000(BucketWriter.java:48)
>         at org.apache.flume.sink.hdfs.BucketWriter$1.run(BucketWriter.java:155)
>         at org.apache.flume.sink.hdfs.BucketWriter$1.run(BucketWriter.java:152)
>         at org.apache.flume.sink.hdfs.BucketWriter.runPrivileged(BucketWriter.java:125)
>         at org.apache.flume.sink.hdfs.BucketWriter.open(BucketWriter.java:152)
>         at org.apache.flume.sink.hdfs.BucketWriter.append(BucketWriter.java:307)
>         at org.apache.flume.sink.hdfs.HDFSEventSink$1.call(HDFSEventSink.java:717)
>         at org.apache.flume.sink.hdfs.HDFSEventSink$1.call(HDFSEventSink.java:714)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.NullPointerException
>         at org.apache.flume.sink.hdfs.HDFSDataStream.open(HDFSDataStream.java:75)
>         at org.apache.flume.sink.hdfs.BucketWriter.doOpen(BucketWriter.java:188)
>         ... 13 more
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira