Convert `transport.tcp.compress` setting
This commit is contained in:
parent
87f800cdca
commit
711f949ca2
|
@ -136,5 +136,6 @@ public final class ClusterSettings extends AbstractScopedSettings {
|
|||
InternalClusterService.CLUSTER_SERVICE_RECONNECT_INTERVAL_SETTING,
|
||||
HierarchyCircuitBreakerService.FIELDDATA_CIRCUIT_BREAKER_TYPE_SETTING,
|
||||
HierarchyCircuitBreakerService.REQUEST_CIRCUIT_BREAKER_TYPE_SETTING,
|
||||
Transport.TRANSPORT_PROFILES_SETTING)));
|
||||
Transport.TRANSPORT_PROFILES_SETTING,
|
||||
Transport.TRANSPORT_TCP_COMPRESS)));
|
||||
}
|
||||
|
|
|
@ -37,10 +37,7 @@ public interface Transport extends LifecycleComponent<Transport> {
|
|||
|
||||
|
||||
Setting<Settings> TRANSPORT_PROFILES_SETTING = Setting.groupSetting("transport.profiles.", true, Setting.Scope.CLUSTER);
|
||||
|
||||
public static class TransportSettings {
|
||||
public static final String TRANSPORT_TCP_COMPRESS = "transport.tcp.compress";
|
||||
}
|
||||
Setting<Boolean> TRANSPORT_TCP_COMPRESS = Setting.boolSetting("transport.tcp.compress", false, false, Setting.Scope.CLUSTER);
|
||||
|
||||
void transportServiceAdapter(TransportServiceAdapter service);
|
||||
|
||||
|
|
|
@ -225,7 +225,7 @@ public class NettyTransport extends AbstractLifecycleComponent<Transport> implem
|
|||
this.connectTimeout = this.settings.getAsTime("transport.netty.connect_timeout", settings.getAsTime("transport.tcp.connect_timeout", settings.getAsTime(TCP_CONNECT_TIMEOUT, TCP_DEFAULT_CONNECT_TIMEOUT)));
|
||||
this.maxCumulationBufferCapacity = this.settings.getAsBytesSize("transport.netty.max_cumulation_buffer_capacity", null);
|
||||
this.maxCompositeBufferComponents = this.settings.getAsInt("transport.netty.max_composite_buffer_components", -1);
|
||||
this.compress = settings.getAsBoolean(TransportSettings.TRANSPORT_TCP_COMPRESS, false);
|
||||
this.compress = Transport.TRANSPORT_TCP_COMPRESS.get(settings);
|
||||
|
||||
this.connectionsPerNodeRecovery = this.settings.getAsInt("transport.netty.connections_per_node.recovery", settings.getAsInt(CONNECTIONS_PER_NODE_RECOVERY, 2));
|
||||
this.connectionsPerNodeBulk = this.settings.getAsInt("transport.netty.connections_per_node.bulk", settings.getAsInt(CONNECTIONS_PER_NODE_BULK, 3));
|
||||
|
|
|
@ -372,7 +372,7 @@ public final class InternalTestCluster extends TestCluster {
|
|||
Builder builder = Settings.settingsBuilder()
|
||||
.put(SETTING_CLUSTER_NODE_SEED, seed);
|
||||
if (isLocalTransportConfigured() == false) {
|
||||
builder.put(Transport.TransportSettings.TRANSPORT_TCP_COMPRESS, rarely(random));
|
||||
builder.put(Transport.TRANSPORT_TCP_COMPRESS.getKey(), rarely(random));
|
||||
}
|
||||
if (random.nextBoolean()) {
|
||||
builder.put("cache.recycler.page.type", RandomPicks.randomFrom(random, PageCacheRecycler.Type.values()));
|
||||
|
|
Loading…
Reference in New Issue