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

Mingliang Liu commented on HBASE-21071:
---------------------------------------

Thanks [~stack]. I wish I changed the configs (ideally by mistake) for the 
failing test {{TestFlushWithThroughputController::testFlushThroughputTuning}}, 
so the fix can be trivial. Unfortunately I didn't :(

The only HTU method it uses to start a mini cluster is 
{{hbtu.startMiniCluster(1);}} where 1 is the slave number. This is used by many 
other tests and they all seem happy. I run it locally multiple times and it 
always pass.

I had a look at the test log and found the delta for double assertion, 
{{EPSILON}}, seems too tight. Not sure if we can relax that a little bit.

> HBaseTestingUtility::startMiniCluster() to use builder pattern
> --------------------------------------------------------------
>
>                 Key: HBASE-21071
>                 URL: https://issues.apache.org/jira/browse/HBASE-21071
>             Project: HBase
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 3.0.0
>            Reporter: Mingliang Liu
>            Assignee: Mingliang Liu
>            Priority: Major
>         Attachments: HBASE-21071.000.patch, HBASE-21071.001.patch, 
> HBASE-21071.002.patch, HBASE-21071.003.patch, HBASE-21071.004.patch, 
> HBASE-21071.005.patch, HBASE-21071.006.patch, HBASE-21071.006.patch, 
> HBASE-21071.006.patch, HBASE-21071.006.patch, HBASE-21071.branch-2.006.patch
>
>
> Currently there are 13 {{startMiniCluster()}} methods to set up a mini 
> cluster. I'm not surprised if we have a few more in future. It's good to 
> support different combination of optional parameters. We have to pick up one 
> of them carefully while still wondering the default values of other 
> parameters; if we add a new option, we may bring more new methods.
> One solution is to use builder pattern: create a class {{MiniClusterOptions}} 
> along with a static class {{MiniClusterOptionsBuilder}}, create a new method  
> {{startMiniCluster(MiniClusterOptions)}}. In {{master}} we delete the old 13 
> methods while in branch-2, we deprecate the old 13 methods.
> Thoughts?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to