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
6 changes: 6 additions & 0 deletions core/trino-main/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,12 @@
</dependency>

<!-- for testing -->
<dependency>
<groupId>io.trino</groupId>
<artifactId>trino-exchange</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.trino</groupId>
<artifactId>trino-parser</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
import io.trino.server.ShutdownAction;
import io.trino.server.security.CertificateAuthenticatorManager;
import io.trino.server.security.ServerSecurityModule;
import io.trino.server.testing.exchange.LocalFileSystemExchangeManagerFactory;
import io.trino.spi.ErrorType;
import io.trino.spi.Plugin;
import io.trino.spi.QueryId;
Expand Down Expand Up @@ -177,6 +176,7 @@ public static Builder builder()
private final MBeanServer mBeanServer;
private final boolean coordinator;
private final FailureInjector failureInjector;
private final ExchangeManagerRegistry exchangeManagerRegistry;

public static class TestShutdownAction
implements ShutdownAction
Expand Down Expand Up @@ -344,17 +344,13 @@ private TestingTrinoServer(
mBeanServer = injector.getInstance(MBeanServer.class);
announcer = injector.getInstance(Announcer.class);
failureInjector = injector.getInstance(FailureInjector.class);
exchangeManagerRegistry = injector.getInstance(ExchangeManagerRegistry.class);

accessControl.setSystemAccessControls(systemAccessControls);

EventListenerManager eventListenerManager = injector.getInstance(EventListenerManager.class);
eventListeners.forEach(eventListenerManager::addEventListener);

ExchangeManagerRegistry exchangeManagerRegistry = injector.getInstance(ExchangeManagerRegistry.class);
exchangeManagerRegistry.addExchangeManagerFactory(new LocalFileSystemExchangeManagerFactory());
exchangeManagerRegistry.loadExchangeManager("local", ImmutableMap.of(
"base-directory", System.getProperty("java.io.tmpdir") + "/trino-local-file-system-exchange-manager"));

announcer.forceAnnounce();

refreshNodes();
Expand Down Expand Up @@ -421,6 +417,11 @@ public CatalogName createCatalog(String catalogName, String connectorName, Map<S
return catalog;
}

public void loadExchangeManager(String name, Map<String, String> properties)
{
exchangeManagerRegistry.loadExchangeManager(name, properties);
}

public Path getBaseDataDir()
{
return baseDataDir;
Expand Down

This file was deleted.

Loading