zhbhhb created HBASE-12638:
------------------------------

             Summary: use thrift2 C++ access hbase 0.94.10 fail.
                 Key: HBASE-12638
                 URL: https://issues.apache.org/jira/browse/HBASE-12638
             Project: HBase
          Issue Type: Bug
          Components: API
    Affects Versions: 0.96.1.1, 0.94.10
         Environment: linux-2.6.32 amd64 thrift-0.6.1
            Reporter: zhbhhb


use the same thrift2 c++ code(only ip of thriftserver differ) to add data to 
hbase 0.94.10 fail,but add to hbase 0.96.11 success。
the code to throw exception:
try{
        client.put(table,put);
        }catch(TException &e){
            printf("error:%s\n", e.what());
            //std::cout<<"ERROR"<<e.what()<<std::endl;
        }
the exception:
error:Default TException.

the information of exception is not clear,so I check the 
hadoop-hbase-thrift2-xxx.log to find useful information:
0.94.10 hadoop-hbase-thrift2-xxx.log:
2014-12-05 09:54:48,533 INFO org.apache.zookeeper.ZooKeeper: Client 
environment:java.io.tmpdir=/tmp
2014-12-05 09:54:48,533 INFO org.apache.zookeeper.ZooKeeper: Client 
environment:java.compiler=<NA>
2014-12-05 09:54:48,533 INFO org.apache.zookeeper.ZooKeeper: Client 
environment:os.name=Linux
2014-12-05 09:54:48,533 INFO org.apache.zookeeper.ZooKeeper: Client 
environment:os.arch=amd64
2014-12-05 09:54:48,533 INFO org.apache.zookeeper.ZooKeeper: Client 
environment:os.version=2.6.32-279.2.1.el6.x86_64
2014-12-05 09:54:48,533 INFO org.apache.zookeeper.ZooKeeper: Client 
environment:user.name=hadoop
2014-12-05 09:54:48,533 INFO org.apache.zookeeper.ZooKeeper: Client 
environment:user.home=/usr/home/hadoop
2014-12-05 09:54:48,533 INFO org.apache.zookeeper.ZooKeeper: Client 
environment:user.dir=/usr/home/hadoop
2014-12-05 09:54:48,535 INFO org.apache.zookeeper.ZooKeeper: Initiating client 
connection, 

connectString=zk4.mars.grid.xxx.cn:2181,zk3.mars.grid.xxx.cn:2181,zk2.mars.grid.xxx.cn:2181,zk1.mars.grid.xxx.cn:2181,zk5.mars.grid.xxx.cn:2181
 sessionTimeout=180000 

watcher=hconnection
2014-12-05 09:54:48,569 INFO 
org.apache.hadoop.hbase.zookeeper.RecoverableZooKeeper: The identifier of this 
process is 23...@h112158.mars.grid.xxx.cn
2014-12-05 09:54:48,575 INFO org.apache.zookeeper.ClientCnxn: Opening socket 
connection to server 10.77.112.114/10.77.112.114:2181. Will not attempt to 
authenticate 

using SASL (unknown error)
2014-12-05 09:54:48,580 INFO org.apache.zookeeper.ClientCnxn: Socket connection 
established to 10.77.112.114/10.77.112.114:2181, initiating session
2014-12-05 09:54:48,592 INFO org.apache.zookeeper.ClientCnxn: Session 
establishment complete on server 10.77.112.114/10.77.112.114:2181, sessionid = 
0x44211bee3b3e00f, 

negotiated timeout = 60000
2014-12-05 09:54:48,637 DEBUG 
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation: 
Looked up root region location, 

connection=org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation@77f71eb7;
 serverName=10.77.112.160,60020,1417408116358
2014-12-05 09:54:48,801 DEBUG 
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation: 
Cached location for .META.,,1.1028785192 is 

10.77.112.160:60020
2014-12-05 09:54:49,008 DEBUG org.apache.hadoop.hbase.client.MetaScanner: 
Scanning .META. starting at row=member,,00000000000000 for max=10 rows using 

org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation@77f71eb7
2014-12-05 09:54:49,017 DEBUG 
org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation: 
Cached location for 

member,,1417606385770.9d875e683ae567944f148d58bbfe05fb. is 10.77.112.161:60020

