You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by ch huang <ju...@gmail.com> on 2014/06/19 05:10:14 UTC

issue about two hbase on same hadoop cluster

hi,maillist:
              i have A ,B,C,D,E,F six boxes,

A,B,C   installed zookeeper  and i installed hdfs on all six boxes,A (NN)
,B,C,D,E,F(DN)
i installed old hbase cluster on A,B,C
A hbase-master
B hbase-regionserver
C hbase-regionserver

for some reason ,i stoped the hbase cluster ,and installed new cluster on
D,E,F
 D hbase-master
E hbase-regionserver
F hbase-regionserver

the old hbase-site.xml content is

<configuration>
        <property>
                <name>hbase.cluster.distributed</name>
                <value>true</value>
        </property>
        <property>
                <name>hbase.rootdir</name>
                <value>hdfs://CH22:9000/hbase</value>
        </property>
        <property>
                <name>hbase.zookeeper.quorum</name>
                <value>192.168.10.22,192.168.10.34,192.168.10.35</value>
        </property>
        <property>
                <name>hbase.zookeeper.property.clientPort</name>
                <value>2281</value>
        </property>
        <property>
                <name>hbase.regionserver.codecs</name>
                <value>snappy</value>
        </property>
        <property>
                <name>hbase.nameserver.address</name>
                <value>192.168.10.22</value>
        </property>
        <property>
                <name>hfile.block.cache.size</name>
                <value>0.4</value>
        </property>
        <property>
                <name>hbase.rpc.timeout</name>
                <value>180000</value>
        </property>
<property>
        <name>hbase.hregion.max.filesize</name>
        <value>10705960960</value>
</property>
<property>
        <name>hbase.hregion.memstore.flush.size</name>
        <value>268435456</value>
</property>
<property>
        <name>hbase.regionserver.handler.count</name>
        <value>500</value>
        <description>Count of RPC Listener instances spun up on
RegionServers. used by the master for count of master handlers. Default
10.</description>
</property>
<!--
<property>
        <name>hbase.hregion.majorcompaction</name>
        <value>604800000</value>
        <description>do major compaction once a week</description>
</property>
-->
<property>
        <name>hbase.regionserver.lease.period</name>
        <value>720000</value>
</property>
<property>
        <name>hbase.master.distributed.log.splitting</name>
        <value>false</value>
</property>
</configuration>

and the new hbase-site.xml content is

<configuration>
        <property>
                <name>hbase.cluster.distributed</name>
                <value>true</value>
        </property>
        <property>
                <name>hbase.rootdir</name>
                <value>hdfs://CH22:9000/hbasenew</value>
        </property>
        <property>
                <name>hbase.zookeeper.quorum</name>
                <value>192.168.10.22,192.168.10.34,192.168.10.35</value>
        </property>
        <property>
                <name>hbase.zookeeper.property.clientPort</name>
                <value>2281</value>
        </property>
        <property>
                <name>zookeeper.znode.parent</name>
                <value>/hbase-new</value>
        </property>
        <property>
                <name>hbase.regionserver.codecs</name>
                <value>snappy</value>
        </property>
<!-- dns error -->
        <property>
                <name>hbase.nameserver.address</name>
                <value>192.168.10.13</value>
        </property>
        <property>
                <name>hfile.block.cache.size</name>
                <value>0.4</value>
        </property>
        <property>
                <name>hbase.rpc.timeout</name>
                <value>180000</value>
        </property>
<property>
        <name>hbase.hregion.max.filesize</name>
        <value>10705960960</value>
</property>
<property>
        <name>hbase.hregion.memstore.flush.size</name>
        <value>268435456</value>
</property>
<property>
        <name>hbase.regionserver.handler.count</name>
        <value>500</value>
        <description>Count of RPC Listener instances spun up on
RegionServers. used by the master for count of master handlers. Default
10.</description>
</property>
<property>
        <name>hbase.regionserver.lease.period</name>
        <value>720000</value>
</property>
<property>
        <name>hbase.master.distributed.log.splitting</name>
        <value>false</value>
</property>
</configuration>

and i write a test code , i packed it with new hbase-site.xml ,and find  it
still connect to the old cluster ,why??

 public static void main(String[] args) throws IOException {
  // TODO Auto-generated method stub
  HBaseConfiguration hc = new HBaseConfiguration(new Configuration());
    HTableDescriptor ht = new HTableDescriptor("User");
    ht.addFamily( new HColumnDescriptor("Id"));
    ht.addFamily( new HColumnDescriptor("Name"));
    System.out.println( "connecting" );
    HBaseAdmin hba = new HBaseAdmin( hc );
    System.out.println( "Creating Table" );
    hba.createTable( ht );
    System.out.println("Done......");


 }

Re: issue about two hbase on same hadoop cluster

Posted by Dima Spivak <ds...@cloudera.com>.
ch,

Not sure if this is dated, but
http://mail-archives.apache.org/mod_mbox/hbase-user/201010.mbox/%3CAANLkTimzn8hWAVhAqga2f=uZ4Ta22fXWT7qoE3Y+mD_Y@mail.gmail.com%3E
might be a good place to start.

-Dima


