Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: v1.6.0
    • Fix Version/s: v1.7.0
    • Component/s: Sinks+Sources
    • Labels:
    • Environment:

      Mac OS 10.10.3, Java 1.7.0_60

    • Flags:
      Patch

      Description

      A NPE is thrown when KafkaSource calls counter.incrementKafkaEmptyCount() because it expects MonitoredCounterGroup.counterMap to contain key "source.kafka.empty.count". A patch is included which adds this key to the ATTRIBUTES string array, which is used to pre-populate keys with an initial value.

      1. FLUME-2672.patch
        0.8 kB
        Rigo MacTaggart
      2. FLUME-2672-with-test.patch
        3 kB
        Rigo MacTaggart
      3. FLUME-2672-with-test-git-diff.patch
        3 kB
        Rigo MacTaggart

        Activity

        Hide
        Ashish Paliwal added a comment -

        +1, Patch looks good. May be we should have some test cases around counters as well.

        Show
        Ashish Paliwal added a comment - +1, Patch looks good. May be we should have some test cases around counters as well.
        Hide
        Rigo MacTaggart added a comment -

        Added a test for KafkaSourceCounter. The test exercises the increment/getter methods.

        Show
        Rigo MacTaggart added a comment - Added a test for KafkaSourceCounter. The test exercises the increment/getter methods.
        Hide
        Rigo MacTaggart added a comment -

        Any additional work need to be done on this issue?

        Show
        Rigo MacTaggart added a comment - Any additional work need to be done on this issue?
        Hide
        Xuri Nagarin added a comment -

        Is there a workaround available for this issue?

        Show
        Xuri Nagarin added a comment - Is there a workaround available for this issue?
        Hide
        Hari Shreedharan added a comment -

        Ashish Paliwal - If this looks ok to you, do you mind committing it? Thanks!

        Show
        Hari Shreedharan added a comment - Ashish Paliwal - If this looks ok to you, do you mind committing it? Thanks!
        Hide
        Ashish Paliwal added a comment -

        Let me check and commit.

        Show
        Ashish Paliwal added a comment - Let me check and commit.
        Hide
        Ashish Paliwal added a comment -

        Getting an error while applying the patch.

        bash-3.2$ git apply --check FLUME-2672-with-test.patch 
        error: src/main/java/org/apache/flume/instrumentation/kafka/KafkaSourceCounter.java: No such file or directory
        
        Show
        Ashish Paliwal added a comment - Getting an error while applying the patch. bash-3.2$ git apply --check FLUME-2672-with-test.patch error: src/main/java/org/apache/flume/instrumentation/kafka/KafkaSourceCounter.java: No such file or directory
        Hide
        Johny Rufus added a comment -

        Rigo MacTaggart, will it be possible to attach a 'git diff', instead of diffing from IntelliJ

        Show
        Johny Rufus added a comment - Rigo MacTaggart , will it be possible to attach a 'git diff', instead of diffing from IntelliJ
        Hide
        Johny Rufus added a comment -

        Rigo MacTaggart, I can take your patch and submit a git diff based on your changes, but the TestKafkaSourceCounter.java is missing the Apache License header, without which we wont be able to process your patch, can you kindly look at adding the Apache License header

        Show
        Johny Rufus added a comment - Rigo MacTaggart , I can take your patch and submit a git diff based on your changes, but the TestKafkaSourceCounter.java is missing the Apache License header, without which we wont be able to process your patch, can you kindly look at adding the Apache License header
        Hide
        Rigo MacTaggart added a comment -

        Sorry of the delay; attached is a new patch file which includes the ASF header.

        Show
        Rigo MacTaggart added a comment - Sorry of the delay; attached is a new patch file which includes the ASF header.
        Hide
        Johny Rufus added a comment -

        +1, Running tests and committing

        Show
        Johny Rufus added a comment - +1, Running tests and committing
        Hide
        ASF subversion and git services added a comment -

        Commit 67189ca84d24154150fa2ca4194b3b8d79400bda in flume's branch refs/heads/trunk from Johny Rufus
        [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=67189ca ]

        FLUME-2672. NPE in KafkaSourceCounter

        (Rigo MacTaggart via Johny Rufus)

        Show
        ASF subversion and git services added a comment - Commit 67189ca84d24154150fa2ca4194b3b8d79400bda in flume's branch refs/heads/trunk from Johny Rufus [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=67189ca ] FLUME-2672 . NPE in KafkaSourceCounter (Rigo MacTaggart via Johny Rufus)
        Hide
        ASF subversion and git services added a comment -

        Commit 22083176c50bb4c6da81906ae2eeb3d43c030f7a in flume's branch refs/heads/flume-1.7 from Johny Rufus
        [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=2208317 ]

        FLUME-2672. NPE in KafkaSourceCounter

        (Rigo MacTaggart via Johny Rufus)

        Show
        ASF subversion and git services added a comment - Commit 22083176c50bb4c6da81906ae2eeb3d43c030f7a in flume's branch refs/heads/flume-1.7 from Johny Rufus [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=2208317 ] FLUME-2672 . NPE in KafkaSourceCounter (Rigo MacTaggart via Johny Rufus)
        Hide
        Johny Rufus added a comment -

        Thanks Rigo MacTaggart for the patch !!

        Show
        Johny Rufus added a comment - Thanks Rigo MacTaggart for the patch !!
        Hide
        Hudson added a comment -

        SUCCESS: Integrated in Flume-trunk-hbase-1 #122 (See https://builds.apache.org/job/Flume-trunk-hbase-1/122/)
        FLUME-2672. NPE in KafkaSourceCounter (johnyrufus: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=67189ca84d24154150fa2ca4194b3b8d79400bda)

        • flume-ng-core/src/test/java/org/apache/flume/instrumentation/kafka/KafkaSourceCounterTest.java
        • flume-ng-core/src/main/java/org/apache/flume/instrumentation/kafka/KafkaSourceCounter.java
        Show
        Hudson added a comment - SUCCESS: Integrated in Flume-trunk-hbase-1 #122 (See https://builds.apache.org/job/Flume-trunk-hbase-1/122/ ) FLUME-2672 . NPE in KafkaSourceCounter (johnyrufus: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=67189ca84d24154150fa2ca4194b3b8d79400bda ) flume-ng-core/src/test/java/org/apache/flume/instrumentation/kafka/KafkaSourceCounterTest.java flume-ng-core/src/main/java/org/apache/flume/instrumentation/kafka/KafkaSourceCounter.java

          People

          • Assignee:
            Rigo MacTaggart
            Reporter:
            Rigo MacTaggart
          • Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development