hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ch huang <justlo...@gmail.com>
Subject issue about two hbase on same hadoop cluster
Date Thu, 19 Jun 2014 03:10:14 GMT
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......");


 }

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message