Skip to content

Commit af7f690

Browse files
committed
Add meaningful names to bootstraps
1 parent a177ef8 commit af7f690

File tree

47 files changed

+47
-13
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+47
-13
lines changed

core/trino-main/src/main/java/io/trino/connector/FileCatalogStoreFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public String getName()
3232
@Override
3333
public CatalogStore create(Map<String, String> config)
3434
{
35-
Bootstrap app = new Bootstrap(new FileCatalogStoreModule());
35+
Bootstrap app = new Bootstrap("io.trino.bootstrap.store." + getName(), new FileCatalogStoreModule());
3636

3737
Injector injector = app
3838
.doNotInitializeLogging()

core/trino-main/src/main/java/io/trino/server/Server.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ private void doStart(String trinoVersion)
117117

118118
modules.addAll(getAdditionalModules());
119119

120-
Bootstrap app = new Bootstrap(modules.build())
120+
Bootstrap app = new Bootstrap("io.trino.bootstrap.engine", modules.build())
121121
.loadSecretsPlugins();
122122

123123
try {

core/trino-main/src/main/java/io/trino/server/testing/TestingTrinoServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ private TestingTrinoServer(
352352

353353
modules.add(additionalModule);
354354

355-
Bootstrap app = new Bootstrap(modules.build());
355+
Bootstrap app = new Bootstrap("io.trino.bootstrap.engine", modules.build());
356356

357357
Map<String, String> optionalProperties = new HashMap<>();
358358
environment.ifPresent(env -> optionalProperties.put("node.environment", env));

core/trino-main/src/test/java/io/trino/server/TestNodeStateManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ private NodeStateManager createNodeStateManager(int gracePeriodMillis)
286286
taskInfoSupplier,
287287
serverConfig,
288288
shutdownAction,
289-
new LifeCycleManager(Collections.emptyList(), null),
289+
new LifeCycleManager("node-state-manager", Collections.emptyList(), null),
290290
executor);
291291
}
292292

docs/src/main/sphinx/develop/connectors.md

Lines changed: 1 addition & 1 deletion

lib/trino-hdfs/src/main/java/io/trino/filesystem/hdfs/HdfsFileSystemManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public HdfsFileSystemManager(
7676
modules.add(new HiveS3Module());
7777
}
7878

79-
bootstrap = new Bootstrap(modules)
79+
bootstrap = new Bootstrap("io.trino.bootstrap.catalog." + catalogName, modules)
8080
.doNotInitializeLogging()
8181
.setRequiredConfigurationProperties(Map.of())
8282
.setOptionalConfigurationProperties(config);

plugin/trino-ai-functions/src/main/java/io/trino/plugin/ai/functions/AiConnectorFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public Connector create(String catalogName, Map<String, String> config, Connecto
4040
checkStrictSpiVersionMatch(context, this);
4141

4242
Bootstrap app = new Bootstrap(
43+
"io.trino.bootstrap.catalog." + catalogName,
4344
new AiModule(),
4445
binder -> {
4546
binder.bind(Tracer.class).toInstance(context.getTracer());

plugin/trino-base-jdbc/src/main/java/io/trino/plugin/jdbc/JdbcConnectorFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public Connector create(String catalogName, Map<String, String> requiredConfig,
5959
checkStrictSpiVersionMatch(context, this);
6060

6161
Bootstrap app = new Bootstrap(
62+
"io.trino.bootstrap.catalog." + catalogName,
6263
binder -> binder.bind(TypeManager.class).toInstance(context.getTypeManager()),
6364
binder -> binder.bind(Node.class).toInstance(context.getCurrentNode()),
6465
binder -> binder.bind(VersionEmbedder.class).toInstance(context.getVersionEmbedder()),

plugin/trino-bigquery/src/main/java/io/trino/plugin/bigquery/BigQueryConnectorFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ public Connector create(String catalogName, Map<String, String> config, Connecto
5151
checkStrictSpiVersionMatch(context, this);
5252

5353
Bootstrap app = new Bootstrap(
54+
"io.trino.bootstrap.catalog." + catalogName,
5455
new JsonModule(),
5556
new BigQueryConnectorModule(),
5657
new MBeanServerModule(),

plugin/trino-cassandra/src/main/java/io/trino/plugin/cassandra/CassandraConnectorFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ public Connector create(String catalogName, Map<String, String> config, Connecto
4444
checkStrictSpiVersionMatch(context, this);
4545

4646
Bootstrap app = new Bootstrap(
47+
"io.trino.bootstrap.catalog." + catalogName,
4748
binder -> binder.bind(OpenTelemetry.class).toInstance(context.getOpenTelemetry()),
4849
new MBeanModule(),
4950
new JsonModule(),

0 commit comments

Comments
 (0)