diff --git a/api/src/main/java/io/druid/guice/annotations/ExtensionPoint.java b/java-util/src/main/java/io/druid/guice/annotations/ExtensionPoint.java similarity index 100% rename from api/src/main/java/io/druid/guice/annotations/ExtensionPoint.java rename to java-util/src/main/java/io/druid/guice/annotations/ExtensionPoint.java diff --git a/api/src/main/java/io/druid/guice/annotations/PublicApi.java b/java-util/src/main/java/io/druid/guice/annotations/PublicApi.java similarity index 100% rename from api/src/main/java/io/druid/guice/annotations/PublicApi.java rename to java-util/src/main/java/io/druid/guice/annotations/PublicApi.java diff --git a/java-util/src/main/java/io/druid/java/util/emitter/service/AlertEvent.java b/java-util/src/main/java/io/druid/java/util/emitter/service/AlertEvent.java index e52c423045e..183bf37b614 100644 --- a/java-util/src/main/java/io/druid/java/util/emitter/service/AlertEvent.java +++ b/java-util/src/main/java/io/druid/java/util/emitter/service/AlertEvent.java @@ -21,14 +21,17 @@ package io.druid.java.util.emitter.service; import com.fasterxml.jackson.annotation.JsonValue; import com.google.common.collect.ImmutableMap; +import io.druid.guice.annotations.PublicApi; import io.druid.java.util.common.DateTimes; import io.druid.java.util.emitter.core.Event; import org.joda.time.DateTime; +import java.util.Collections; import java.util.Map; /** */ +@PublicApi public class AlertEvent implements Event { private final ImmutableMap serviceDimensions; @@ -106,6 +109,24 @@ public class AlertEvent implements Event return "alerts"; } + /* + * This method is used in certain proprietary emitter extensions + */ + @SuppressWarnings("unused") + public String getService() + { + return serviceDimensions.get("service"); + } + + /* + * This method is used in certain proprietary emitter extensions + */ + @SuppressWarnings("unused") + public String getHost() + { + return serviceDimensions.get("host"); + } + public Severity getSeverity() { return severity; @@ -116,6 +137,15 @@ public class AlertEvent implements Event return description; } + /* + * This method is used in certain proprietary emitter extensions + */ + @SuppressWarnings("unused") + public Map getDataMap() + { + return Collections.unmodifiableMap(dataMap); + } + @Override @JsonValue public Map toMap() diff --git a/java-util/src/main/java/io/druid/java/util/emitter/service/ServiceMetricEvent.java b/java-util/src/main/java/io/druid/java/util/emitter/service/ServiceMetricEvent.java index 07564330785..5a76fa1acea 100644 --- a/java-util/src/main/java/io/druid/java/util/emitter/service/ServiceMetricEvent.java +++ b/java-util/src/main/java/io/druid/java/util/emitter/service/ServiceMetricEvent.java @@ -23,6 +23,7 @@ import com.fasterxml.jackson.annotation.JsonValue; import com.google.common.base.Predicate; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Maps; +import io.druid.guice.annotations.PublicApi; import io.druid.java.util.common.DateTimes; import io.druid.java.util.common.ISE; import io.druid.java.util.emitter.core.Event; @@ -33,6 +34,7 @@ import java.util.Map; /** */ +@PublicApi public class ServiceMetricEvent implements Event { public static Builder builder() diff --git a/server/src/main/java/io/druid/server/log/EmittingRequestLogger.java b/server/src/main/java/io/druid/server/log/EmittingRequestLogger.java index aeb12832b51..5565375d920 100644 --- a/server/src/main/java/io/druid/server/log/EmittingRequestLogger.java +++ b/server/src/main/java/io/druid/server/log/EmittingRequestLogger.java @@ -22,6 +22,7 @@ package io.druid.server.log; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonValue; import com.google.common.collect.ImmutableMap; +import io.druid.guice.annotations.PublicApi; import io.druid.java.util.emitter.core.Event; import io.druid.java.util.emitter.service.ServiceEmitter; import io.druid.java.util.emitter.service.ServiceEventBuilder; @@ -58,6 +59,7 @@ public class EmittingRequestLogger implements RequestLogger '}'; } + @PublicApi public static class RequestLogEvent implements Event { final ImmutableMap serviceDimensions;