Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DA5E797BE for ; Tue, 17 Apr 2012 13:35:07 +0000 (UTC) Received: (qmail 14370 invoked by uid 500); 17 Apr 2012 13:35:06 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 14335 invoked by uid 500); 17 Apr 2012 13:35:06 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 14324 invoked by uid 99); 17 Apr 2012 13:35:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Apr 2012 13:35:06 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mcl.hbase@touk.pl designates 212.180.179.38 as permitted sender) Received: from [212.180.179.38] (HELO touk.pl) (212.180.179.38) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Apr 2012 13:34:58 +0000 Message-ID: <4F8D716B.2060502@touk.pl> Date: Tue, 17 Apr 2012 15:34:35 +0200 From: Marcin Cylke Organization: TouK User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 MIME-Version: 1.0 To: user@hbase.apache.org CC: Alex Baranau Subject: Re: hbase coprocessor unit testing References: <4F8C1A58.3020502@touk.pl> <4F8D315A.5090002@touk.pl> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 17/04/12 15:15, Alex Baranau wrote: Hi > Some sanity checks: > 1) make sure you don't have 127.0.1.1 in your /etc/hosts (only 127.0.0.1) I've removed this entry and it worked right away :) Could You explain why it did so big difference? Now the test from HBaseHUT works fine, but mine code is still failing: #v+ 2012-04-17 15:26:27,870 [localhost:2222)] WARN ClientCnxn :1063 - 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:567) at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:286) at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1041) 2012-04-17 15:26:27,871 [dler 2 on 35003] INFO RecoverableZooKeeper :89 - The identifier of this process is 2032@correspondence 2012-04-17 15:26:27,973 [dler 2 on 35003] WARN RecoverableZooKeeper :159 - Possibly transient ZooKeeper exception: org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /hbase/master 2012-04-17 15:26:27,974 [dler 2 on 35003] INFO RetryCounter :53 - The 1 times to retry after sleeping 2000 ms 2012-04-17 15:26:28,973 [localhost:2222)] INFO ClientCnxn :933 - Opening socket connection to server localhost/127.0.0.1:2222 #v- My whole test is something like this: #v+ testingUtility.getConfiguration().setStrings( CoprocessorHost.USER_REGION_COPROCESSOR_CONF_KEY, AuxDataCalculator.class.getName()); testingUtility.startMiniCluster(); byte[] TABLE = Bytes.toBytes(getClass().getName()); byte[] A = Bytes.toBytes("A"); byte[] STATS = Bytes.toBytes("stats"); byte[] CONTENT = Bytes.toBytes("content"); byte[][] FAMILIES = new byte[][] { A, STATS, CONTENT } ; HTable hTable = testingUtility.createTable(TABLE, FAMILIES); Put put = new Put(ROW); put.add(A, A, A); hTable.put(put); Get get = new Get(ROW); Result result = hTable.get(get); #v- As I don't see any particular differences between Your unit test and mine, could You look into this a bit more? Regards Marcin