liu xiaofei created FLUME-2634:
----------------------------------

             Summary: channelCounter of SpillableMemoryChannel not register
                 Key: FLUME-2634
                 URL: https://issues.apache.org/jira/browse/FLUME-2634
             Project: Flume
          Issue Type: Bug
    Affects Versions: v1.5.2
            Reporter: liu xiaofei


when i use SpillableMemoryChannel , the monitor is JSON Report. I saw like this:

"CHANNEL.dmChannel": {
        "EventPutSuccessCount": "0",
        "ChannelFillPercentage": "0.0",
        "Type": "CHANNEL",
        "EventPutAttemptCount": "0",
        "ChannelSize": "0",
        "StopTime": "0",
        "StartTime": "1425018740384",
        "EventTakeSuccessCount": "0",
        "ChannelCapacity": "100000000",
        "EventTakeAttemptCount": "0"
    }

but my memoryCapacity is 1000000, and overflowCapacity is the default value 
100000000. when i refrsh flume's http monitor metrics , this channel's counters 
are no change and i'm sure there has data through..

i saw the SpillableMemoryChannel source code and find in function start():

@Override
  public synchronized void start() {
    super.start();
    int overFlowCount = super.getDepth();
    if (drainOrder.isEmpty()) {
      drainOrder.putOverflow(overFlowCount);
      totalStored.release(overFlowCount);
    }
    int totalCount =  overFlowCount + memQueue.size();
    channelCounter.setChannelCapacity(memoryCapacity + getOverflowCapacity());
    channelCounter.setChannelSize(totalCount);
  }

there is no "channelCounter.start()"... so the counter is not registered in 
MBeanServer..  and only if the channel overflow the counter will change..
am i correct?
if i am correct, please fix!

ths! 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to