Skip to content

Commit

Permalink
Merge branch 'telemetry' into ingame_metric
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielXia committed Jul 22, 2017
2 parents bba908d + 7ff94c5 commit aa446f7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class TelemetryEmitter extends BatchEmitter {

public static final String DEFAULT_COLLECTOR_PROTOCOL = "http";

public static final String DEFAULT_COLLECTOR_HOST = "localhost";
public static final String DEFAULT_COLLECTOR_HOST = "utility.terasology.org";

public static final int DEFAULT_COLLECTOR_PORT = 80;

Expand Down Expand Up @@ -132,21 +132,23 @@ public void changeUrl(URL url) {
this.httpClientAdapter = httpClientAdapter;
}

// TODO: remove it if the snowplow unclose issue is fixed
// TODO: remove it if the snowplow unclosed issue is fixed
@Override
public void close() {
flushBuffer();
if (executor != null) {
executor.shutdown();
try {
boolean e = executor.awaitTermination(closeTimeout, TimeUnit.SECONDS);
if (!e) {
logger.debug("Executor service shut down after time out");
if (!executor.awaitTermination(closeTimeout, TimeUnit.SECONDS)) {
executor.shutdownNow();
if (!executor.awaitTermination(closeTimeout, TimeUnit.SECONDS)) {
logger.warn("Executor did not terminate");
}
}
} catch (InterruptedException e) {
logger.error("Encounter an InterrupedException", e);
} catch (InterruptedException ie) {
executor.shutdownNow();
Thread.currentThread().interrupt();
}
executor = null;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class TelemetryLogstashAppender extends LogstashTcpSocketAppender {

public static final String TELEMETRY_APPENDER_NAME = "LOGSTASH";

public static final String DEFAULT_LOGSTASH_HOST = "localhost";
public static final String DEFAULT_LOGSTASH_HOST = "utility.terasology.org";

public static final int DEFAULT_LOGSTASH_PORT = 9600;

Expand Down

0 comments on commit aa446f7

Please sign in to comment.