hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject svn commit: r1551388 - /hbase/branches/0.96/hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/DemoClient.java
Date Mon, 16 Dec 2013 22:37:34 GMT
Author: enis
Date: Mon Dec 16 22:37:33 2013
New Revision: 1551388

URL: http://svn.apache.org/r1551388
Log:
HBASE-10163 Example Thrift DemoClient is flaky

Modified:
    hbase/branches/0.96/hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/DemoClient.java

Modified: hbase/branches/0.96/hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/DemoClient.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/DemoClient.java?rev=1551388&r1=1551387&r2=1551388&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/DemoClient.java
(original)
+++ hbase/branches/0.96/hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/DemoClient.java
Mon Dec 16 22:37:33 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));



Mime
View raw message