aokolnychyi commented on a change in pull request #166: Update Hive Metastore
tables for Spark
URL: https://github.com/apache/incubator-iceberg/pull/166#discussion_r277359210
##########
File path: hive/src/test/java/org/apache/iceberg/hive/HiveTablesTest.java
##########
@@ -113,20 +112,22 @@ public void testConcurrentFastAppends() {
ExecutorService executorService = MoreExecutors.getExitingExecutorService(
(ThreadPoolExecutor) Executors.newFixedThreadPool(2));
+ AtomicInteger barrier = new AtomicInteger(0);
Tasks.foreach(icebergTable, anotherIcebergTable)
.stopOnFailure().throwFailureWhenFinished()
.executeWith(executorService)
.run(table -> {
for (int numCommittedFiles = 0; numCommittedFiles < 10;
numCommittedFiles++) {
- long commitStartTime = System.currentTimeMillis();
- table.newFastAppend().appendFile(file).commit();
- long commitEndTime = System.currentTimeMillis();
- long commitDuration = commitEndTime - commitStartTime;
- try {
- TimeUnit.MILLISECONDS.sleep(200 - commitDuration);
- } catch (InterruptedException e) {
- throw new RuntimeException(e);
+ while (barrier.get() < numCommittedFiles * 2) {
Review comment:
Looks better!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]