Flume
  1. Flume
  2. FLUME-2844

ChannelCounter of SpillableMemoryChannel doesn't register actually.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: v1.6.0
    • Fix Version/s: v1.7.0
    • Component/s: Channel
    • Labels:
      None

      Description

      When using SpillableMemoryChannel, the values of all metrics of channel component int monitoring system is zero.It's caused by a bug belowed.
      SpillableMemoryChannel extends FileChannel,and each of them have a ChannelCounter-Type field named of 'channelCounter'. FileChannel's channelCounter filed is private, so it can not be override by SpillableMemoryChannel. SpillableMemoryChannel's channelCounter is initialized in configure method(Line 600 at SpillableMemoryChannel.java), then super.configure() is called(Line 727 at SpillableMemoryChannel.java). So FileChannel's channelCounter is also initialized(Line 267 at SpillableMemoryChannel.java).
      When SpillableMemoryChannel start(call start() method), it should and want to register ChannelCounter. In start() method, SpillableMemoryChannel calls super.start() (Line 768 at SpillableMemoryChannel.java), then FileChannel calls channelCounter.start() to register channelCounter. But this channelCounter is the one of FileChannle, not the one of SpillableMemoryChannel!
      This bug results that when using SpillableMemoryChannel, the values of all metrics of channel component is zero.
      Maybe the qualifier of FileChannel's channelCounter filed should be changed to prtected, and remove the channelCounter filed of SpillableMemoryChannel.

      1. FLUME-2844.0000.patch
        2 kB
        sandywei
      2. FLUME-2844-2.patch
        2 kB
        Denes Arvay

        Issue Links

          Activity

          Hide
          sandywei added a comment -

          I solved by using the same channelCounter for FileChannel.

          1.add setChannelCounter() method for FileChannel
          2.set channelCounter in SubClass

          Show
          sandywei added a comment - I solved by using the same channelCounter for FileChannel. 1.add setChannelCounter() method for FileChannel 2.set channelCounter in SubClass
          Hide
          Denes Arvay added a comment -

          Hi sandywei, thanks for the patch. Could you please submit it to reviewboard.apache.org? I'd be happy to review it there. Thank you.

          Show
          Denes Arvay added a comment - Hi sandywei , thanks for the patch. Could you please submit it to reviewboard.apache.org? I'd be happy to review it there. Thank you.
          Hide
          Mike Percy added a comment -
          Show
          Mike Percy added a comment - I think Denes means http://reviews.apache.org More detailed instructions can be found here: https://cwiki.apache.org/confluence/display/FLUME/How+to+Contribute#HowtoContribute-ProvidingPatches
          Hide
          Denes Arvay added a comment -

          I've attached a new patch. I decided not to touch the superclass' channelCounter

          Show
          Denes Arvay added a comment - I've attached a new patch. I decided not to touch the superclass' channelCounter
          Hide
          Mike Percy added a comment -

          Hi Denes Arvay, I am a little confused by the new patch since I thought sandywei was working on this.

          Show
          Mike Percy added a comment - Hi Denes Arvay , I am a little confused by the new patch since I thought sandywei was working on this.
          Hide
          Mike Percy added a comment -

          Hi sandywei, please let us know if you are interested in getting your patch to the finish line or if you are okay with Denes Arvay taking over on this bug fix.

          Show
          Mike Percy added a comment - Hi sandywei , please let us know if you are interested in getting your patch to the finish line or if you are okay with Denes Arvay taking over on this bug fix.
          Hide
          Denes Arvay added a comment -

          Thanks Mike Percy for your comment and sorry for the confusion.
          sandywei, of course I'm totally fine with dropping my patch and moving forward with yours if you are working on it. Please let me know your thoughts on this.

          Show
          Denes Arvay added a comment - Thanks Mike Percy for your comment and sorry for the confusion. sandywei , of course I'm totally fine with dropping my patch and moving forward with yours if you are working on it. Please let me know your thoughts on this.
          Hide
          Denes Arvay added a comment -

          Hi sandywei, I hope you don't mind if I'm taking over on this patch. Please let me know if you have any concerns regarding this.

          Show
          Denes Arvay added a comment - Hi sandywei , I hope you don't mind if I'm taking over on this patch. Please let me know if you have any concerns regarding this.
          Hide
          Mike Percy added a comment -

          +1. I am about to commit this.

          Show
          Mike Percy added a comment - +1. I am about to commit this.
          Hide
          ASF subversion and git services added a comment -

          Commit 118d5a4bcf5371fb215e0f7393fadf26073643f8 in flume's branch refs/heads/trunk from Denes Arvay
          [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=118d5a4 ]

          FLUME-2844. SpillableMemoryChannel must start ChannelCounter

          Reviewed by Bessenyei Balázs Donát

          (Denes Arvay via Mike Percy)

          Show
          ASF subversion and git services added a comment - Commit 118d5a4bcf5371fb215e0f7393fadf26073643f8 in flume's branch refs/heads/trunk from Denes Arvay [ https://git-wip-us.apache.org/repos/asf?p=flume.git;h=118d5a4 ] FLUME-2844 . SpillableMemoryChannel must start ChannelCounter Reviewed by Bessenyei Balázs Donát (Denes Arvay via Mike Percy)
          Hide
          Mike Percy added a comment -

          Pushed to trunk. Thanks for the patch Denes!

          Show
          Mike Percy added a comment - Pushed to trunk. Thanks for the patch Denes!
          Hide
          Hudson added a comment -

          ABORTED: Integrated in Jenkins build Flume-trunk-hbase-1 #196 (See https://builds.apache.org/job/Flume-trunk-hbase-1/196/)
          FLUME-2844. SpillableMemoryChannel must start ChannelCounter (mpercy: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=118d5a4bcf5371fb215e0f7393fadf26073643f8)

          • (edit) flume-ng-channels/flume-spillable-memory-channel/src/test/java/org/apache/flume/channel/TestSpillableMemoryChannel.java
          • (edit) flume-ng-channels/flume-spillable-memory-channel/src/main/java/org/apache/flume/channel/SpillableMemoryChannel.java
          Show
          Hudson added a comment - ABORTED: Integrated in Jenkins build Flume-trunk-hbase-1 #196 (See https://builds.apache.org/job/Flume-trunk-hbase-1/196/ ) FLUME-2844 . SpillableMemoryChannel must start ChannelCounter (mpercy: http://git-wip-us.apache.org/repos/asf/flume/repo?p=flume.git&a=commit&h=118d5a4bcf5371fb215e0f7393fadf26073643f8 ) (edit) flume-ng-channels/flume-spillable-memory-channel/src/test/java/org/apache/flume/channel/TestSpillableMemoryChannel.java (edit) flume-ng-channels/flume-spillable-memory-channel/src/main/java/org/apache/flume/channel/SpillableMemoryChannel.java

            People

            • Assignee:
              Denes Arvay
              Reporter:
              Daniel Wen
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development