Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rnd 1191 remove superstream compression enabled env var #193

Merged
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
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ Specify the host URL of the SuperStream service to connect to the appropriate Su
### SUPERSTREAM_TOKEN - OPTIONAL!
This authentication token is required when the engine configured to work with local authentication, to securely access the Superstream services.

### SUPERSTREAM_COMPRESSION_ENABLED
Set this variable to explicitly tell SSM to not switch compression dynamically.

### SUPERSTREAM_TAGS - Default is empty string
Set this variable to tag the client, this is a string - comma-separated list of tags.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import java.util.List;

public class Consts {
public static final String sdkVersion = "3.5.117";
public static final String sdkVersion = "3.5.118";
public static final String clientReconnectionUpdateSubject = "internal_tasks.clientReconnectionUpdate";
public static final String clientTypeUpdateSubject = "internal.clientTypeUpdate";
public static final String clientConfigUpdateSubject = "internal.clientConfigUpdate";
Expand Down Expand Up @@ -45,7 +45,6 @@ public class Consts {

public static final String SUPERSTREAM_RESPONSE_TIMEOUT_ENV_VAR = "SUPERSTREAM_RESPONSE_TIMEOUT";
public static final String SUPERSTREAM_DEBUG_ENV_VAR_ENV_VAR = "SUPERSTREAM_DEBUG";
public static final String SUPERSTREAM_COMPRESSION_ENABLED_ENV_VAR = "SUPERSTREAM_COMPRESSION_ENABLED";
public static final String SUPERSTREAM_REDUCTION_ENABLED_ENV_VAR = "SUPERSTREAM_REDUCTION_ENABLED";
public static final String SUPERSTREAM_TAGS_ENV_VAR = "SUPERSTREAM_TAGS";
public static final String SUPERSTREAM_LEARNING_FACTOR_ENV_VAR = "SUPERSTREAM_LEARNING_FACTOR";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ public class Superstream {
private static final PrintStream originalErr = System.err;
private SuperstreamConfigParser configParser = null;

static {
if (Boolean.parseBoolean(System.getenv(SUPERSTREAM_DEBUG_ENV_VAR_ENV_VAR))) {
System.out.println("Superstream library has been loaded.");
}
}

public Superstream(String token, String host, Integer learningFactor, Map<String, Object> configs,
Boolean enableReduction, String type, String tags, Boolean enableCompression) {
this.learningFactor = learningFactor;
Expand Down Expand Up @@ -791,15 +797,6 @@ private void processUpdate(Map<String, Object> update) {
break;

case "CompressionUpdate":
// if defined as false in env vars - override the value from superstream
String compressionEnabledString = envVars.get(SUPERSTREAM_COMPRESSION_ENABLED_ENV_VAR);
if (compressionEnabledString != null) {
Boolean compressionEnabled = Boolean.parseBoolean(compressionEnabledString);
if (!compressionEnabled) {
this.compressionEnabled = false;
break;
}
}
Boolean enableCompression = (Boolean) payload.get("enable_compression");
if (enableCompression) {
this.compressionTurnedOffBySuperstream = false;
Expand Down Expand Up @@ -957,10 +954,6 @@ public static Map<String, Object> initSuperstreamConfig(Map<String, Object> conf
tags = "";
}
boolean compressionEnabled = false;
String compressionEnabledString = envVars.get(SUPERSTREAM_COMPRESSION_ENABLED_ENV_VAR);
if (compressionEnabledString != null) {
compressionEnabled = Boolean.parseBoolean(compressionEnabledString);
}
checkStdoutEnvVar();
Superstream superstreamConnection = new Superstream(token, superstreamHost, learningFactor, configs,
reductionEnabled, type, tags, compressionEnabled);
Expand Down
2 changes: 1 addition & 1 deletion version-beta.conf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.5.117-beta
3.5.118-beta3
2 changes: 1 addition & 1 deletion version.conf
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.5.117
3.5.118