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 <[email protected]>: > 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" <[email protected]> > > 发送时间: 2014年4月7日 星期一 > > 收件人: user <[email protected]> > > 抄送: > > 主题: [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 <[email protected]>: > > > > > 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 > > > > > > > >
