From 915928287f566c77fb9988ecacb23673e048a026 Mon Sep 17 00:00:00 2001 From: Andrew Purtell Date: Mon, 13 Feb 2017 15:04:15 -0800 Subject: [PATCH] HBASE-17637 Update progress more frequently in IntegrationTestBigLinkedList.Generator.persist --- .../hbase/test/IntegrationTestBigLinkedList.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java index 841d7d040a6..dff1828772a 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java @@ -507,6 +507,12 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase { protected void persist(Context output, long count, byte[][] prev, byte[][] current, byte[] id) throws IOException { for (int i = 0; i < current.length; i++) { + + if (i % 100 == 0) { + // Tickle progress every so often else maprunner will think us hung + output.progress(); + } + Put put = new Put(current[i]); put.addColumn(FAMILY_NAME, COLUMN_PREV, prev == null ? NO_KEY : prev[i]); @@ -529,12 +535,8 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase { put.addColumn(BIG_FAMILY_NAME, BIG_FAMILY_NAME, this.bigValue); } mutator.mutate(put); - - if (i % 1000 == 0) { - // Tickle progress every so often else maprunner will think us hung - output.progress(); - } } + mutator.flush(); }