我试图扩展HBase Put类时遇到问题。扩展HBase的问题Put
我有这样
public class HBasePut extends Put {
//here i define my own adds because i have only string "keys"
//so i dont have to use Bytes.toBytes() every time and so on
}
一个代码,但测试这些类时,这个代码是OK:
Put p = new Put(Bytes.toBytes('row'));
p.add(Bytes.toBytes('cf'), Bytes.toBytes('col'), Bytes.toBytes(1));
users.put(p);
但试图约70秒钟后,这个人让一个例外 - RetriesExhaustedWithDetailsException
HBasePut p = new HBasePut('row');
p.add('cf', 'col', 1);
users.put(p);
所以我试着迭代RetriesExh中的异常......它告诉m e有一个例外,但它是空的...
我在看Put,HTable和HConnection的代码,但是我找不到任何依赖写入HBase的类,所以我不知道为什么我的HBasePut不工作。
是否有可能以某种方式延长Put? 谢谢
是的,这是我的第二个想法如何做到这一点,但我希望能拓展,因为我失去了“流体”模式这(utils)交互的方式。 $ put-> add('something') - > add('and other') - > ... 但是非常感谢 - 这就是我在最后做到的。 – 2011-03-28 20:32:45