You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by en...@apache.org on 2013/12/16 23:37:04 UTC
svn commit: r1551387 -
/hbase/branches/0.98/hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/DemoClient.java
Author: enis
Date: Mon Dec 16 22:37:04 2013
New Revision: 1551387
URL: http://svn.apache.org/r1551387
Log:
HBASE-10163 Example Thrift DemoClient is flaky
Modified:
hbase/branches/0.98/hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/DemoClient.java
Modified: hbase/branches/0.98/hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/DemoClient.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/DemoClient.java?rev=1551387&r1=1551386&r2=1551387&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/DemoClient.java (original)
+++ hbase/branches/0.98/hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/DemoClient.java Mon Dec 16 22:37:04 2013
@@ -214,6 +214,13 @@ public class DemoClient {
printRow(client.getRow(ByteBuffer.wrap(t), ByteBuffer.wrap(row), dummyAttributes));
client.deleteAllRow(ByteBuffer.wrap(t), ByteBuffer.wrap(row), dummyAttributes);
+ // sleep to force later timestamp
+ try {
+ Thread.sleep(50);
+ } catch (InterruptedException e) {
+ // no-op
+ }
+
mutations = new ArrayList<Mutation>();
mutations.add(new Mutation(false, ByteBuffer.wrap(bytes("entry:num")), ByteBuffer.wrap(bytes("0")), writeToWal));
mutations.add(new Mutation(false, ByteBuffer.wrap(bytes("entry:foo")), ByteBuffer.wrap(bytes("FOO")), writeToWal));