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 @@ -21,7 +21,6 @@
import com.facebook.presto.nativeworker.PrestoNativeQueryRunnerUtils;
import com.facebook.presto.spark.classloader_interface.PrestoSparkNativeExecutionShuffleManager;
import com.facebook.presto.spark.execution.NativeExecutionModule;
import com.facebook.presto.spark.execution.TestNativeExecutionModule;
import com.facebook.presto.spi.security.PrincipalType;
import com.facebook.presto.testing.QueryRunner;
import com.google.common.collect.ImmutableList;
Expand Down Expand Up @@ -102,7 +101,7 @@ public static PrestoSparkQueryRunner createPrestoSparkNativeQueryRunner()
Optional.of(getBaseDataPath()),
builder.build(),
getNativeExecutionShuffleConfigs(),
getNativeExecutionModules());
ImmutableList.of(new NativeExecutionModule()));
setupJsonFunctionNamespaceManager(queryRunner);

// Increases log level to reduce log spamming while running test.
Expand Down Expand Up @@ -187,19 +186,6 @@ public static void setupJsonFunctionNamespaceManager(QueryRunner queryRunner)
"json-based-function-manager.path-to-function-definition", "src/test/resources/external_functions.json"));
}

public static ImmutableList<Module> getNativeExecutionModules()
{
ImmutableList.Builder<Module> moduleBuilder = ImmutableList.builder();
if (System.getProperty("NATIVE_PORT") != null) {
moduleBuilder.add(new TestNativeExecutionModule());
}
else {
moduleBuilder.add(new NativeExecutionModule());
}

return moduleBuilder.build();
}

public static synchronized Path getBaseDataPath()
{
if (dataDirectory.isPresent()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ public void configure(Binder binder)
config.setMaxConnectionsPerServer(250);
});
binder.bind(PrestoSparkWorkerProperty.class).in(Scopes.SINGLETON);
binder.bind(NativeExecutionProcessFactory.class).in(Scopes.SINGLETON);
if (System.getProperty("NATIVE_PORT") != null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch @miaoever . Looks like there are a few things we can clean up as a part of this. Will update

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what line it is as that class is no longer there. But things have changed recently so we should double check. Thanks

binder.bind(NativeExecutionProcessFactory.class).to(DetachedNativeExecutionProcessFactory.class).in(Scopes.SINGLETON);
}
else {
binder.bind(NativeExecutionProcessFactory.class).in(Scopes.SINGLETON);
}
}
}

This file was deleted.