From b021a1a51343761f646a23ba691769b379ebd63a Mon Sep 17 00:00:00 2001 From: Enis Soztutar Date: Mon, 16 Dec 2013 22:34:36 +0000 Subject: [PATCH] HBASE-10163 Example Thrift DemoClient is flaky git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1551385 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/hadoop/hbase/thrift/DemoClient.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/DemoClient.java b/hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/DemoClient.java index c46ef840db1..e318cc8afb7 100644 --- a/hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/DemoClient.java +++ b/hbase-examples/src/main/java/org/apache/hadoop/hbase/thrift/DemoClient.java @@ -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(); 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));