You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2019/01/07 22:04:55 UTC

[GitHub] rdblue closed pull request #67: Use a separate executor service for the concurrent Hive test

rdblue closed pull request #67: Use a separate executor service for the concurrent Hive test
URL: https://github.com/apache/incubator-iceberg/pull/67
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/hive/src/test/java/com/netflix/iceberg/hive/HiveTablesTest.java b/hive/src/test/java/com/netflix/iceberg/hive/HiveTablesTest.java
index 6226a43..91e0a73 100644
--- a/hive/src/test/java/com/netflix/iceberg/hive/HiveTablesTest.java
+++ b/hive/src/test/java/com/netflix/iceberg/hive/HiveTablesTest.java
@@ -15,6 +15,7 @@
  */
 package com.netflix.iceberg.hive;
 
+import com.google.common.util.concurrent.MoreExecutors;
 import com.netflix.iceberg.DataFile;
 import com.netflix.iceberg.DataFiles;
 import com.netflix.iceberg.FileFormat;
@@ -29,13 +30,15 @@
 import java.util.List;
 import java.util.Map;
 import java.util.UUID;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadPoolExecutor;
 import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
 
 import static com.netflix.iceberg.BaseMetastoreTableOperations.ICEBERG_TABLE_TYPE_VALUE;
 import static com.netflix.iceberg.BaseMetastoreTableOperations.METADATA_LOCATION_PROP;
 import static com.netflix.iceberg.BaseMetastoreTableOperations.TABLE_TYPE_PROP;
-import static com.netflix.iceberg.util.ThreadPools.getWorkerPool;
 
 public class HiveTablesTest extends HiveTableBaseTest {
   @Test
@@ -108,9 +111,12 @@ public void testConcurrentFastAppends() {
       .withFileSizeInBytes(0)
       .build();
 
+    ExecutorService executorService = MoreExecutors.getExitingExecutorService(
+      (ThreadPoolExecutor) Executors.newFixedThreadPool(2));
+
     Tasks.foreach(icebergTable, anotherIcebergTable)
       .stopOnFailure().throwFailureWhenFinished()
-      .executeWith(getWorkerPool())
+      .executeWith(executorService)
       .run(table -> {
         for (int numCommittedFiles = 0; numCommittedFiles < 10; numCommittedFiles++) {
           long commitStartTime = System.currentTimeMillis();


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org