Flume
  1. Flume
  2. FLUME-1761

FileChannel can NPE when log metadata file is empty

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: v1.3.0
    • Fix Version/s: v1.3.1
    • Component/s: None
    • Labels:
      None

      Description

      Error:

      java.lang.NullPointerException 
      at org.apache.flume.channel.file.LogFileV3$SequentialReader.<init>(LogFileV3.java:288) 
      

      ProtosFactory.LogFileMetaData.parseDelimitedFrom returns null if the the first byte of the file cannot be read.

      1. FLUME-1761-2.patch
        16 kB
        Brock Noland
      2. FLUME-1761-3.patch
        16 kB
        Brock Noland

        Issue Links

          Activity

          Hide
          Hari Shreedharan added a comment -

          Patch committed, rev: 9040e49c0c95b66f3ff3a0c879d3a6ea0bf11443. Thanks Brock!

          Show
          Hari Shreedharan added a comment - Patch committed, rev: 9040e49c0c95b66f3ff3a0c879d3a6ea0bf11443. Thanks Brock!
          Hide
          Hudson added a comment -

          Integrated in flume-trunk #343 (See https://builds.apache.org/job/flume-trunk/343/)
          FLUME-1761. FileChannel can NPE when log metadata file is empty (Revision 9040e49c0c95b66f3ff3a0c879d3a6ea0bf11443)

          Result = SUCCESS
          hshreedharan : http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=9040e49c0c95b66f3ff3a0c879d3a6ea0bf11443
          Files :

          • flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestLog.java
          • flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/Commit.java
          • flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/CheckpointRebuilder.java
          • flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/LogFileFactory.java
          • flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/Take.java
          • flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/TransactionEventRecord.java
          • flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/Rollback.java
          • flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/Put.java
          • flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/LogFileV3.java
          Show
          Hudson added a comment - Integrated in flume-trunk #343 (See https://builds.apache.org/job/flume-trunk/343/ ) FLUME-1761 . FileChannel can NPE when log metadata file is empty (Revision 9040e49c0c95b66f3ff3a0c879d3a6ea0bf11443) Result = SUCCESS hshreedharan : http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=9040e49c0c95b66f3ff3a0c879d3a6ea0bf11443 Files : flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestLog.java flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/Commit.java flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/CheckpointRebuilder.java flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/LogFileFactory.java flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/Take.java flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/TransactionEventRecord.java flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/Rollback.java flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/Put.java flume-ng-channels/flume-file-channel/src/main/java/org/apache/flume/channel/file/LogFileV3.java

            People

            • Assignee:
              Brock Noland
              Reporter:
              Brock Noland
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development