hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kannan Muthukkaruppan (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HBASE-2359) WALEdit doesn't implement HeapSize
Date Tue, 23 Mar 2010 06:02:27 GMT

    [ https://issues.apache.org/jira/browse/HBASE-2359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12848554#action_12848554

Kannan Muthukkaruppan commented on HBASE-2359:

The only place heapSize gets used for WALEdit is here in HLog.java:doWrite():

     this.editsSize.addAndGet(logKey.heapSize() + logEdit.heapSize());

where <i>editSize</i> is the size of current log, and is used in figuring when
to rotate logs.

   if (this.editsSize.get() > this.logrollsize) {

Strictly speaking for HLogKey & WALEdit we are interested in the serialized size rather
than the heap size. 

Jonathan suggested perhaps adding an interface called WriteableSize, and changing HLogKey
& WALEdit to implement that interface instead of HeapSize.

Another possibility---  SequenceFile.Writer has a "getLength" method which looks like what
we want. We could  just use that instead of maintaining "editsSize" in HLog, i.e. replace
the above logic with something like:

  if (this.writer.getLength() > this.logrollsize) {

We can then do away with implementing any size method for HLogKey & WALEdit. 

I'll give it a try... but let me know if you have suggestions/feedback.

> WALEdit doesn't implement HeapSize
> ----------------------------------
>                 Key: HBASE-2359
>                 URL: https://issues.apache.org/jira/browse/HBASE-2359
>             Project: Hadoop HBase
>          Issue Type: Bug
>    Affects Versions: 0.20.3
>            Reporter: Jean-Daniel Cryans
>            Assignee: Kannan Muthukkaruppan
>             Fix For: 0.20.4, 0.21.0
> WALEdit from HBASE-2283 defines a method heapSize() but doesn't implement HeapSize.
>  - Make it implement the interface.
>  - Add a test to TestHeapSize.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message