diff --git a/presto-tests/src/test/java/com/facebook/presto/tests/TestDistributedQueriesIndexed.java b/presto-tests/src/test/java/com/facebook/presto/tests/TestDistributedQueriesIndexed.java index ef35a7d2cfa28..61c996b2750b8 100644 --- a/presto-tests/src/test/java/com/facebook/presto/tests/TestDistributedQueriesIndexed.java +++ b/presto-tests/src/test/java/com/facebook/presto/tests/TestDistributedQueriesIndexed.java @@ -25,6 +25,7 @@ import java.nio.file.Paths; import java.util.Optional; +import java.util.UUID; import static com.facebook.airlift.json.JsonCodec.jsonCodec; import static com.facebook.presto.testing.TestingSession.testSessionBuilder; @@ -48,7 +49,7 @@ protected QueryRunner createQueryRunner() // set spill path so we can enable spill by session property ImmutableMap extraProperties = ImmutableMap.of( "experimental.spiller-spill-path", - Paths.get(System.getProperty("java.io.tmpdir"), "presto", "spills").toString()); + Paths.get(System.getProperty("java.io.tmpdir"), "presto", "spills", UUID.randomUUID().toString()).toString()); DistributedQueryRunner queryRunner = new DistributedQueryRunner.Builder(session) .setNodeCount(3) .setExtraProperties(extraProperties) diff --git a/presto-tests/src/test/java/com/facebook/presto/tests/TestDistributedSpilledQueries.java b/presto-tests/src/test/java/com/facebook/presto/tests/TestDistributedSpilledQueries.java index 1ab8522eb50a3..3664e2a420264 100644 --- a/presto-tests/src/test/java/com/facebook/presto/tests/TestDistributedSpilledQueries.java +++ b/presto-tests/src/test/java/com/facebook/presto/tests/TestDistributedSpilledQueries.java @@ -28,6 +28,7 @@ import static com.facebook.presto.sessionpropertyproviders.JavaWorkerSessionPropertyProvider.DEDUP_BASED_DISTINCT_AGGREGATION_SPILL_ENABLED; import static com.facebook.presto.testing.TestingSession.testSessionBuilder; import static com.facebook.presto.tpch.TpchMetadata.TINY_SCHEMA_NAME; +import static java.util.UUID.randomUUID; public class TestDistributedSpilledQueries extends AbstractTestQueries @@ -53,7 +54,7 @@ public static QueryRunner localCreateQueryRunner() ImmutableMap extraProperties = ImmutableMap.builder() .put("experimental.spill-enabled", "true") - .put("experimental.spiller-spill-path", Paths.get(System.getProperty("java.io.tmpdir"), "presto", "spills").toString()) + .put("experimental.spiller-spill-path", Paths.get(System.getProperty("java.io.tmpdir"), "presto", "spills", randomUUID().toString()).toString()) .put("experimental.spiller-max-used-space-threshold", "1.0") .put("experimental.memory-revoking-threshold", "0.0") // revoke always .put("experimental.memory-revoking-target", "0.0") diff --git a/presto-tests/src/test/java/com/facebook/presto/tests/TestSpilledAggregationWithHighMemoryRevokingThreshold.java b/presto-tests/src/test/java/com/facebook/presto/tests/TestSpilledAggregationWithHighMemoryRevokingThreshold.java index 4b4d1fca82b0e..3002acb8f07b7 100644 --- a/presto-tests/src/test/java/com/facebook/presto/tests/TestSpilledAggregationWithHighMemoryRevokingThreshold.java +++ b/presto-tests/src/test/java/com/facebook/presto/tests/TestSpilledAggregationWithHighMemoryRevokingThreshold.java @@ -20,6 +20,7 @@ import com.google.common.collect.ImmutableMap; import java.nio.file.Paths; +import java.util.UUID; import static com.facebook.presto.sessionpropertyproviders.JavaWorkerSessionPropertyProvider.AGGREGATION_OPERATOR_UNSPILL_MEMORY_LIMIT; import static com.facebook.presto.sessionpropertyproviders.JavaWorkerSessionPropertyProvider.DEDUP_BASED_DISTINCT_AGGREGATION_SPILL_ENABLED; @@ -44,7 +45,7 @@ protected QueryRunner createQueryRunner() ImmutableMap extraProperties = ImmutableMap.builder() .put("experimental.spill-enabled", "true") - .put("experimental.spiller-spill-path", Paths.get(System.getProperty("java.io.tmpdir"), "presto", "spills").toString()) + .put("experimental.spiller-spill-path", Paths.get(System.getProperty("java.io.tmpdir"), "presto", "spills", UUID.randomUUID().toString()).toString()) .put("experimental.spiller-max-used-space-threshold", "1.0") // Use higher memory revoking threshold. This forces the logic to keep some data in memory and spill some to disk // and test code flows where data will be read from both the sources diff --git a/presto-tests/src/test/java/com/facebook/presto/tests/TestSpilledAggregationWithLargeBlockSpillingEnabled.java b/presto-tests/src/test/java/com/facebook/presto/tests/TestSpilledAggregationWithLargeBlockSpillingEnabled.java index 18ff403b31cf5..467903d992aaa 100644 --- a/presto-tests/src/test/java/com/facebook/presto/tests/TestSpilledAggregationWithLargeBlockSpillingEnabled.java +++ b/presto-tests/src/test/java/com/facebook/presto/tests/TestSpilledAggregationWithLargeBlockSpillingEnabled.java @@ -20,6 +20,7 @@ import com.google.common.collect.ImmutableMap; import java.nio.file.Paths; +import java.util.UUID; import static com.facebook.presto.sessionpropertyproviders.JavaWorkerSessionPropertyProvider.AGGREGATION_OPERATOR_UNSPILL_MEMORY_LIMIT; import static com.facebook.presto.sessionpropertyproviders.JavaWorkerSessionPropertyProvider.DEDUP_BASED_DISTINCT_AGGREGATION_SPILL_ENABLED; @@ -49,7 +50,7 @@ protected QueryRunner createQueryRunner() ImmutableMap extraProperties = ImmutableMap.builder() .put("experimental.spill-enabled", "true") - .put("experimental.spiller-spill-path", Paths.get(System.getProperty("java.io.tmpdir"), "presto", "spills").toString()) + .put("experimental.spiller-spill-path", Paths.get(System.getProperty("java.io.tmpdir"), "presto", "spills", UUID.randomUUID().toString()).toString()) .put("experimental.spiller-max-used-space-threshold", "1.0") .put("experimental.memory-revoking-threshold", "0.0") // revoke always .put("experimental.memory-revoking-target", "0.0") diff --git a/presto-tests/src/test/java/com/facebook/presto/tests/TestSpilledAggregationWithPreprocessingEnabled.java b/presto-tests/src/test/java/com/facebook/presto/tests/TestSpilledAggregationWithPreprocessingEnabled.java index 1f58b463e2fdd..8a7722bf97d3f 100644 --- a/presto-tests/src/test/java/com/facebook/presto/tests/TestSpilledAggregationWithPreprocessingEnabled.java +++ b/presto-tests/src/test/java/com/facebook/presto/tests/TestSpilledAggregationWithPreprocessingEnabled.java @@ -20,6 +20,7 @@ import com.google.common.collect.ImmutableMap; import java.nio.file.Paths; +import java.util.UUID; import static com.facebook.presto.sessionpropertyproviders.JavaWorkerSessionPropertyProvider.AGGREGATION_OPERATOR_UNSPILL_MEMORY_LIMIT; import static com.facebook.presto.sessionpropertyproviders.JavaWorkerSessionPropertyProvider.DEDUP_BASED_DISTINCT_AGGREGATION_SPILL_ENABLED; @@ -45,7 +46,7 @@ protected QueryRunner createQueryRunner() ImmutableMap extraProperties = ImmutableMap.builder() .put("experimental.spill-enabled", "true") - .put("experimental.spiller-spill-path", Paths.get(System.getProperty("java.io.tmpdir"), "presto", "spills").toString()) + .put("experimental.spiller-spill-path", Paths.get(System.getProperty("java.io.tmpdir"), "presto", "spills", UUID.randomUUID().toString()).toString()) .put("experimental.spiller-max-used-space-threshold", "1.0") .put("experimental.memory-revoking-threshold", "0.0") // revoke always .put("experimental.memory-revoking-target", "0.0") diff --git a/presto-tests/src/test/java/com/facebook/presto/tests/TestSpilledTopNQueries.java b/presto-tests/src/test/java/com/facebook/presto/tests/TestSpilledTopNQueries.java index 739c36e9b7db3..5e26e0c5d5958 100644 --- a/presto-tests/src/test/java/com/facebook/presto/tests/TestSpilledTopNQueries.java +++ b/presto-tests/src/test/java/com/facebook/presto/tests/TestSpilledTopNQueries.java @@ -21,6 +21,7 @@ import org.testng.annotations.Test; import java.nio.file.Paths; +import java.util.UUID; import static com.facebook.presto.SystemSessionProperties.QUERY_MAX_TOTAL_MEMORY_PER_NODE; import static com.facebook.presto.sessionpropertyproviders.JavaWorkerSessionPropertyProvider.TOPN_OPERATOR_UNSPILL_MEMORY_LIMIT; @@ -47,7 +48,7 @@ protected QueryRunner createQueryRunner() ImmutableMap extraProperties = ImmutableMap.builder() .put("experimental.spill-enabled", "true") .put("experimental.topn-spill-enabled", "true") - .put("experimental.spiller-spill-path", Paths.get(System.getProperty("java.io.tmpdir"), "presto", "spills").toString()) + .put("experimental.spiller-spill-path", Paths.get(System.getProperty("java.io.tmpdir"), "presto", "spills", UUID.randomUUID().toString()).toString()) .put("experimental.spiller-max-used-space-threshold", "1.0") .put("experimental.memory-revoking-threshold", "0.001") // revoke always .put("experimental.memory-revoking-target", "0.0") diff --git a/presto-thrift-connector/src/test/java/com/facebook/presto/connector/thrift/integration/TestThriftDistributedQueriesIndexed.java b/presto-thrift-connector/src/test/java/com/facebook/presto/connector/thrift/integration/TestThriftDistributedQueriesIndexed.java index beb5ed4defb2e..f111f7d601222 100644 --- a/presto-thrift-connector/src/test/java/com/facebook/presto/connector/thrift/integration/TestThriftDistributedQueriesIndexed.java +++ b/presto-thrift-connector/src/test/java/com/facebook/presto/connector/thrift/integration/TestThriftDistributedQueriesIndexed.java @@ -18,6 +18,7 @@ import com.google.common.collect.ImmutableMap; import java.nio.file.Paths; +import java.util.UUID; import static com.facebook.presto.connector.thrift.integration.ThriftQueryRunner.createThriftQueryRunner; @@ -33,7 +34,7 @@ protected QueryRunner createQueryRunner() 2, true, // set spill path so we can enable spill by session property - ImmutableMap.of("experimental.spiller-spill-path", Paths.get(System.getProperty("java.io.tmpdir"), "presto", "spills").toString())); + ImmutableMap.of("experimental.spiller-spill-path", Paths.get(System.getProperty("java.io.tmpdir"), "presto", "spills", UUID.randomUUID().toString()).toString())); } @Override