Skip to content

Commit

Permalink
Change prefix in SingleStore configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
ebyhr authored and hashhar committed Mar 16, 2022
1 parent 0d8b857 commit 2ad8cf2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package io.trino.plugin.singlestore;

import io.airlift.configuration.Config;
import io.airlift.configuration.LegacyConfig;
import io.airlift.units.Duration;

import javax.validation.constraints.NotNull;
Expand All @@ -31,7 +32,8 @@ public boolean isAutoReconnect()
return autoReconnect;
}

@Config("memsql.auto-reconnect")
@Config("singlestore.auto-reconnect")
@LegacyConfig("memsql.auto-reconnect")
public SingleStoreConfig setAutoReconnect(boolean autoReconnect)
{
this.autoReconnect = autoReconnect;
Expand All @@ -44,7 +46,8 @@ public Duration getConnectionTimeout()
return connectionTimeout;
}

@Config("memsql.connection-timeout")
@Config("singlestore.connection-timeout")
@LegacyConfig("memsql.connection-timeout")
public SingleStoreConfig setConnectionTimeout(Duration connectionTimeout)
{
this.connectionTimeout = connectionTimeout;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public void testDefaults()
public void testExplicitPropertyMappings()
{
Map<String, String> properties = ImmutableMap.<String, String>builder()
.put("memsql.auto-reconnect", "false")
.put("memsql.connection-timeout", "4s")
.put("singlestore.auto-reconnect", "false")
.put("singlestore.connection-timeout", "4s")
.buildOrThrow();

SingleStoreConfig expected = new SingleStoreConfig()
Expand Down

0 comments on commit 2ad8cf2

Please sign in to comment.