2013-03-24 84 views
1

我正在做一個Hadoop和HBase的測試項目。目前,羣集在Windows計算機上託管2個Ubuntu VM。在HBase上運行MapReduce會給Zookeeper錯誤

我能夠執行PUT,查詢和remotly DELETE操作(在我的主機),使用以下的HBase的Java API配置

config = HBaseConfiguration.create(); 
config.set("hbase.zookeeper.quorum", "192.168.56.90"); 
config.set("hbase.zookeeper.property.clientPort", "2222"); 

當我試圖用同樣運行在Windows上HBase的MapReduce工作如上配置,我收到以下錯誤

13/03/24 06:11:03 ERROR security.UserGroupInformation: PriviledgedActionException as:Joel cause:java.io.IOException: Failed to set permissions of path: \tmp\hadoop-Joel\mapred\staging\Joel290889388\.staging to 0700 
java.io.IOException: Failed to set permissions of path: \tmp\hadoop-Joel\mapred\staging\Joel290889388\.staging to 0700 

從我已閱讀在網絡上,有似乎是在Windows上運行MapReduce作業的問題。所以我嘗試使用「java-jar MR.jar」在Linux上運行MapReduce作業。

在Linux上,我無法連接到Zookeeper。對於未知的原因,動物園管理員主機和端口越來越在客戶端

13/03/24 05:59:33 INFO zookeeper.ZooKeeper: Client environment:os.version=3.5.0-23-generic 
13/03/24 05:59:33 INFO zookeeper.ZooKeeper: Client environment:user.name=hduser 
13/03/24 05:59:33 INFO zookeeper.ZooKeeper: Client environment:user.home=/home/hduser 
13/03/24 05:59:33 INFO zookeeper.ZooKeeper: Client environment:user.dir=/home/hduser/testes 
13/03/24 05:59:33 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=192.168.56.90:2222 sessionTimeout=180000 watcher=hconnection 
13/03/24 05:59:33 INFO zookeeper.RecoverableZooKeeper: The identifier of this process is [email protected] 
13/03/24 05:59:33 INFO zookeeper.ClientCnxn: Opening socket connection to server node01/192.168.56.90:2222. Will not attempt to authenticate using SASL (unknown error) 
13/03/24 05:59:33 INFO zookeeper.ClientCnxn: Socket connection established to node01/192.168.56.90:2222, initiating session 
13/03/24 05:59:33 INFO zookeeper.ClientCnxn: Session establishment complete on server node01/192.168.56.90:2222, sessionid = 0x13d9afaa1a30006, negotiated timeout = 180000 
13/03/24 05:59:33 INFO client.HConnectionManager$HConnectionImplementation: Closed zookeeper sessionid=0x13d9afaa1a30006 
13/03/24 05:59:33 INFO zookeeper.ZooKeeper: Session: 0x13d9afaa1a30006 closed 
13/03/24 05:59:33 INFO zookeeper.ClientCnxn: EventThread shut down 
13/03/24 05:59:33 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable 
13/03/24 05:59:33 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same. 
13/03/24 05:59:33 INFO zookeeper.ZooKeeper: Initiating client connection, connectString=localhost:2181 sessionTimeout=180000 watcher=hconnection 
13/03/24 05:59:33 INFO zookeeper.RecoverableZooKeeper: The identifier of this process is [email protected] 
13/03/24 05:59:33 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error) 
13/03/24 05:59:33 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect 
java.net.ConnectException: Connection refused 
     at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) 
     at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:692) 
     at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350) 

從日誌上面來看reseted,它正確地連接到NODE01:2222(NODE01解析爲192.168.56.90)。但由於某種原因,它會更改爲localhost:2181,然後會發出拒絕連接錯誤。

我該如何解決這個問題,以便在Zookeeper正在運行的同一臺機器上運行Linux上的MR作業?

版本:Hbase 0.94.5/Hadoop 1.1.2

謝謝。

回答

1

您可能還需要設置hbase.master。

還檢查/ etc/hosts文件,看看它是否正確。你能夠使用該連接信息遠程登錄到動物園管理員嗎?

config.set("hbase.zookeeper.quorum", "192.168.56.90"); 
config.set("hbase.zookeeper.property.clientPort", "2222"); 
config.set("hbase.master", "some.host.com:60000")