You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by LEI Xiaofeng <le...@ihep.ac.cn> on 2014/04/07 13:55:42 UTC

how to develop a custom LoadBalancer for HBase

Hello,

Does anybody know how to develop a custom LoadBalancer for HBase? What is the development process? And how to use my custom LoadBalancer? Do I need to re-compile the whole HBase source code?



Thanks,
Xiaofeng


Re: how to develop a custom LoadBalancer for HBase

Posted by ramkrishna vasudevan <ra...@gmail.com>.
I mean restart the master server node.


On Mon, Apr 7, 2014 at 5:35 PM, ramkrishna vasudevan <
ramkrishna.s.vasudevan@gmail.com> wrote:

> You need to use this configuration
> "hbase.master.loadbalancer.class" to specify the load balancer class as
> its Fully qualified class name.
> You need to recompile the code to pick up your new balancer class, which
> means you may have to restart your cluster.
>
>
> On Mon, Apr 7, 2014 at 5:25 PM, LEI Xiaofeng <le...@ihep.ac.cn> wrote:
>
>> Hello,
>>
>> Does anybody know how to develop a custom LoadBalancer for HBase? What is
>> the development process? And how to use my custom LoadBalancer? Do I need
>> to re-compile the whole HBase source code?
>>
>>
>>
>> Thanks,
>> Xiaofeng
>>
>>
>

Re: how to develop a custom LoadBalancer for HBase

Posted by ramkrishna vasudevan <ra...@gmail.com>.
You need to use this configuration
"hbase.master.loadbalancer.class" to specify the load balancer class as its
Fully qualified class name.
You need to recompile the code to pick up your new balancer class, which
means you may have to restart your cluster.


On Mon, Apr 7, 2014 at 5:25 PM, LEI Xiaofeng <le...@ihep.ac.cn> wrote:

> Hello,
>
> Does anybody know how to develop a custom LoadBalancer for HBase? What is
> the development process? And how to use my custom LoadBalancer? Do I need
> to re-compile the whole HBase source code?
>
>
>
> Thanks,
> Xiaofeng
>
>

Re: [SPAM] Re: how to develop a custom LoadBalancer for HBase

Posted by Jean-Marc Spaggiari <je...@spaggiari.org>.
Hi Lie,

You need to bundle your class in a jar and make sure the jar in the HBase
classpath. For my own cluster I place it in the lib directory. The
hbase-site.xml will only define the classname, not the jar file path.

You will need to restart the master (/bin/rolling-restart.sh --master-only)

JM


2014-04-07 8:24 GMT-04:00 LEI Xiaofeng <le...@ihep.ac.cn>:

> Thanks for your reply,
>
> So I just need to compile my own LoadBalancer.java? But how can I deploy
> it to the Master? And how to write the <value> in hbase-site.xml? Is it a
> absolute path?
>
>
>
> > -----原始邮件-----
> > 发件人: "Jean-Marc Spaggiari" <je...@spaggiari.org>
> > 发送时间: 2014年4月7日 星期一
> > 收件人: user <us...@hbase.apache.org>
> > 抄送:
> > 主题: [SPAM] Re: how to develop a custom LoadBalancer for HBase
> >
> > Shameless plug:
> >
> http://www.spaggiari.org/index.php/hbase/changing-the-hbase-default-loadbalancer#.U0KTsUU6toc
> ;)
> >
> > You don't need to recompile the entire HBase source code. Just your code,
> > then deploy it to the Master server and do the config in hbase-site.xml:
> >     <property>
> >       <name>hbase.master.loadbalancer.class</name>
> >       <value>org.spaggiari.hbase.RegionServerPerformanceBalancer</value>
> >     </property>
> >
> > Feel free to ask more questions if required.
> >
> > JM
> >
> >
> > 2014-04-07 7:55 GMT-04:00 LEI Xiaofeng <le...@ihep.ac.cn>:
> >
> > > Hello,
> > >
> > > Does anybody know how to develop a custom LoadBalancer for HBase? What
> is
> > > the development process? And how to use my custom LoadBalancer? Do I
> need
> > > to re-compile the whole HBase source code?
> > >
> > >
> > >
> > > Thanks,
> > > Xiaofeng
> > >
> > >
>
>

Re: [SPAM] Re: how to develop a custom LoadBalancer for HBase

Posted by LEI Xiaofeng <le...@ihep.ac.cn>.
Thanks for your reply,

So I just need to compile my own LoadBalancer.java? But how can I deploy it to the Master? And how to write the <value> in hbase-site.xml? Is it a absolute path? 



> -----原始邮件-----
> 发件人: "Jean-Marc Spaggiari" <je...@spaggiari.org>
> 发送时间: 2014年4月7日 星期一
> 收件人: user <us...@hbase.apache.org>
> 抄送: 
> 主题: [SPAM] Re: how to develop a custom LoadBalancer for HBase
> 
> Shameless plug:
> http://www.spaggiari.org/index.php/hbase/changing-the-hbase-default-loadbalancer#.U0KTsUU6toc;)
> 
> You don't need to recompile the entire HBase source code. Just your code,
> then deploy it to the Master server and do the config in hbase-site.xml:
>     <property>
>       <name>hbase.master.loadbalancer.class</name>
>       <value>org.spaggiari.hbase.RegionServerPerformanceBalancer</value>
>     </property>
> 
> Feel free to ask more questions if required.
> 
> JM
> 
> 
> 2014-04-07 7:55 GMT-04:00 LEI Xiaofeng <le...@ihep.ac.cn>:
> 
> > Hello,
> >
> > Does anybody know how to develop a custom LoadBalancer for HBase? What is
> > the development process? And how to use my custom LoadBalancer? Do I need
> > to re-compile the whole HBase source code?
> >
> >
> >
> > Thanks,
> > Xiaofeng
> >
> >


Re: how to develop a custom LoadBalancer for HBase

Posted by Jean-Marc Spaggiari <je...@spaggiari.org>.
Shameless plug:
http://www.spaggiari.org/index.php/hbase/changing-the-hbase-default-loadbalancer#.U0KTsUU6toc;)

You don't need to recompile the entire HBase source code. Just your code,
then deploy it to the Master server and do the config in hbase-site.xml:
    <property>
      <name>hbase.master.loadbalancer.class</name>
      <value>org.spaggiari.hbase.RegionServerPerformanceBalancer</value>
    </property>

Feel free to ask more questions if required.

JM


2014-04-07 7:55 GMT-04:00 LEI Xiaofeng <le...@ihep.ac.cn>:

> Hello,
>
> Does anybody know how to develop a custom LoadBalancer for HBase? What is
> the development process? And how to use my custom LoadBalancer? Do I need
> to re-compile the whole HBase source code?
>
>
>
> Thanks,
> Xiaofeng
>
>