Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -48,7 +49,7 @@ protected QueryRunner createQueryRunner()
// set spill path so we can enable spill by session property
ImmutableMap<String, String> 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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -53,7 +54,7 @@ public static QueryRunner localCreateQueryRunner()

ImmutableMap<String, String> extraProperties = ImmutableMap.<String, String>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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -44,7 +45,7 @@ protected QueryRunner createQueryRunner()

ImmutableMap<String, String> extraProperties = ImmutableMap.<String, String>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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -49,7 +50,7 @@ protected QueryRunner createQueryRunner()

ImmutableMap<String, String> extraProperties = ImmutableMap.<String, String>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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -45,7 +46,7 @@ protected QueryRunner createQueryRunner()

ImmutableMap<String, String> extraProperties = ImmutableMap.<String, String>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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -47,7 +48,7 @@ protected QueryRunner createQueryRunner()
ImmutableMap<String, String> extraProperties = ImmutableMap.<String, String>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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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
Expand Down
Loading