On Wed, Jun 18, 2014 at 8:10 PM, ch huang <ju...@gmail.com> wrote:

> hi,maillist:
>               i have A ,B,C,D,E,F six boxes,
>
> A,B,C   installed zookeeper  and i installed hdfs on all six boxes,A (NN)
> ,B,C,D,E,F(DN)
> i installed old hbase cluster on A,B,C
> A hbase-master
> B hbase-regionserver
> C hbase-regionserver
>
> for some reason ,i stoped the hbase cluster ,and installed new cluster on
> D,E,F
>  D hbase-master
> E hbase-regionserver
> F hbase-regionserver
>
> the old hbase-site.xml content is
>
> <configuration>
>         <property>
>                 <name>hbase.cluster.distributed</name>
>                 <value>true</value>
>         </property>
>         <property>
>                 <name>hbase.rootdir</name>
>                 <value>hdfs://CH22:9000/hbase</value>
>         </property>
>         <property>
>                 <name>hbase.zookeeper.quorum</name>
>                 <value>192.168.10.22,192.168.10.34,192.168.10.35</value>
>         </property>
>         <property>
>                 <name>hbase.zookeeper.property.clientPort</name>
>                 <value>2281</value>
>         </property>
>         <property>
>                 <name>hbase.regionserver.codecs</name>
>                 <value>snappy</value>
>         </property>
>         <property>
>                 <name>hbase.nameserver.address</name>
>                 <value>192.168.10.22</value>
>         </property>
>         <property>
>                 <name>hfile.block.cache.size</name>
>                 <value>0.4</value>
>         </property>
>         <property>
>                 <name>hbase.rpc.timeout</name>
>                 <value>180000</value>
>         </property>
> <property>
>         <name>hbase.hregion.max.filesize</name>
>         <value>10705960960</value>
> </property>
> <property>
>         <name>hbase.hregion.memstore.flush.size</name>
>         <value>268435456</value>
> </property>
> <property>
>         <name>hbase.regionserver.handler.count</name>
>         <value>500</value>
>         <description>Count of RPC Listener instances spun up on
> RegionServers. used by the master for count of master handlers. Default
> 10.</description>
> </property>
> <!--
> <property>
>         <name>hbase.hregion.majorcompaction</name>
>         <value>604800000</value>
>         <description>do major compaction once a week</description>
> </property>
> -->
> <property>
>         <name>hbase.regionserver.lease.period</name>
>         <value>720000</value>
> </property>
> <property>
>         <name>hbase.master.distributed.log.splitting</name>
>         <value>false</value>
> </property>
> </configuration>
>
> and the new hbase-site.xml content is
>
> <configuration>
>         <property>
>                 <name>hbase.cluster.distributed</name>
>                 <value>true</value>
>         </property>
>         <property>
>                 <name>hbase.rootdir</name>
>                 <value>hdfs://CH22:9000/hbasenew</value>
>         </property>
>         <property>
>                 <name>hbase.zookeeper.quorum</name>
>                 <value>192.168.10.22,192.168.10.34,192.168.10.35</value>
>         </property>
>         <property>
>                 <name>hbase.zookeeper.property.clientPort</name>
>                 <value>2281</value>
>         </property>
>         <property>
>                 <name>zookeeper.znode.parent</name>
>                 <value>/hbase-new</value>
>         </property>
>         <property>
>                 <name>hbase.regionserver.codecs</name>
>                 <value>snappy</value>
>         </property>
> <!-- dns error -->
>         <property>
>                 <name>hbase.nameserver.address</name>
>                 <value>192.168.10.13</value>
>         </property>
>         <property>
>                 <name>hfile.block.cache.size</name>
>                 <value>0.4</value>
>         </property>
>         <property>
>                 <name>hbase.rpc.timeout</name>
>                 <value>180000</value>
>         </property>
> <property>
>         <name>hbase.hregion.max.filesize</name>
>         <value>10705960960</value>
> </property>
> <property>
>         <name>hbase.hregion.memstore.flush.size</name>
>         <value>268435456</value>
> </property>
> <property>
>         <name>hbase.regionserver.handler.count</name>
>         <value>500</value>
>         <description>Count of RPC Listener instances spun up on
> RegionServers. used by the master for count of master handlers. Default
> 10.</description>
> </property>
> <property>
>         <name>hbase.regionserver.lease.period</name>
>         <value>720000</value>
> </property>
> <property>
>         <name>hbase.master.distributed.log.splitting</name>
>         <value>false</value>
> </property>
> </configuration>
>
> and i write a test code , i packed it with new hbase-site.xml ,and find  it
> still connect to the old cluster ,why??
>
>  public static void main(String[] args) throws IOException {
>   // TODO Auto-generated method stub
>   HBaseConfiguration hc = new HBaseConfiguration(new Configuration());
>     HTableDescriptor ht = new HTableDescriptor("User");
>     ht.addFamily( new HColumnDescriptor("Id"));
>     ht.addFamily( new HColumnDescriptor("Name"));
>     System.out.println( "connecting" );
>     HBaseAdmin hba = new HBaseAdmin( hc );
>     System.out.println( "Creating Table" );
>     hba.createTable( ht );
>     System.out.println("Done......");
>
>
>  }
>