You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Hadoop QA (JIRA)" <ji...@apache.org> on 2013/09/12 15:13:52 UTC
[jira] [Commented] (HBASE-9521) clean clearBufferOnFail behavior
and deprecate it
[ https://issues.apache.org/jira/browse/HBASE-9521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13765405#comment-13765405 ]
Hadoop QA commented on HBASE-9521:
----------------------------------
{color:red}-1 overall{color}. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12602775/9521.v1.patch
against trunk revision .
{color:green}+1 @author{color}. The patch does not contain any @author tags.
{color:green}+1 tests included{color}. The patch appears to include 48 new or modified tests.
{color:red}-1 hadoop1.0{color}. The patch failed to compile against the hadoop 1.0 profile.
Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/7186//console
This message is automatically generated.
> clean clearBufferOnFail behavior and deprecate it
> -------------------------------------------------
>
> Key: HBASE-9521
> URL: https://issues.apache.org/jira/browse/HBASE-9521
> Project: HBase
> Issue Type: Bug
> Components: Client
> Affects Versions: 0.98.0, 0.96.0
> Reporter: Nicolas Liochon
> Assignee: Nicolas Liochon
> Priority: Critical
> Fix For: 0.98.0, 0.96.0
>
> Attachments: 9521.v1.patch
>
>
> The behavior with clearBufferOnFail is very fishy.
> {code}
> /**
> * When you turn {@link #autoFlush} off, you should also consider the
> * {@link #clearBufferOnFail} option. By default, asynchronous {@link Put}
> * requests will be retried on failure until successful. However, this can
> * pollute the writeBuffer and slow down batching performance. Additionally,
> * you may want to issue a number of Put requests and call
> * {@link #flushCommits()} as a barrier. In both use cases, consider setting
> * clearBufferOnFail to true to erase the buffer after {@link #flushCommits()}
> * has been called, regardless of success.
> *
> * @param autoFlush
> * Whether or not to enable 'auto-flush'.
> * @param clearBufferOnFail
> * Whether to keep Put failures in the writeBuffer
> * @see #flushCommits
> */
> public void setAutoFlush(boolean autoFlush, boolean clearBufferOnFail) {
> this.autoFlush = autoFlush;
> this.clearBufferOnFail = autoFlush || clearBufferOnFail; <============ yo man
> }
> {code}
> {code}
> public void setAutoFlush(boolean autoFlush) {
> setAutoFlush(autoFlush, autoFlush); <============ more yo
> }
> {code}
> So by default, a HTable has
> - autoflush == true
> - clearBufferOnFail == true
> BUT, if you call setAutoFlush(false), you have
> - autoflush == false
> - clearBufferOnFail == false
> So:
> - you're setting two parameters instead of only one, without being told so.
> - a side effect is that failed operations will be tried twice:
> - one in the standard process
> - one in the table close, as we're flushing the buffer again
> I would like to:
> - deprecate clearBufferOnFail.
> - deprecate setAutoFlush(boolean), to make things clear about what we're doing.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira