Apologize if the mail is seen twice in mailing-list. I sent the earlier mail
before and didn't see it in the mailing list. Don't know if the message was
delivered to the server.
using the hbase from the trunk on ubuntu 9.04
ir...@damascus:~$ hbase shell
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Version: 0.20.0-dev, r784503, Sun Jun 14 15:36:01 EDT 2009
Whenever I use the new API call [HTable.incrementColumnValue], the process
hangs. If I kill the process and later try to access the table records anywhere
including "hbase shell" etc., even that process hangs.
1. "stop-hbase.sh" hangs as well and I have to kill the hbase processes
2. restart the hbase using "start-hbase.sh"
3. hbase shell> count 't1' ---> throws an error that the table if offline
4. so had to enable 't1' and then work with the table.
Thread [main] (Suspended)
Object.wait(long) line: not available [native method] [local variables
unavailable]
HBaseClient$Call(Object).wait() line: 485 [local variables unavailable]
HBaseClient.call(Writable, InetSocketAddress, UserGroupInformation)
line: 712
HBaseRPC$Invoker.invoke(Object, Method, Object[]) line: 321
$Proxy1.incrementColumnValue(byte[], byte[], byte[], byte[], long)
line: not available
HTable$6.call() line: 504
HTable$6.call() line: 500
HConnectionManager$TableServers.getRegionServerWithRetries(ServerCallable<T>)
line: 920
HTable.incrementColumnValue(byte[], byte[], byte[], long) line: 499
LoadQueryTest.testUsingIncrement() line: 130
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not
available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 597
LoadQueryTest(TestCase).runTest() line: 168
LoadQueryTest(TestCase).runBare() line: 134
TestResult$1.protect() line: 110
TestResult.runProtected(Test, Protectable) line: 128
TestResult.run(TestCase) line: 113
LoadQueryTest(TestCase).run(TestResult) line: 124
TestSuite.runTest(Test, TestResult) line: 232
TestSuite.run(TestResult) line: 227
JUnit38ClassRunner.run(RunNotifier) line: 81
JUnit4TestAdapter.run(TestResult) line: 36
TestSuite.runTest(Test, TestResult) line: 232
TestSuite.run(TestResult) line: 227
AllTests(JUnit38ClassRunner).run(RunNotifier) line: 81
JUnit4TestClassReference(JUnit4TestReference).run(TestExecution) line:
45
TestExecution.run(ITestReference[]) line: 38
RemoteTestRunner.runTests(String[], String, TestExecution) line: 460
RemoteTestRunner.runTests(TestExecution) line: 673
RemoteTestRunner.run() line: 386
RemoteTestRunner.main(String[]) line: 196
My code is as follows ...
public void testUsingIncrement() throws Exception {
String tableName = "t1";
HBaseConfiguration config = getConfiguration();
createTable(config, tableName);
// This instantiates an HTable object that connects you to the "myTable"
// table.
HTable table = new HTable(config, tableName);
long siteId = 1234;
long publisherId = 5678;
Date eventTime = DATE_INPUT_FORMAT.parse("2009-06-15 13:08:54");
long[] metrics = new long[] { 10, 22, 32 };
byte[] rowKey = Bytes.toBytes(siteId + "_" +
ROW_KEY_FORMAT.format(eventTime));
byte[] family = Bytes.toBytes(FAMILY_PUBLISHER);
byte[] qualifier = Bytes.toBytes(publisherId);
for (int i1 = 0, n1 = metrics.length; n1 > 0; i1++, n1--) {
table.incrementColumnValue(rowKey, family, qualifier, metrics[i1]);
/// <<<< hangs here all the time ...
}
table.close();
// queryMetrics(table, siteId, publisherId, eventTime);
}
Is there anything I am doing incorrectly?
Thanks for the help.
Irfan