hbase-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcin Cylke <...@touk.pl>
Subject Re: hbase coprocessor unit testing
Date Thu, 19 Apr 2012 06:48:01 GMT
On 17/04/12 18:45, Alex Baranau wrote:
> I don't think that your error is related to CPs stuff. What lib versions do
> you use? Can you compare with those of the HBaseHUT pom?

Ok, I've managed to track down the source of my error. If I do normal
Put modifications in my prePut/postPut method everything works ok. The
error occures when I try to make another Put request while in the
prePut/postPut method.

I'm trying to do this in the following manner:

HTableInterface table = c.getEnvironment().getTable(tableName);
        table.put(createPutRequest(columnFamily, qualifier, "", rowCount));
        table.close();

And this gives me the error:

2012-04-19 08:43:24,738 [localhost:2222)] INFO  ClientCnxn
      :933 - Opening socket connection to server localhost/127.0.0.1:2222
2012-04-19 08:43:24,739 [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)


What I'm trying to achieve with adding another Put to my Coprocessor is
to silently update some other row in my hbase table when I need to (when
specific conditions on incoming Put are met) - based on incoming Put
request. Am I misunderstanding the idea here, and should use some other
facility to accomplish the task?

> Re 127.0.1.1 vs 127.0.0.1 - what your hosts file looked like before and
> now? I think it's just the issue with resolving IP - at one place it
> resolves using localhost, at other - your hostname. Since (I suppose) those
> two didn't match - you got error.

Thanks, it is reasonable :)


Marcin

Mime
View raw message