hbase 0.96.10 hbase-hadoop-thrift2-xxx.log:
2014-12-04 10:45:40,886 INFO  [pool-1-thread-1] zookeeper.ZooKeeper: Client 
environment:java.library.path=/usr/local/hadoop-2.2.0/lib/native
2014-12-04 10:45:40,886 INFO  [pool-1-thread-1] zookeeper.ZooKeeper: Client 
environment:java.io.tmpdir=/tmp
2014-12-04 10:45:40,886 INFO  [pool-1-thread-1] zookeeper.ZooKeeper: Client 
environment:java.compiler=<NA>
2014-12-04 10:45:40,886 INFO  [pool-1-thread-1] zookeeper.ZooKeeper: Client 
environment:os.name=Linux
2014-12-04 10:45:40,886 INFO  [pool-1-thread-1] zookeeper.ZooKeeper: Client 
environment:os.arch=amd64
2014-12-04 10:45:40,887 INFO  [pool-1-thread-1] zookeeper.ZooKeeper: Client 
environment:os.version=2.6.32-358.el6.x86_64
2014-12-04 10:45:40,887 INFO  [pool-1-thread-1] zookeeper.ZooKeeper: Client 
environment:user.name=hadoop
2014-12-04 10:45:40,887 INFO  [pool-1-thread-1] zookeeper.ZooKeeper: Client 
environment:user.home=/usr/home/hadoop
2014-12-04 10:45:40,887 INFO  [pool-1-thread-1] zookeeper.ZooKeeper: Client 
environment:user.dir=/root
2014-12-04 10:45:40,889 INFO  [pool-1-thread-1] zookeeper.ZooKeeper: Initiating 
client connection, 

connectString=zk4.mars.grid.xxx.cn:2181,zk3.mars.grid.xxx.cn:2181,zk2.mars.grid.xxx.cn:2181,zk1.mars.grid.xxx.cn:2181,zk5.mars.grid.xxx.cn:2181
 sessionTimeout=30000 

watcher=hconnection-0x35453924, 

**quorum=zk4.mars.grid.xxx.cn:2181,zk3.mars.grid.xxx.cn:2181,zk2.mars.grid.xxx.cn:2181,zk1.mars.grid.xxx.cn:2181,zk5.mars.grid.xxx.cn:2181,
 baseZNode=/v09611-hbase**
2014-12-04 10:45:40,931 INFO  [pool-1-thread-1] zookeeper.RecoverableZooKeeper: 
Process identifier=hconnection-0x35453924 connecting to ZooKeeper 

ensemble=zk4.mars.grid.xxx.cn:2181,zk3.mars.grid.xxx.cn:2181,zk2.mars.grid.xxx.cn:2181,zk1.mars.grid.xxx.cn:2181,zk5.mars.grid.xxx.cn:2181
2014-12-04 10:45:40,937 INFO  [pool-1-thread-1-SendThread(10.77.112.132:2181)] 
zookeeper.ClientCnxn: Opening socket connection to server 

10.77.112.132/10.77.112.132:2181. Will not attempt to authenticate using SASL 
(unknown error)
2014-12-04 10:45:40,941 INFO  [pool-1-thread-1-SendThread(10.77.112.132:2181)] 
zookeeper.ClientCnxn: Socket connection established to 
10.77.112.132/10.77.112.132:2181, 

initiating session
2014-12-04 10:45:40,953 INFO  [pool-1-thread-1-SendThread(10.77.112.132:2181)] 
zookeeper.ClientCnxn: Session establishment complete on server 

10.77.112.132/10.77.112.132:2181, sessionid = 0x24211bee3bac046, negotiated 
timeout = 30000

the main differ between thrift2'logs is the information of quorom and baseZnode 
is not print in 0.94.10'logs.And I do not know why, and I do not know it has 
relation to the fail access.

0.94.10 hbase-site.xml:
// other info
<property>
    <name>hbase.zookeeper.quorum</name>
    
<value>zk1.mars.grid.xxx.cn:2181,zk2.mars.grid.xxx.cn:2181,zk3.mars.grid.xxx.cn:2181,zk4.mars.grid.xxx.cn:2181,zk5.mars.grid.xxx.cn:2181</value>
  </property>
  <property>
    <name>zookeeper.znode.parent</name>
    <value>/v09410-hbase</value>
  </property>
// other info

        0.96.11hbase-site.xml:
// other info
        <property>
    <name>hbase.zookeeper.quorum</name>
        
<value>zk1.mars.grid.xxx.cn,zk2.mars.grid.xxx.cn,zk3.mars.grid.xxx.cn,zk4.mars.grid.xxx.cn,zk5.mars.grid.xxx.cn</value>
  </property>
  <property>
    <name>zookeeper.znode.parent</name>
    <value>/v09611-hbase</value>
//other info
                
Or, I miss some configuration about thrift zookeeper?



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

Reply via email to