Skip to content

Commit

Permalink
[native] Remove velox.properties file from e2e tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
amitkdutta authored and NikhilCollooru committed May 4, 2024
1 parent 374bc4b commit 80ac016
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,7 @@ public static Optional<BiFunction<Integer, URI, Process>> getExternalWorkerLaunc
log.info("Temp directory for Worker #%d: %s", workerIndex, tempDirectoryPath.toString());
int port = 1234 + workerIndex;

// Write config files
Files.write(tempDirectoryPath.resolve("velox.properties"), "".getBytes());
// Write config file
String configProperties = format("discovery.uri=%s%n" +
"presto.version=testversion%n" +
"system-memory-gb=4%n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ public class NativeExecutionProcess
private static final String NATIVE_EXECUTION_TASK_ERROR_MESSAGE = "Native process launch failed with multiple retries.";
private static final String WORKER_CONFIG_FILE = "/config.properties";
private static final String WORKER_NODE_CONFIG_FILE = "/node.properties";
private static final String WORKER_VELOX_CONFIG_FILE = "/velox.properties";
private static final String WORKER_CONNECTOR_CONFIG_FILE = "/catalog/";
private static final int SIGSYS = 31;

Expand Down Expand Up @@ -344,7 +343,6 @@ private void populateConfigurationFiles(String configBasePath)
// the native execution process eventually for process initialization.
workerProperty.getSystemConfig().setHttpServerPort(port);
workerProperty.populateAllProperties(
Paths.get(configBasePath, WORKER_VELOX_CONFIG_FILE),
Paths.get(configBasePath, WORKER_CONFIG_FILE),
Paths.get(configBasePath, WORKER_NODE_CONFIG_FILE),
Paths.get(configBasePath, format("%s%s.properties", WORKER_CONNECTOR_CONFIG_FILE, getNativeExecutionCatalogName(session))));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,9 @@ public T4 getVeloxConfig()
return veloxConfig;
}

public void populateAllProperties(Path veloxConfigPath, Path systemConfigPath, Path nodeConfigPath, Path connectorConfigPath)
public void populateAllProperties(Path systemConfigPath, Path nodeConfigPath, Path connectorConfigPath)
throws IOException
{
populateProperty(veloxConfig.getAllProperties(), veloxConfigPath);
populateProperty(systemConfig.getAllProperties(), systemConfigPath);
populateProperty(nodeConfig.getAllProperties(), nodeConfigPath);
populateProperty(connectorConfig.getAllProperties(), connectorConfigPath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,10 @@ private void testPropertiesPopulate(PrestoSparkWorkerProperty workerProperty)
Path directory = null;
try {
directory = Files.createTempDirectory("presto");
Path veloxPropertiesPath = Paths.get(directory.toString(), "velox.properties");
Path configPropertiesPath = Paths.get(directory.toString(), "config.properties");
Path nodePropertiesPath = Paths.get(directory.toString(), "node.properties");
Path connectorPropertiesPath = Paths.get(directory.toString(), "catalog/hive.properties");
workerProperty.populateAllProperties(veloxPropertiesPath, configPropertiesPath, nodePropertiesPath, connectorPropertiesPath);
workerProperty.populateAllProperties(configPropertiesPath, nodePropertiesPath, connectorPropertiesPath);

verifyProperties(workerProperty.getSystemConfig().getAllProperties(), readPropertiesFromDisk(configPropertiesPath));
verifyProperties(workerProperty.getNodeConfig().getAllProperties(), readPropertiesFromDisk(nodePropertiesPath));
Expand Down

0 comments on commit 80ac016

Please sign in to comment.