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

Jerry He commented on HBASE-13345:
----------------------------------

Attached a simple patch.

I have the unit test for HBASE-13317 almost ready. Now I am thinking about 
putting a combined patch in HBASE-13317. 
On the other hand, I wanted to run the QA here. If there is any failure, it can 
be isolated from HBASE-13317.

Some explanation on this patch:

This would allow users of LocalHBaseCluster (and MiniHBaseCluster) to modify 
the conf to set a different REGION_SERVER_IMPL, then call addRegionServer().
The new region server will use the new REGION_SERVER_IMPL.  Currently the 
REGION_SERVER_IMPL or the rs class specified when the cluster is created is 
always used.

The change is also consistent with how addMaster() works.  In the current code, 
we have the same logic for the master:

{code}
  public JVMClusterUtil.MasterThread addMaster(Configuration c, final int index)
  throws IOException {
    // Create each master with its own Configuration instance so each has
    // its HConnection instance rather than share (see HBASE_INSTANCES down in
    // the guts of HConnectionManager.

    // Also, create separate CoordinatedStateManager instance per Server.
    // This is special case when we have to have more than 1 
CoordinatedStateManager
    // within 1 process.
    CoordinatedStateManager cp = 
CoordinatedStateManagerFactory.getCoordinatedStateManager(conf);

    JVMClusterUtil.MasterThread mt = JVMClusterUtil.createMasterThread(c, cp,
        (Class<? extends HMaster>) conf.getClass(HConstants.MASTER_IMPL, 
this.masterClass), index);
    this.masterThreads.add(mt);
    return mt;
{code}

This patch is simply following what we do in addMaster().


> Fix LocalHBaseCluster so that different region server impl can be used for 
> different slaves
> -------------------------------------------------------------------------------------------
>
>                 Key: HBASE-13345
>                 URL: https://issues.apache.org/jira/browse/HBASE-13345
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Jerry He
>            Assignee: Jerry He
>            Priority: Minor
>         Attachments: HBASE-13345-master.patch
>
>
> LocalHBaseCluster and MiniHBaseCluster allow plugging in custom region server 
> implementations.
> This JIRA will fix a loophole so that different implementations can be used 
> for different slaves. 
> For example, MyRegionServer1 for slave1, MyRegionServer1 for slave2.
> Or  MyRegionServer1 for slave1,  All other slaves use the default.
> This will help targeted testing using MiniHBaseCluster.
> I am working on a unit test for HBASE-13317.  This fix will be useful..



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

Reply via email to