Uploaded image for project: 'Chukwa'
  1. Chukwa
  2. CHUKWA-93

SeqFileWriter initialization crashes with NPE

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.1.2
    • Fix Version/s: None
    • Component/s: Data Collection
    • Labels:
      None
    • Environment:

      Linux, Hadoop 0.21.0-dev (trunk), Chukwa 0.1.2, Java 6

      Description

      jettyCollector fails to start up with default SeqFileWriter when no particular writer is configured.

      Log message from collector.log:

      2009-04-04 17:12:01,968 INFO main ChukwaConfiguration - chukwaConf is /home/jiaqi/code/deploy/chukwa/build/bin/../conf
      2009-04-04 17:12:02,090 INFO main log - Logging to org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog
      2009-04-04 17:12:02,138 INFO main log - jetty-6.1.14
      2009-04-04 17:12:02,206 INFO main root - initing servletCollector
      2009-04-04 17:12:02,210 INFO main SeqFileWriter - rotateInterval is 300000
      2009-04-04 17:12:02,210 INFO main SeqFileWriter - outputDir is /user/jiaqi/chukwa/logs/
      2009-04-04 17:12:02,210 INFO main SeqFileWriter - fsname is hdfs://localhost:9000/
      2009-04-04 17:12:02,210 INFO main SeqFileWriter - filesystem type from core-default.xml is org.apache.hadoop.hdfs.DistributedFileSystem
      2009-04-04 17:12:02,425 INFO main SeqFileWriter - filesystem is hdfs://localhost:9000
      2009-04-04 17:12:02,429 INFO main SeqFileWriter - start Date [Sat Apr 04 17:12:02 EDT 2009]
      2009-04-04 17:12:02,429 INFO main SeqFileWriter - Rotate from main
      2009-04-04 17:12:02,461 ERROR main / - unavailable
      java.lang.NullPointerException
      at org.apache.hadoop.io.serializer.SerializationFactory.<init>(SerializationFactory.java:52)
      at org.apache.hadoop.io.SequenceFile$Writer.init(SequenceFile.java:907)
      at org.apache.hadoop.io.SequenceFile$Writer.<init>(SequenceFile.java:856)
      at org.apache.hadoop.io.SequenceFile$Writer.<init>(SequenceFile.java:779)
      at org.apache.hadoop.io.SequenceFile.createWriter(SequenceFile.java:538)
      at org.apache.hadoop.io.SequenceFile.createWriter(SequenceFile.java:564)
      at org.apache.hadoop.chukwa.datacollection.writer.SeqFileWriter.rotate(SeqFileWriter.java:227)
      at org.apache.hadoop.chukwa.datacollection.writer.SeqFileWriter.init(SeqFileWriter.java:132)
      at org.apache.hadoop.chukwa.datacollection.collector.servlet.ServletCollector.init(ServletCollector.java:106)
      at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:431)
      at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:263)
      at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:643)
      at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
      at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
      at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
      at org.mortbay.jetty.Server.doStart(Server.java:222)
      at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
      at org.apache.hadoop.chukwa.datacollection.collector.CollectorStub.main(CollectorStub.java:91)
      2009-04-04 17:12:02,475 INFO main log - Started SelectChannelConnector@0.0.0.0:8080
      2009-04-04 17:12:03,217 INFO Timer-1 root - stats:ServletCollector,numberHTTPConnection:0,numberchunks:0
      2009-04-04 17:13:03,206 INFO Timer-1 root - stats:ServletCollector,numberHTTPConnection:0,numberchunks:0

        Activity

        Hide
        tanjiaqi Jiaqi Tan added a comment -

        Copy passed-in Configuration object in SeqFileWriter to local instance variable so that a non-null Configuration object gets passed to SequenceFile.createWriter in rotate().

        Show
        tanjiaqi Jiaqi Tan added a comment - Copy passed-in Configuration object in SeqFileWriter to local instance variable so that a non-null Configuration object gets passed to SequenceFile.createWriter in rotate().
        Hide
        asrabkin Ari Rabkin added a comment -

        yep. That's a good catch, thanks!
        +1 to patch

        Show
        asrabkin Ari Rabkin added a comment - yep. That's a good catch, thanks! +1 to patch
        Hide
        asrabkin Ari Rabkin added a comment -

        I just committed this. Thanks Jiaqi!

        Show
        asrabkin Ari Rabkin added a comment - I just committed this. Thanks Jiaqi!

          People

          • Assignee:
            Unassigned
            Reporter:
            tanjiaqi Jiaqi Tan
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development