You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gobblin.apache.org by ab...@apache.org on 2017/07/31 07:53:21 UTC
[63/77] [abbrv] incubator-gobblin git commit: Update Restli schemas
for gobblin-service for package rename to org.apache.gobblin
Update Restli schemas for gobblin-service for package rename to org.apache.gobblin
Project: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/commit/92e1276e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/tree/92e1276e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-gobblin/diff/92e1276e
Branch: refs/heads/master
Commit: 92e1276ef79c2a4060183fc523351b069532cd58
Parents: 172fafb
Author: Abhishek Tiwari <ab...@gmail.com>
Authored: Sun Jul 30 20:06:53 2017 -0700
Committer: Abhishek Tiwari <ab...@gmail.com>
Committed: Sun Jul 30 20:06:53 2017 -0700
----------------------------------------------------------------------
.../src/main/gen-java/FlatGobblinMetric.java | 432 ++++++++++++++++++
.../src/main/gen-java/GobblinTrackingEvent.java | 433 ++++++++++++++++++
.../src/main/gen-java/Metric.java | 279 ++++++++++++
.../src/main/gen-java/MetricReport.java | 356 +++++++++++++++
.../gobblin/metrics/FlatGobblinMetric.java | 433 ------------------
.../gobblin/metrics/GobblinTrackingEvent.java | 434 -------------------
.../org/apache/gobblin/metrics/Metric.java | 280 ------------
.../apache/gobblin/metrics/MetricReport.java | 357 ---------------
.../gobblin.rest.jobExecutions.restspec.json | 23 -
...che.gobblin.rest.jobExecutions.restspec.json | 23 +
.../gobblin.rest.jobExecutions.snapshot.json | 350 ---------------
...che.gobblin.rest.jobExecutions.snapshot.json | 350 +++++++++++++++
.../gobblin.service.flowconfigs.restspec.json | 31 --
.../gobblin.service.flowstatuses.restspec.json | 29 --
...he.gobblin.service.flowconfigs.restspec.json | 31 ++
...e.gobblin.service.flowstatuses.restspec.json | 29 ++
.../gobblin.service.flowconfigs.snapshot.json | 116 -----
.../gobblin.service.flowstatuses.snapshot.json | 227 ----------
...he.gobblin.service.flowconfigs.snapshot.json | 116 +++++
...e.gobblin.service.flowstatuses.snapshot.json | 227 ++++++++++
...blin.restli.throttling.permits.restspec.json | 22 -
...blin.restli.throttling.permits.restspec.json | 22 +
...blin.restli.throttling.permits.snapshot.json | 76 ----
...blin.restli.throttling.permits.snapshot.json | 76 ++++
24 files changed, 2374 insertions(+), 2378 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-gobblin/blob/92e1276e/gobblin-metrics-libs/gobblin-metrics-base/src/main/gen-java/FlatGobblinMetric.java
----------------------------------------------------------------------
diff --git a/gobblin-metrics-libs/gobblin-metrics-base/src/main/gen-java/FlatGobblinMetric.java b/gobblin-metrics-libs/gobblin-metrics-base/src/main/gen-java/FlatGobblinMetric.java
new file mode 100644
index 0000000..02b169b
--- /dev/null
+++ b/gobblin-metrics-libs/gobblin-metrics-base/src/main/gen-java/FlatGobblinMetric.java
@@ -0,0 +1,432 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+
+import org.apache.avro.specific.SpecificData;
+
+@SuppressWarnings("all")
+@org.apache.avro.specific.AvroGenerated
+public class FlatGobblinMetric extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
+ private static final long serialVersionUID = -3004215093744611038L;
+ public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"FlatGobblinMetric\",\"fields\":[{\"name\":\"tags\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},\"doc\":\"Tags associated with the metrics in the form key:value.\"},{\"name\":\"timestamp\",\"type\":\"long\",\"doc\":\"Time at which metrics were reported.\"},{\"name\":\"metricName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"The name of this metric.\"},{\"name\":\"metricValue\",\"type\":\"double\",\"doc\":\"The value of this metric.\"}],\"namesapce\":\"org.apache.gobblin.metrics\"}");
+ public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
+ /** Tags associated with the metrics in the form key:value. */
+ @Deprecated public java.util.List<java.lang.String> tags;
+ /** Time at which metrics were reported. */
+ @Deprecated public long timestamp;
+ /** The name of this metric. */
+ @Deprecated public java.lang.String metricName;
+ /** The value of this metric. */
+ @Deprecated public double metricValue;
+
+ /**
+ * Default constructor. Note that this does not initialize fields
+ * to their default values from the schema. If that is desired then
+ * one should use <code>newBuilder()</code>.
+ */
+ public FlatGobblinMetric() {}
+
+ /**
+ * All-args constructor.
+ * @param tags Tags associated with the metrics in the form key:value.
+ * @param timestamp Time at which metrics were reported.
+ * @param metricName The name of this metric.
+ * @param metricValue The value of this metric.
+ */
+ public FlatGobblinMetric(java.util.List<java.lang.String> tags, java.lang.Long timestamp, java.lang.String metricName, java.lang.Double metricValue) {
+ this.tags = tags;
+ this.timestamp = timestamp;
+ this.metricName = metricName;
+ this.metricValue = metricValue;
+ }
+
+ public org.apache.avro.Schema getSchema() { return SCHEMA$; }
+ // Used by DatumWriter. Applications should not call.
+ public java.lang.Object get(int field$) {
+ switch (field$) {
+ case 0: return tags;
+ case 1: return timestamp;
+ case 2: return metricName;
+ case 3: return metricValue;
+ default: throw new org.apache.avro.AvroRuntimeException("Bad index");
+ }
+ }
+
+ // Used by DatumReader. Applications should not call.
+ @SuppressWarnings(value="unchecked")
+ public void put(int field$, java.lang.Object value$) {
+ switch (field$) {
+ case 0: tags = (java.util.List<java.lang.String>)value$; break;
+ case 1: timestamp = (java.lang.Long)value$; break;
+ case 2: metricName = (java.lang.String)value$; break;
+ case 3: metricValue = (java.lang.Double)value$; break;
+ default: throw new org.apache.avro.AvroRuntimeException("Bad index");
+ }
+ }
+
+ /**
+ * Gets the value of the 'tags' field.
+ * @return Tags associated with the metrics in the form key:value.
+ */
+ public java.util.List<java.lang.String> getTags() {
+ return tags;
+ }
+
+ /**
+ * Sets the value of the 'tags' field.
+ * Tags associated with the metrics in the form key:value.
+ * @param value the value to set.
+ */
+ public void setTags(java.util.List<java.lang.String> value) {
+ this.tags = value;
+ }
+
+ /**
+ * Gets the value of the 'timestamp' field.
+ * @return Time at which metrics were reported.
+ */
+ public java.lang.Long getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ * Sets the value of the 'timestamp' field.
+ * Time at which metrics were reported.
+ * @param value the value to set.
+ */
+ public void setTimestamp(java.lang.Long value) {
+ this.timestamp = value;
+ }
+
+ /**
+ * Gets the value of the 'metricName' field.
+ * @return The name of this metric.
+ */
+ public java.lang.String getMetricName() {
+ return metricName;
+ }
+
+ /**
+ * Sets the value of the 'metricName' field.
+ * The name of this metric.
+ * @param value the value to set.
+ */
+ public void setMetricName(java.lang.String value) {
+ this.metricName = value;
+ }
+
+ /**
+ * Gets the value of the 'metricValue' field.
+ * @return The value of this metric.
+ */
+ public java.lang.Double getMetricValue() {
+ return metricValue;
+ }
+
+ /**
+ * Sets the value of the 'metricValue' field.
+ * The value of this metric.
+ * @param value the value to set.
+ */
+ public void setMetricValue(java.lang.Double value) {
+ this.metricValue = value;
+ }
+
+ /**
+ * Creates a new FlatGobblinMetric RecordBuilder.
+ * @return A new FlatGobblinMetric RecordBuilder
+ */
+ public static FlatGobblinMetric.Builder newBuilder() {
+ return new FlatGobblinMetric.Builder();
+ }
+
+ /**
+ * Creates a new FlatGobblinMetric RecordBuilder by copying an existing Builder.
+ * @param other The existing builder to copy.
+ * @return A new FlatGobblinMetric RecordBuilder
+ */
+ public static FlatGobblinMetric.Builder newBuilder(FlatGobblinMetric.Builder other) {
+ return new FlatGobblinMetric.Builder(other);
+ }
+
+ /**
+ * Creates a new FlatGobblinMetric RecordBuilder by copying an existing FlatGobblinMetric instance.
+ * @param other The existing instance to copy.
+ * @return A new FlatGobblinMetric RecordBuilder
+ */
+ public static FlatGobblinMetric.Builder newBuilder(FlatGobblinMetric other) {
+ return new FlatGobblinMetric.Builder(other);
+ }
+
+ /**
+ * RecordBuilder for FlatGobblinMetric instances.
+ */
+ public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<FlatGobblinMetric>
+ implements org.apache.avro.data.RecordBuilder<FlatGobblinMetric> {
+
+ /** Tags associated with the metrics in the form key:value. */
+ private java.util.List<java.lang.String> tags;
+ /** Time at which metrics were reported. */
+ private long timestamp;
+ /** The name of this metric. */
+ private java.lang.String metricName;
+ /** The value of this metric. */
+ private double metricValue;
+
+ /** Creates a new Builder */
+ private Builder() {
+ super(SCHEMA$);
+ }
+
+ /**
+ * Creates a Builder by copying an existing Builder.
+ * @param other The existing Builder to copy.
+ */
+ private Builder(FlatGobblinMetric.Builder other) {
+ super(other);
+ if (isValidValue(fields()[0], other.tags)) {
+ this.tags = data().deepCopy(fields()[0].schema(), other.tags);
+ fieldSetFlags()[0] = true;
+ }
+ if (isValidValue(fields()[1], other.timestamp)) {
+ this.timestamp = data().deepCopy(fields()[1].schema(), other.timestamp);
+ fieldSetFlags()[1] = true;
+ }
+ if (isValidValue(fields()[2], other.metricName)) {
+ this.metricName = data().deepCopy(fields()[2].schema(), other.metricName);
+ fieldSetFlags()[2] = true;
+ }
+ if (isValidValue(fields()[3], other.metricValue)) {
+ this.metricValue = data().deepCopy(fields()[3].schema(), other.metricValue);
+ fieldSetFlags()[3] = true;
+ }
+ }
+
+ /**
+ * Creates a Builder by copying an existing FlatGobblinMetric instance
+ * @param other The existing instance to copy.
+ */
+ private Builder(FlatGobblinMetric other) {
+ super(SCHEMA$);
+ if (isValidValue(fields()[0], other.tags)) {
+ this.tags = data().deepCopy(fields()[0].schema(), other.tags);
+ fieldSetFlags()[0] = true;
+ }
+ if (isValidValue(fields()[1], other.timestamp)) {
+ this.timestamp = data().deepCopy(fields()[1].schema(), other.timestamp);
+ fieldSetFlags()[1] = true;
+ }
+ if (isValidValue(fields()[2], other.metricName)) {
+ this.metricName = data().deepCopy(fields()[2].schema(), other.metricName);
+ fieldSetFlags()[2] = true;
+ }
+ if (isValidValue(fields()[3], other.metricValue)) {
+ this.metricValue = data().deepCopy(fields()[3].schema(), other.metricValue);
+ fieldSetFlags()[3] = true;
+ }
+ }
+
+ /**
+ * Gets the value of the 'tags' field.
+ * Tags associated with the metrics in the form key:value.
+ * @return The value.
+ */
+ public java.util.List<java.lang.String> getTags() {
+ return tags;
+ }
+
+ /**
+ * Sets the value of the 'tags' field.
+ * Tags associated with the metrics in the form key:value.
+ * @param value The value of 'tags'.
+ * @return This builder.
+ */
+ public FlatGobblinMetric.Builder setTags(java.util.List<java.lang.String> value) {
+ validate(fields()[0], value);
+ this.tags = value;
+ fieldSetFlags()[0] = true;
+ return this;
+ }
+
+ /**
+ * Checks whether the 'tags' field has been set.
+ * Tags associated with the metrics in the form key:value.
+ * @return True if the 'tags' field has been set, false otherwise.
+ */
+ public boolean hasTags() {
+ return fieldSetFlags()[0];
+ }
+
+
+ /**
+ * Clears the value of the 'tags' field.
+ * Tags associated with the metrics in the form key:value.
+ * @return This builder.
+ */
+ public FlatGobblinMetric.Builder clearTags() {
+ tags = null;
+ fieldSetFlags()[0] = false;
+ return this;
+ }
+
+ /**
+ * Gets the value of the 'timestamp' field.
+ * Time at which metrics were reported.
+ * @return The value.
+ */
+ public java.lang.Long getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ * Sets the value of the 'timestamp' field.
+ * Time at which metrics were reported.
+ * @param value The value of 'timestamp'.
+ * @return This builder.
+ */
+ public FlatGobblinMetric.Builder setTimestamp(long value) {
+ validate(fields()[1], value);
+ this.timestamp = value;
+ fieldSetFlags()[1] = true;
+ return this;
+ }
+
+ /**
+ * Checks whether the 'timestamp' field has been set.
+ * Time at which metrics were reported.
+ * @return True if the 'timestamp' field has been set, false otherwise.
+ */
+ public boolean hasTimestamp() {
+ return fieldSetFlags()[1];
+ }
+
+
+ /**
+ * Clears the value of the 'timestamp' field.
+ * Time at which metrics were reported.
+ * @return This builder.
+ */
+ public FlatGobblinMetric.Builder clearTimestamp() {
+ fieldSetFlags()[1] = false;
+ return this;
+ }
+
+ /**
+ * Gets the value of the 'metricName' field.
+ * The name of this metric.
+ * @return The value.
+ */
+ public java.lang.String getMetricName() {
+ return metricName;
+ }
+
+ /**
+ * Sets the value of the 'metricName' field.
+ * The name of this metric.
+ * @param value The value of 'metricName'.
+ * @return This builder.
+ */
+ public FlatGobblinMetric.Builder setMetricName(java.lang.String value) {
+ validate(fields()[2], value);
+ this.metricName = value;
+ fieldSetFlags()[2] = true;
+ return this;
+ }
+
+ /**
+ * Checks whether the 'metricName' field has been set.
+ * The name of this metric.
+ * @return True if the 'metricName' field has been set, false otherwise.
+ */
+ public boolean hasMetricName() {
+ return fieldSetFlags()[2];
+ }
+
+
+ /**
+ * Clears the value of the 'metricName' field.
+ * The name of this metric.
+ * @return This builder.
+ */
+ public FlatGobblinMetric.Builder clearMetricName() {
+ metricName = null;
+ fieldSetFlags()[2] = false;
+ return this;
+ }
+
+ /**
+ * Gets the value of the 'metricValue' field.
+ * The value of this metric.
+ * @return The value.
+ */
+ public java.lang.Double getMetricValue() {
+ return metricValue;
+ }
+
+ /**
+ * Sets the value of the 'metricValue' field.
+ * The value of this metric.
+ * @param value The value of 'metricValue'.
+ * @return This builder.
+ */
+ public FlatGobblinMetric.Builder setMetricValue(double value) {
+ validate(fields()[3], value);
+ this.metricValue = value;
+ fieldSetFlags()[3] = true;
+ return this;
+ }
+
+ /**
+ * Checks whether the 'metricValue' field has been set.
+ * The value of this metric.
+ * @return True if the 'metricValue' field has been set, false otherwise.
+ */
+ public boolean hasMetricValue() {
+ return fieldSetFlags()[3];
+ }
+
+
+ /**
+ * Clears the value of the 'metricValue' field.
+ * The value of this metric.
+ * @return This builder.
+ */
+ public FlatGobblinMetric.Builder clearMetricValue() {
+ fieldSetFlags()[3] = false;
+ return this;
+ }
+
+ @Override
+ public FlatGobblinMetric build() {
+ try {
+ FlatGobblinMetric record = new FlatGobblinMetric();
+ record.tags = fieldSetFlags()[0] ? this.tags : (java.util.List<java.lang.String>) defaultValue(fields()[0]);
+ record.timestamp = fieldSetFlags()[1] ? this.timestamp : (java.lang.Long) defaultValue(fields()[1]);
+ record.metricName = fieldSetFlags()[2] ? this.metricName : (java.lang.String) defaultValue(fields()[2]);
+ record.metricValue = fieldSetFlags()[3] ? this.metricValue : (java.lang.Double) defaultValue(fields()[3]);
+ return record;
+ } catch (Exception e) {
+ throw new org.apache.avro.AvroRuntimeException(e);
+ }
+ }
+ }
+
+ private static final org.apache.avro.io.DatumWriter
+ WRITER$ = new org.apache.avro.specific.SpecificDatumWriter(SCHEMA$);
+
+ @Override public void writeExternal(java.io.ObjectOutput out)
+ throws java.io.IOException {
+ WRITER$.write(this, SpecificData.getEncoder(out));
+ }
+
+ private static final org.apache.avro.io.DatumReader
+ READER$ = new org.apache.avro.specific.SpecificDatumReader(SCHEMA$);
+
+ @Override public void readExternal(java.io.ObjectInput in)
+ throws java.io.IOException {
+ READER$.read(this, SpecificData.getDecoder(in));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-gobblin/blob/92e1276e/gobblin-metrics-libs/gobblin-metrics-base/src/main/gen-java/GobblinTrackingEvent.java
----------------------------------------------------------------------
diff --git a/gobblin-metrics-libs/gobblin-metrics-base/src/main/gen-java/GobblinTrackingEvent.java b/gobblin-metrics-libs/gobblin-metrics-base/src/main/gen-java/GobblinTrackingEvent.java
new file mode 100644
index 0000000..7cb9bbf
--- /dev/null
+++ b/gobblin-metrics-libs/gobblin-metrics-base/src/main/gen-java/GobblinTrackingEvent.java
@@ -0,0 +1,433 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+
+import org.apache.avro.specific.SpecificData;
+
+@SuppressWarnings("all")
+@org.apache.avro.specific.AvroGenerated
+public class GobblinTrackingEvent extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
+ private static final long serialVersionUID = 2436287129421894415L;
+ public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"GobblinTrackingEvent\",\"fields\":[{\"name\":\"timestamp\",\"type\":\"long\",\"doc\":\"Time at which event was created.\",\"default\":0},{\"name\":\"namespace\",\"type\":[{\"type\":\"string\",\"avro.java.string\":\"String\"},\"null\"],\"doc\":\"Namespace used for filtering of events.\"},{\"name\":\"name\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Event name.\"},{\"name\":\"metadata\",\"type\":{\"type\":\"map\",\"values\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"avro.java.string\":\"String\"},\"doc\":\"Event metadata.\",\"default\":{}}],\"namesapce\":\"org.apache.gobblin.metrics\"}");
+ public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
+ /** Time at which event was created. */
+ @Deprecated public long timestamp;
+ /** Namespace used for filtering of events. */
+ @Deprecated public java.lang.String namespace;
+ /** Event name. */
+ @Deprecated public java.lang.String name;
+ /** Event metadata. */
+ @Deprecated public java.util.Map<java.lang.String,java.lang.String> metadata;
+
+ /**
+ * Default constructor. Note that this does not initialize fields
+ * to their default values from the schema. If that is desired then
+ * one should use <code>newBuilder()</code>.
+ */
+ public GobblinTrackingEvent() {}
+
+ /**
+ * All-args constructor.
+ * @param timestamp Time at which event was created.
+ * @param namespace Namespace used for filtering of events.
+ * @param name Event name.
+ * @param metadata Event metadata.
+ */
+ public GobblinTrackingEvent(java.lang.Long timestamp, java.lang.String namespace, java.lang.String name, java.util.Map<java.lang.String,java.lang.String> metadata) {
+ this.timestamp = timestamp;
+ this.namespace = namespace;
+ this.name = name;
+ this.metadata = metadata;
+ }
+
+ public org.apache.avro.Schema getSchema() { return SCHEMA$; }
+ // Used by DatumWriter. Applications should not call.
+ public java.lang.Object get(int field$) {
+ switch (field$) {
+ case 0: return timestamp;
+ case 1: return namespace;
+ case 2: return name;
+ case 3: return metadata;
+ default: throw new org.apache.avro.AvroRuntimeException("Bad index");
+ }
+ }
+
+ // Used by DatumReader. Applications should not call.
+ @SuppressWarnings(value="unchecked")
+ public void put(int field$, java.lang.Object value$) {
+ switch (field$) {
+ case 0: timestamp = (java.lang.Long)value$; break;
+ case 1: namespace = (java.lang.String)value$; break;
+ case 2: name = (java.lang.String)value$; break;
+ case 3: metadata = (java.util.Map<java.lang.String,java.lang.String>)value$; break;
+ default: throw new org.apache.avro.AvroRuntimeException("Bad index");
+ }
+ }
+
+ /**
+ * Gets the value of the 'timestamp' field.
+ * @return Time at which event was created.
+ */
+ public java.lang.Long getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ * Sets the value of the 'timestamp' field.
+ * Time at which event was created.
+ * @param value the value to set.
+ */
+ public void setTimestamp(java.lang.Long value) {
+ this.timestamp = value;
+ }
+
+ /**
+ * Gets the value of the 'namespace' field.
+ * @return Namespace used for filtering of events.
+ */
+ public java.lang.String getNamespace() {
+ return namespace;
+ }
+
+ /**
+ * Sets the value of the 'namespace' field.
+ * Namespace used for filtering of events.
+ * @param value the value to set.
+ */
+ public void setNamespace(java.lang.String value) {
+ this.namespace = value;
+ }
+
+ /**
+ * Gets the value of the 'name' field.
+ * @return Event name.
+ */
+ public java.lang.String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the value of the 'name' field.
+ * Event name.
+ * @param value the value to set.
+ */
+ public void setName(java.lang.String value) {
+ this.name = value;
+ }
+
+ /**
+ * Gets the value of the 'metadata' field.
+ * @return Event metadata.
+ */
+ public java.util.Map<java.lang.String,java.lang.String> getMetadata() {
+ return metadata;
+ }
+
+ /**
+ * Sets the value of the 'metadata' field.
+ * Event metadata.
+ * @param value the value to set.
+ */
+ public void setMetadata(java.util.Map<java.lang.String,java.lang.String> value) {
+ this.metadata = value;
+ }
+
+ /**
+ * Creates a new GobblinTrackingEvent RecordBuilder.
+ * @return A new GobblinTrackingEvent RecordBuilder
+ */
+ public static GobblinTrackingEvent.Builder newBuilder() {
+ return new GobblinTrackingEvent.Builder();
+ }
+
+ /**
+ * Creates a new GobblinTrackingEvent RecordBuilder by copying an existing Builder.
+ * @param other The existing builder to copy.
+ * @return A new GobblinTrackingEvent RecordBuilder
+ */
+ public static GobblinTrackingEvent.Builder newBuilder(GobblinTrackingEvent.Builder other) {
+ return new GobblinTrackingEvent.Builder(other);
+ }
+
+ /**
+ * Creates a new GobblinTrackingEvent RecordBuilder by copying an existing GobblinTrackingEvent instance.
+ * @param other The existing instance to copy.
+ * @return A new GobblinTrackingEvent RecordBuilder
+ */
+ public static GobblinTrackingEvent.Builder newBuilder(GobblinTrackingEvent other) {
+ return new GobblinTrackingEvent.Builder(other);
+ }
+
+ /**
+ * RecordBuilder for GobblinTrackingEvent instances.
+ */
+ public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<GobblinTrackingEvent>
+ implements org.apache.avro.data.RecordBuilder<GobblinTrackingEvent> {
+
+ /** Time at which event was created. */
+ private long timestamp;
+ /** Namespace used for filtering of events. */
+ private java.lang.String namespace;
+ /** Event name. */
+ private java.lang.String name;
+ /** Event metadata. */
+ private java.util.Map<java.lang.String,java.lang.String> metadata;
+
+ /** Creates a new Builder */
+ private Builder() {
+ super(SCHEMA$);
+ }
+
+ /**
+ * Creates a Builder by copying an existing Builder.
+ * @param other The existing Builder to copy.
+ */
+ private Builder(GobblinTrackingEvent.Builder other) {
+ super(other);
+ if (isValidValue(fields()[0], other.timestamp)) {
+ this.timestamp = data().deepCopy(fields()[0].schema(), other.timestamp);
+ fieldSetFlags()[0] = true;
+ }
+ if (isValidValue(fields()[1], other.namespace)) {
+ this.namespace = data().deepCopy(fields()[1].schema(), other.namespace);
+ fieldSetFlags()[1] = true;
+ }
+ if (isValidValue(fields()[2], other.name)) {
+ this.name = data().deepCopy(fields()[2].schema(), other.name);
+ fieldSetFlags()[2] = true;
+ }
+ if (isValidValue(fields()[3], other.metadata)) {
+ this.metadata = data().deepCopy(fields()[3].schema(), other.metadata);
+ fieldSetFlags()[3] = true;
+ }
+ }
+
+ /**
+ * Creates a Builder by copying an existing GobblinTrackingEvent instance
+ * @param other The existing instance to copy.
+ */
+ private Builder(GobblinTrackingEvent other) {
+ super(SCHEMA$);
+ if (isValidValue(fields()[0], other.timestamp)) {
+ this.timestamp = data().deepCopy(fields()[0].schema(), other.timestamp);
+ fieldSetFlags()[0] = true;
+ }
+ if (isValidValue(fields()[1], other.namespace)) {
+ this.namespace = data().deepCopy(fields()[1].schema(), other.namespace);
+ fieldSetFlags()[1] = true;
+ }
+ if (isValidValue(fields()[2], other.name)) {
+ this.name = data().deepCopy(fields()[2].schema(), other.name);
+ fieldSetFlags()[2] = true;
+ }
+ if (isValidValue(fields()[3], other.metadata)) {
+ this.metadata = data().deepCopy(fields()[3].schema(), other.metadata);
+ fieldSetFlags()[3] = true;
+ }
+ }
+
+ /**
+ * Gets the value of the 'timestamp' field.
+ * Time at which event was created.
+ * @return The value.
+ */
+ public java.lang.Long getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ * Sets the value of the 'timestamp' field.
+ * Time at which event was created.
+ * @param value The value of 'timestamp'.
+ * @return This builder.
+ */
+ public GobblinTrackingEvent.Builder setTimestamp(long value) {
+ validate(fields()[0], value);
+ this.timestamp = value;
+ fieldSetFlags()[0] = true;
+ return this;
+ }
+
+ /**
+ * Checks whether the 'timestamp' field has been set.
+ * Time at which event was created.
+ * @return True if the 'timestamp' field has been set, false otherwise.
+ */
+ public boolean hasTimestamp() {
+ return fieldSetFlags()[0];
+ }
+
+
+ /**
+ * Clears the value of the 'timestamp' field.
+ * Time at which event was created.
+ * @return This builder.
+ */
+ public GobblinTrackingEvent.Builder clearTimestamp() {
+ fieldSetFlags()[0] = false;
+ return this;
+ }
+
+ /**
+ * Gets the value of the 'namespace' field.
+ * Namespace used for filtering of events.
+ * @return The value.
+ */
+ public java.lang.String getNamespace() {
+ return namespace;
+ }
+
+ /**
+ * Sets the value of the 'namespace' field.
+ * Namespace used for filtering of events.
+ * @param value The value of 'namespace'.
+ * @return This builder.
+ */
+ public GobblinTrackingEvent.Builder setNamespace(java.lang.String value) {
+ validate(fields()[1], value);
+ this.namespace = value;
+ fieldSetFlags()[1] = true;
+ return this;
+ }
+
+ /**
+ * Checks whether the 'namespace' field has been set.
+ * Namespace used for filtering of events.
+ * @return True if the 'namespace' field has been set, false otherwise.
+ */
+ public boolean hasNamespace() {
+ return fieldSetFlags()[1];
+ }
+
+
+ /**
+ * Clears the value of the 'namespace' field.
+ * Namespace used for filtering of events.
+ * @return This builder.
+ */
+ public GobblinTrackingEvent.Builder clearNamespace() {
+ namespace = null;
+ fieldSetFlags()[1] = false;
+ return this;
+ }
+
+ /**
+ * Gets the value of the 'name' field.
+ * Event name.
+ * @return The value.
+ */
+ public java.lang.String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the value of the 'name' field.
+ * Event name.
+ * @param value The value of 'name'.
+ * @return This builder.
+ */
+ public GobblinTrackingEvent.Builder setName(java.lang.String value) {
+ validate(fields()[2], value);
+ this.name = value;
+ fieldSetFlags()[2] = true;
+ return this;
+ }
+
+ /**
+ * Checks whether the 'name' field has been set.
+ * Event name.
+ * @return True if the 'name' field has been set, false otherwise.
+ */
+ public boolean hasName() {
+ return fieldSetFlags()[2];
+ }
+
+
+ /**
+ * Clears the value of the 'name' field.
+ * Event name.
+ * @return This builder.
+ */
+ public GobblinTrackingEvent.Builder clearName() {
+ name = null;
+ fieldSetFlags()[2] = false;
+ return this;
+ }
+
+ /**
+ * Gets the value of the 'metadata' field.
+ * Event metadata.
+ * @return The value.
+ */
+ public java.util.Map<java.lang.String,java.lang.String> getMetadata() {
+ return metadata;
+ }
+
+ /**
+ * Sets the value of the 'metadata' field.
+ * Event metadata.
+ * @param value The value of 'metadata'.
+ * @return This builder.
+ */
+ public GobblinTrackingEvent.Builder setMetadata(java.util.Map<java.lang.String,java.lang.String> value) {
+ validate(fields()[3], value);
+ this.metadata = value;
+ fieldSetFlags()[3] = true;
+ return this;
+ }
+
+ /**
+ * Checks whether the 'metadata' field has been set.
+ * Event metadata.
+ * @return True if the 'metadata' field has been set, false otherwise.
+ */
+ public boolean hasMetadata() {
+ return fieldSetFlags()[3];
+ }
+
+
+ /**
+ * Clears the value of the 'metadata' field.
+ * Event metadata.
+ * @return This builder.
+ */
+ public GobblinTrackingEvent.Builder clearMetadata() {
+ metadata = null;
+ fieldSetFlags()[3] = false;
+ return this;
+ }
+
+ @Override
+ public GobblinTrackingEvent build() {
+ try {
+ GobblinTrackingEvent record = new GobblinTrackingEvent();
+ record.timestamp = fieldSetFlags()[0] ? this.timestamp : (java.lang.Long) defaultValue(fields()[0]);
+ record.namespace = fieldSetFlags()[1] ? this.namespace : (java.lang.String) defaultValue(fields()[1]);
+ record.name = fieldSetFlags()[2] ? this.name : (java.lang.String) defaultValue(fields()[2]);
+ record.metadata = fieldSetFlags()[3] ? this.metadata : (java.util.Map<java.lang.String,java.lang.String>) defaultValue(fields()[3]);
+ return record;
+ } catch (Exception e) {
+ throw new org.apache.avro.AvroRuntimeException(e);
+ }
+ }
+ }
+
+ private static final org.apache.avro.io.DatumWriter
+ WRITER$ = new org.apache.avro.specific.SpecificDatumWriter(SCHEMA$);
+
+ @Override public void writeExternal(java.io.ObjectOutput out)
+ throws java.io.IOException {
+ WRITER$.write(this, SpecificData.getEncoder(out));
+ }
+
+ private static final org.apache.avro.io.DatumReader
+ READER$ = new org.apache.avro.specific.SpecificDatumReader(SCHEMA$);
+
+ @Override public void readExternal(java.io.ObjectInput in)
+ throws java.io.IOException {
+ READER$.read(this, SpecificData.getDecoder(in));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-gobblin/blob/92e1276e/gobblin-metrics-libs/gobblin-metrics-base/src/main/gen-java/Metric.java
----------------------------------------------------------------------
diff --git a/gobblin-metrics-libs/gobblin-metrics-base/src/main/gen-java/Metric.java b/gobblin-metrics-libs/gobblin-metrics-base/src/main/gen-java/Metric.java
new file mode 100644
index 0000000..237b8c4
--- /dev/null
+++ b/gobblin-metrics-libs/gobblin-metrics-base/src/main/gen-java/Metric.java
@@ -0,0 +1,279 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+
+import org.apache.avro.specific.SpecificData;
+
+@SuppressWarnings("all")
+@org.apache.avro.specific.AvroGenerated
+public class Metric extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
+ private static final long serialVersionUID = 2082125793684587136L;
+ public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"Metric\",\"fields\":[{\"name\":\"name\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Metric name.\"},{\"name\":\"value\",\"type\":\"double\",\"doc\":\"Metric value.\"}]}");
+ public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
+ /** Metric name. */
+ @Deprecated public java.lang.String name;
+ /** Metric value. */
+ @Deprecated public double value;
+
+ /**
+ * Default constructor. Note that this does not initialize fields
+ * to their default values from the schema. If that is desired then
+ * one should use <code>newBuilder()</code>.
+ */
+ public Metric() {}
+
+ /**
+ * All-args constructor.
+ * @param name Metric name.
+ * @param value Metric value.
+ */
+ public Metric(java.lang.String name, java.lang.Double value) {
+ this.name = name;
+ this.value = value;
+ }
+
+ public org.apache.avro.Schema getSchema() { return SCHEMA$; }
+ // Used by DatumWriter. Applications should not call.
+ public java.lang.Object get(int field$) {
+ switch (field$) {
+ case 0: return name;
+ case 1: return value;
+ default: throw new org.apache.avro.AvroRuntimeException("Bad index");
+ }
+ }
+
+ // Used by DatumReader. Applications should not call.
+ @SuppressWarnings(value="unchecked")
+ public void put(int field$, java.lang.Object value$) {
+ switch (field$) {
+ case 0: name = (java.lang.String)value$; break;
+ case 1: value = (java.lang.Double)value$; break;
+ default: throw new org.apache.avro.AvroRuntimeException("Bad index");
+ }
+ }
+
+ /**
+ * Gets the value of the 'name' field.
+ * @return Metric name.
+ */
+ public java.lang.String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the value of the 'name' field.
+ * Metric name.
+ * @param value the value to set.
+ */
+ public void setName(java.lang.String value) {
+ this.name = value;
+ }
+
+ /**
+ * Gets the value of the 'value' field.
+ * @return Metric value.
+ */
+ public java.lang.Double getValue() {
+ return value;
+ }
+
+ /**
+ * Sets the value of the 'value' field.
+ * Metric value.
+ * @param value the value to set.
+ */
+ public void setValue(java.lang.Double value) {
+ this.value = value;
+ }
+
+ /**
+ * Creates a new Metric RecordBuilder.
+ * @return A new Metric RecordBuilder
+ */
+ public static Metric.Builder newBuilder() {
+ return new Metric.Builder();
+ }
+
+ /**
+ * Creates a new Metric RecordBuilder by copying an existing Builder.
+ * @param other The existing builder to copy.
+ * @return A new Metric RecordBuilder
+ */
+ public static Metric.Builder newBuilder(Metric.Builder other) {
+ return new Metric.Builder(other);
+ }
+
+ /**
+ * Creates a new Metric RecordBuilder by copying an existing Metric instance.
+ * @param other The existing instance to copy.
+ * @return A new Metric RecordBuilder
+ */
+ public static Metric.Builder newBuilder(Metric other) {
+ return new Metric.Builder(other);
+ }
+
+ /**
+ * RecordBuilder for Metric instances.
+ */
+ public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<Metric>
+ implements org.apache.avro.data.RecordBuilder<Metric> {
+
+ /** Metric name. */
+ private java.lang.String name;
+ /** Metric value. */
+ private double value;
+
+ /** Creates a new Builder */
+ private Builder() {
+ super(SCHEMA$);
+ }
+
+ /**
+ * Creates a Builder by copying an existing Builder.
+ * @param other The existing Builder to copy.
+ */
+ private Builder(Metric.Builder other) {
+ super(other);
+ if (isValidValue(fields()[0], other.name)) {
+ this.name = data().deepCopy(fields()[0].schema(), other.name);
+ fieldSetFlags()[0] = true;
+ }
+ if (isValidValue(fields()[1], other.value)) {
+ this.value = data().deepCopy(fields()[1].schema(), other.value);
+ fieldSetFlags()[1] = true;
+ }
+ }
+
+ /**
+ * Creates a Builder by copying an existing Metric instance
+ * @param other The existing instance to copy.
+ */
+ private Builder(Metric other) {
+ super(SCHEMA$);
+ if (isValidValue(fields()[0], other.name)) {
+ this.name = data().deepCopy(fields()[0].schema(), other.name);
+ fieldSetFlags()[0] = true;
+ }
+ if (isValidValue(fields()[1], other.value)) {
+ this.value = data().deepCopy(fields()[1].schema(), other.value);
+ fieldSetFlags()[1] = true;
+ }
+ }
+
+ /**
+ * Gets the value of the 'name' field.
+ * Metric name.
+ * @return The value.
+ */
+ public java.lang.String getName() {
+ return name;
+ }
+
+ /**
+ * Sets the value of the 'name' field.
+ * Metric name.
+ * @param value The value of 'name'.
+ * @return This builder.
+ */
+ public Metric.Builder setName(java.lang.String value) {
+ validate(fields()[0], value);
+ this.name = value;
+ fieldSetFlags()[0] = true;
+ return this;
+ }
+
+ /**
+ * Checks whether the 'name' field has been set.
+ * Metric name.
+ * @return True if the 'name' field has been set, false otherwise.
+ */
+ public boolean hasName() {
+ return fieldSetFlags()[0];
+ }
+
+
+ /**
+ * Clears the value of the 'name' field.
+ * Metric name.
+ * @return This builder.
+ */
+ public Metric.Builder clearName() {
+ name = null;
+ fieldSetFlags()[0] = false;
+ return this;
+ }
+
+ /**
+ * Gets the value of the 'value' field.
+ * Metric value.
+ * @return The value.
+ */
+ public java.lang.Double getValue() {
+ return value;
+ }
+
+ /**
+ * Sets the value of the 'value' field.
+ * Metric value.
+ * @param value The value of 'value'.
+ * @return This builder.
+ */
+ public Metric.Builder setValue(double value) {
+ validate(fields()[1], value);
+ this.value = value;
+ fieldSetFlags()[1] = true;
+ return this;
+ }
+
+ /**
+ * Checks whether the 'value' field has been set.
+ * Metric value.
+ * @return True if the 'value' field has been set, false otherwise.
+ */
+ public boolean hasValue() {
+ return fieldSetFlags()[1];
+ }
+
+
+ /**
+ * Clears the value of the 'value' field.
+ * Metric value.
+ * @return This builder.
+ */
+ public Metric.Builder clearValue() {
+ fieldSetFlags()[1] = false;
+ return this;
+ }
+
+ @Override
+ public Metric build() {
+ try {
+ Metric record = new Metric();
+ record.name = fieldSetFlags()[0] ? this.name : (java.lang.String) defaultValue(fields()[0]);
+ record.value = fieldSetFlags()[1] ? this.value : (java.lang.Double) defaultValue(fields()[1]);
+ return record;
+ } catch (Exception e) {
+ throw new org.apache.avro.AvroRuntimeException(e);
+ }
+ }
+ }
+
+ private static final org.apache.avro.io.DatumWriter
+ WRITER$ = new org.apache.avro.specific.SpecificDatumWriter(SCHEMA$);
+
+ @Override public void writeExternal(java.io.ObjectOutput out)
+ throws java.io.IOException {
+ WRITER$.write(this, SpecificData.getEncoder(out));
+ }
+
+ private static final org.apache.avro.io.DatumReader
+ READER$ = new org.apache.avro.specific.SpecificDatumReader(SCHEMA$);
+
+ @Override public void readExternal(java.io.ObjectInput in)
+ throws java.io.IOException {
+ READER$.read(this, SpecificData.getDecoder(in));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-gobblin/blob/92e1276e/gobblin-metrics-libs/gobblin-metrics-base/src/main/gen-java/MetricReport.java
----------------------------------------------------------------------
diff --git a/gobblin-metrics-libs/gobblin-metrics-base/src/main/gen-java/MetricReport.java b/gobblin-metrics-libs/gobblin-metrics-base/src/main/gen-java/MetricReport.java
new file mode 100644
index 0000000..229f509
--- /dev/null
+++ b/gobblin-metrics-libs/gobblin-metrics-base/src/main/gen-java/MetricReport.java
@@ -0,0 +1,356 @@
+/**
+ * Autogenerated by Avro
+ *
+ * DO NOT EDIT DIRECTLY
+ */
+
+import org.apache.avro.specific.SpecificData;
+
+@SuppressWarnings("all")
+@org.apache.avro.specific.AvroGenerated
+public class MetricReport extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
+ private static final long serialVersionUID = -3871534513744778107L;
+ public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"MetricReport\",\"fields\":[{\"name\":\"tags\",\"type\":{\"type\":\"map\",\"values\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"avro.java.string\":\"String\"},\"doc\":\"Tags associated with the metrics.\"},{\"name\":\"timestamp\",\"type\":\"long\",\"doc\":\"Time at which metrics were reported.\"},{\"name\":\"metrics\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"Metric\",\"fields\":[{\"name\":\"name\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Metric name.\"},{\"name\":\"value\",\"type\":\"double\",\"doc\":\"Metric value.\"}]}},\"doc\":\"Array of metrics in this report.\"}],\"namesapce\":\"org.apache.gobblin.metrics\"}");
+ public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
+ /** Tags associated with the metrics. */
+ @Deprecated public java.util.Map<java.lang.String,java.lang.String> tags;
+ /** Time at which metrics were reported. */
+ @Deprecated public long timestamp;
+ /** Array of metrics in this report. */
+ @Deprecated public java.util.List<Metric> metrics;
+
+ /**
+ * Default constructor. Note that this does not initialize fields
+ * to their default values from the schema. If that is desired then
+ * one should use <code>newBuilder()</code>.
+ */
+ public MetricReport() {}
+
+ /**
+ * All-args constructor.
+ * @param tags Tags associated with the metrics.
+ * @param timestamp Time at which metrics were reported.
+ * @param metrics Array of metrics in this report.
+ */
+ public MetricReport(java.util.Map<java.lang.String,java.lang.String> tags, java.lang.Long timestamp, java.util.List<Metric> metrics) {
+ this.tags = tags;
+ this.timestamp = timestamp;
+ this.metrics = metrics;
+ }
+
+ public org.apache.avro.Schema getSchema() { return SCHEMA$; }
+ // Used by DatumWriter. Applications should not call.
+ public java.lang.Object get(int field$) {
+ switch (field$) {
+ case 0: return tags;
+ case 1: return timestamp;
+ case 2: return metrics;
+ default: throw new org.apache.avro.AvroRuntimeException("Bad index");
+ }
+ }
+
+ // Used by DatumReader. Applications should not call.
+ @SuppressWarnings(value="unchecked")
+ public void put(int field$, java.lang.Object value$) {
+ switch (field$) {
+ case 0: tags = (java.util.Map<java.lang.String,java.lang.String>)value$; break;
+ case 1: timestamp = (java.lang.Long)value$; break;
+ case 2: metrics = (java.util.List<Metric>)value$; break;
+ default: throw new org.apache.avro.AvroRuntimeException("Bad index");
+ }
+ }
+
+ /**
+ * Gets the value of the 'tags' field.
+ * @return Tags associated with the metrics.
+ */
+ public java.util.Map<java.lang.String,java.lang.String> getTags() {
+ return tags;
+ }
+
+ /**
+ * Sets the value of the 'tags' field.
+ * Tags associated with the metrics.
+ * @param value the value to set.
+ */
+ public void setTags(java.util.Map<java.lang.String,java.lang.String> value) {
+ this.tags = value;
+ }
+
+ /**
+ * Gets the value of the 'timestamp' field.
+ * @return Time at which metrics were reported.
+ */
+ public java.lang.Long getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ * Sets the value of the 'timestamp' field.
+ * Time at which metrics were reported.
+ * @param value the value to set.
+ */
+ public void setTimestamp(java.lang.Long value) {
+ this.timestamp = value;
+ }
+
+ /**
+ * Gets the value of the 'metrics' field.
+ * @return Array of metrics in this report.
+ */
+ public java.util.List<Metric> getMetrics() {
+ return metrics;
+ }
+
+ /**
+ * Sets the value of the 'metrics' field.
+ * Array of metrics in this report.
+ * @param value the value to set.
+ */
+ public void setMetrics(java.util.List<Metric> value) {
+ this.metrics = value;
+ }
+
+ /**
+ * Creates a new MetricReport RecordBuilder.
+ * @return A new MetricReport RecordBuilder
+ */
+ public static MetricReport.Builder newBuilder() {
+ return new MetricReport.Builder();
+ }
+
+ /**
+ * Creates a new MetricReport RecordBuilder by copying an existing Builder.
+ * @param other The existing builder to copy.
+ * @return A new MetricReport RecordBuilder
+ */
+ public static MetricReport.Builder newBuilder(MetricReport.Builder other) {
+ return new MetricReport.Builder(other);
+ }
+
+ /**
+ * Creates a new MetricReport RecordBuilder by copying an existing MetricReport instance.
+ * @param other The existing instance to copy.
+ * @return A new MetricReport RecordBuilder
+ */
+ public static MetricReport.Builder newBuilder(MetricReport other) {
+ return new MetricReport.Builder(other);
+ }
+
+ /**
+ * RecordBuilder for MetricReport instances.
+ */
+ public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<MetricReport>
+ implements org.apache.avro.data.RecordBuilder<MetricReport> {
+
+ /** Tags associated with the metrics. */
+ private java.util.Map<java.lang.String,java.lang.String> tags;
+ /** Time at which metrics were reported. */
+ private long timestamp;
+ /** Array of metrics in this report. */
+ private java.util.List<Metric> metrics;
+
+ /** Creates a new Builder */
+ private Builder() {
+ super(SCHEMA$);
+ }
+
+ /**
+ * Creates a Builder by copying an existing Builder.
+ * @param other The existing Builder to copy.
+ */
+ private Builder(MetricReport.Builder other) {
+ super(other);
+ if (isValidValue(fields()[0], other.tags)) {
+ this.tags = data().deepCopy(fields()[0].schema(), other.tags);
+ fieldSetFlags()[0] = true;
+ }
+ if (isValidValue(fields()[1], other.timestamp)) {
+ this.timestamp = data().deepCopy(fields()[1].schema(), other.timestamp);
+ fieldSetFlags()[1] = true;
+ }
+ if (isValidValue(fields()[2], other.metrics)) {
+ this.metrics = data().deepCopy(fields()[2].schema(), other.metrics);
+ fieldSetFlags()[2] = true;
+ }
+ }
+
+ /**
+ * Creates a Builder by copying an existing MetricReport instance
+ * @param other The existing instance to copy.
+ */
+ private Builder(MetricReport other) {
+ super(SCHEMA$);
+ if (isValidValue(fields()[0], other.tags)) {
+ this.tags = data().deepCopy(fields()[0].schema(), other.tags);
+ fieldSetFlags()[0] = true;
+ }
+ if (isValidValue(fields()[1], other.timestamp)) {
+ this.timestamp = data().deepCopy(fields()[1].schema(), other.timestamp);
+ fieldSetFlags()[1] = true;
+ }
+ if (isValidValue(fields()[2], other.metrics)) {
+ this.metrics = data().deepCopy(fields()[2].schema(), other.metrics);
+ fieldSetFlags()[2] = true;
+ }
+ }
+
+ /**
+ * Gets the value of the 'tags' field.
+ * Tags associated with the metrics.
+ * @return The value.
+ */
+ public java.util.Map<java.lang.String,java.lang.String> getTags() {
+ return tags;
+ }
+
+ /**
+ * Sets the value of the 'tags' field.
+ * Tags associated with the metrics.
+ * @param value The value of 'tags'.
+ * @return This builder.
+ */
+ public MetricReport.Builder setTags(java.util.Map<java.lang.String,java.lang.String> value) {
+ validate(fields()[0], value);
+ this.tags = value;
+ fieldSetFlags()[0] = true;
+ return this;
+ }
+
+ /**
+ * Checks whether the 'tags' field has been set.
+ * Tags associated with the metrics.
+ * @return True if the 'tags' field has been set, false otherwise.
+ */
+ public boolean hasTags() {
+ return fieldSetFlags()[0];
+ }
+
+
+ /**
+ * Clears the value of the 'tags' field.
+ * Tags associated with the metrics.
+ * @return This builder.
+ */
+ public MetricReport.Builder clearTags() {
+ tags = null;
+ fieldSetFlags()[0] = false;
+ return this;
+ }
+
+ /**
+ * Gets the value of the 'timestamp' field.
+ * Time at which metrics were reported.
+ * @return The value.
+ */
+ public java.lang.Long getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ * Sets the value of the 'timestamp' field.
+ * Time at which metrics were reported.
+ * @param value The value of 'timestamp'.
+ * @return This builder.
+ */
+ public MetricReport.Builder setTimestamp(long value) {
+ validate(fields()[1], value);
+ this.timestamp = value;
+ fieldSetFlags()[1] = true;
+ return this;
+ }
+
+ /**
+ * Checks whether the 'timestamp' field has been set.
+ * Time at which metrics were reported.
+ * @return True if the 'timestamp' field has been set, false otherwise.
+ */
+ public boolean hasTimestamp() {
+ return fieldSetFlags()[1];
+ }
+
+
+ /**
+ * Clears the value of the 'timestamp' field.
+ * Time at which metrics were reported.
+ * @return This builder.
+ */
+ public MetricReport.Builder clearTimestamp() {
+ fieldSetFlags()[1] = false;
+ return this;
+ }
+
+ /**
+ * Gets the value of the 'metrics' field.
+ * Array of metrics in this report.
+ * @return The value.
+ */
+ public java.util.List<Metric> getMetrics() {
+ return metrics;
+ }
+
+ /**
+ * Sets the value of the 'metrics' field.
+ * Array of metrics in this report.
+ * @param value The value of 'metrics'.
+ * @return This builder.
+ */
+ public MetricReport.Builder setMetrics(java.util.List<Metric> value) {
+ validate(fields()[2], value);
+ this.metrics = value;
+ fieldSetFlags()[2] = true;
+ return this;
+ }
+
+ /**
+ * Checks whether the 'metrics' field has been set.
+ * Array of metrics in this report.
+ * @return True if the 'metrics' field has been set, false otherwise.
+ */
+ public boolean hasMetrics() {
+ return fieldSetFlags()[2];
+ }
+
+
+ /**
+ * Clears the value of the 'metrics' field.
+ * Array of metrics in this report.
+ * @return This builder.
+ */
+ public MetricReport.Builder clearMetrics() {
+ metrics = null;
+ fieldSetFlags()[2] = false;
+ return this;
+ }
+
+ @Override
+ public MetricReport build() {
+ try {
+ MetricReport record = new MetricReport();
+ record.tags = fieldSetFlags()[0] ? this.tags : (java.util.Map<java.lang.String,java.lang.String>) defaultValue(fields()[0]);
+ record.timestamp = fieldSetFlags()[1] ? this.timestamp : (java.lang.Long) defaultValue(fields()[1]);
+ record.metrics = fieldSetFlags()[2] ? this.metrics : (java.util.List<Metric>) defaultValue(fields()[2]);
+ return record;
+ } catch (Exception e) {
+ throw new org.apache.avro.AvroRuntimeException(e);
+ }
+ }
+ }
+
+ private static final org.apache.avro.io.DatumWriter
+ WRITER$ = new org.apache.avro.specific.SpecificDatumWriter(SCHEMA$);
+
+ @Override public void writeExternal(java.io.ObjectOutput out)
+ throws java.io.IOException {
+ WRITER$.write(this, SpecificData.getEncoder(out));
+ }
+
+ private static final org.apache.avro.io.DatumReader
+ READER$ = new org.apache.avro.specific.SpecificDatumReader(SCHEMA$);
+
+ @Override public void readExternal(java.io.ObjectInput in)
+ throws java.io.IOException {
+ READER$.read(this, SpecificData.getDecoder(in));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-gobblin/blob/92e1276e/gobblin-metrics-libs/gobblin-metrics-base/src/main/gen-java/org/apache/gobblin/metrics/FlatGobblinMetric.java
----------------------------------------------------------------------
diff --git a/gobblin-metrics-libs/gobblin-metrics-base/src/main/gen-java/org/apache/gobblin/metrics/FlatGobblinMetric.java b/gobblin-metrics-libs/gobblin-metrics-base/src/main/gen-java/org/apache/gobblin/metrics/FlatGobblinMetric.java
deleted file mode 100644
index 40719db..0000000
--- a/gobblin-metrics-libs/gobblin-metrics-base/src/main/gen-java/org/apache/gobblin/metrics/FlatGobblinMetric.java
+++ /dev/null
@@ -1,433 +0,0 @@
-/**
- * Autogenerated by Avro
- *
- * DO NOT EDIT DIRECTLY
- */
-package org.apache.gobblin.metrics;
-
-import org.apache.avro.specific.SpecificData;
-
-@SuppressWarnings("all")
-@org.apache.avro.specific.AvroGenerated
-public class FlatGobblinMetric extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
- private static final long serialVersionUID = 277556715077932861L;
- public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"FlatGobblinMetric\",\"namespace\":\"gobblin.metrics\",\"fields\":[{\"name\":\"tags\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"string\",\"avro.java.string\":\"String\"}},\"doc\":\"Tags associated with the metrics in the form key:value.\"},{\"name\":\"timestamp\",\"type\":\"long\",\"doc\":\"Time at which metrics were reported.\"},{\"name\":\"metricName\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"The name of this metric.\"},{\"name\":\"metricValue\",\"type\":\"double\",\"doc\":\"The value of this metric.\"}]}");
- public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
- /** Tags associated with the metrics in the form key:value. */
- @Deprecated public java.util.List<java.lang.String> tags;
- /** Time at which metrics were reported. */
- @Deprecated public long timestamp;
- /** The name of this metric. */
- @Deprecated public java.lang.String metricName;
- /** The value of this metric. */
- @Deprecated public double metricValue;
-
- /**
- * Default constructor. Note that this does not initialize fields
- * to their default values from the schema. If that is desired then
- * one should use <code>newBuilder()</code>.
- */
- public FlatGobblinMetric() {}
-
- /**
- * All-args constructor.
- * @param tags Tags associated with the metrics in the form key:value.
- * @param timestamp Time at which metrics were reported.
- * @param metricName The name of this metric.
- * @param metricValue The value of this metric.
- */
- public FlatGobblinMetric(java.util.List<java.lang.String> tags, java.lang.Long timestamp, java.lang.String metricName, java.lang.Double metricValue) {
- this.tags = tags;
- this.timestamp = timestamp;
- this.metricName = metricName;
- this.metricValue = metricValue;
- }
-
- public org.apache.avro.Schema getSchema() { return SCHEMA$; }
- // Used by DatumWriter. Applications should not call.
- public java.lang.Object get(int field$) {
- switch (field$) {
- case 0: return tags;
- case 1: return timestamp;
- case 2: return metricName;
- case 3: return metricValue;
- default: throw new org.apache.avro.AvroRuntimeException("Bad index");
- }
- }
-
- // Used by DatumReader. Applications should not call.
- @SuppressWarnings(value="unchecked")
- public void put(int field$, java.lang.Object value$) {
- switch (field$) {
- case 0: tags = (java.util.List<java.lang.String>)value$; break;
- case 1: timestamp = (java.lang.Long)value$; break;
- case 2: metricName = (java.lang.String)value$; break;
- case 3: metricValue = (java.lang.Double)value$; break;
- default: throw new org.apache.avro.AvroRuntimeException("Bad index");
- }
- }
-
- /**
- * Gets the value of the 'tags' field.
- * @return Tags associated with the metrics in the form key:value.
- */
- public java.util.List<java.lang.String> getTags() {
- return tags;
- }
-
- /**
- * Sets the value of the 'tags' field.
- * Tags associated with the metrics in the form key:value.
- * @param value the value to set.
- */
- public void setTags(java.util.List<java.lang.String> value) {
- this.tags = value;
- }
-
- /**
- * Gets the value of the 'timestamp' field.
- * @return Time at which metrics were reported.
- */
- public java.lang.Long getTimestamp() {
- return timestamp;
- }
-
- /**
- * Sets the value of the 'timestamp' field.
- * Time at which metrics were reported.
- * @param value the value to set.
- */
- public void setTimestamp(java.lang.Long value) {
- this.timestamp = value;
- }
-
- /**
- * Gets the value of the 'metricName' field.
- * @return The name of this metric.
- */
- public java.lang.String getMetricName() {
- return metricName;
- }
-
- /**
- * Sets the value of the 'metricName' field.
- * The name of this metric.
- * @param value the value to set.
- */
- public void setMetricName(java.lang.String value) {
- this.metricName = value;
- }
-
- /**
- * Gets the value of the 'metricValue' field.
- * @return The value of this metric.
- */
- public java.lang.Double getMetricValue() {
- return metricValue;
- }
-
- /**
- * Sets the value of the 'metricValue' field.
- * The value of this metric.
- * @param value the value to set.
- */
- public void setMetricValue(java.lang.Double value) {
- this.metricValue = value;
- }
-
- /**
- * Creates a new FlatGobblinMetric RecordBuilder.
- * @return A new FlatGobblinMetric RecordBuilder
- */
- public static org.apache.gobblin.metrics.FlatGobblinMetric.Builder newBuilder() {
- return new org.apache.gobblin.metrics.FlatGobblinMetric.Builder();
- }
-
- /**
- * Creates a new FlatGobblinMetric RecordBuilder by copying an existing Builder.
- * @param other The existing builder to copy.
- * @return A new FlatGobblinMetric RecordBuilder
- */
- public static org.apache.gobblin.metrics.FlatGobblinMetric.Builder newBuilder(org.apache.gobblin.metrics.FlatGobblinMetric.Builder other) {
- return new org.apache.gobblin.metrics.FlatGobblinMetric.Builder(other);
- }
-
- /**
- * Creates a new FlatGobblinMetric RecordBuilder by copying an existing FlatGobblinMetric instance.
- * @param other The existing instance to copy.
- * @return A new FlatGobblinMetric RecordBuilder
- */
- public static org.apache.gobblin.metrics.FlatGobblinMetric.Builder newBuilder(org.apache.gobblin.metrics.FlatGobblinMetric other) {
- return new org.apache.gobblin.metrics.FlatGobblinMetric.Builder(other);
- }
-
- /**
- * RecordBuilder for FlatGobblinMetric instances.
- */
- public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<FlatGobblinMetric>
- implements org.apache.avro.data.RecordBuilder<FlatGobblinMetric> {
-
- /** Tags associated with the metrics in the form key:value. */
- private java.util.List<java.lang.String> tags;
- /** Time at which metrics were reported. */
- private long timestamp;
- /** The name of this metric. */
- private java.lang.String metricName;
- /** The value of this metric. */
- private double metricValue;
-
- /** Creates a new Builder */
- private Builder() {
- super(SCHEMA$);
- }
-
- /**
- * Creates a Builder by copying an existing Builder.
- * @param other The existing Builder to copy.
- */
- private Builder(org.apache.gobblin.metrics.FlatGobblinMetric.Builder other) {
- super(other);
- if (isValidValue(fields()[0], other.tags)) {
- this.tags = data().deepCopy(fields()[0].schema(), other.tags);
- fieldSetFlags()[0] = true;
- }
- if (isValidValue(fields()[1], other.timestamp)) {
- this.timestamp = data().deepCopy(fields()[1].schema(), other.timestamp);
- fieldSetFlags()[1] = true;
- }
- if (isValidValue(fields()[2], other.metricName)) {
- this.metricName = data().deepCopy(fields()[2].schema(), other.metricName);
- fieldSetFlags()[2] = true;
- }
- if (isValidValue(fields()[3], other.metricValue)) {
- this.metricValue = data().deepCopy(fields()[3].schema(), other.metricValue);
- fieldSetFlags()[3] = true;
- }
- }
-
- /**
- * Creates a Builder by copying an existing FlatGobblinMetric instance
- * @param other The existing instance to copy.
- */
- private Builder(org.apache.gobblin.metrics.FlatGobblinMetric other) {
- super(SCHEMA$);
- if (isValidValue(fields()[0], other.tags)) {
- this.tags = data().deepCopy(fields()[0].schema(), other.tags);
- fieldSetFlags()[0] = true;
- }
- if (isValidValue(fields()[1], other.timestamp)) {
- this.timestamp = data().deepCopy(fields()[1].schema(), other.timestamp);
- fieldSetFlags()[1] = true;
- }
- if (isValidValue(fields()[2], other.metricName)) {
- this.metricName = data().deepCopy(fields()[2].schema(), other.metricName);
- fieldSetFlags()[2] = true;
- }
- if (isValidValue(fields()[3], other.metricValue)) {
- this.metricValue = data().deepCopy(fields()[3].schema(), other.metricValue);
- fieldSetFlags()[3] = true;
- }
- }
-
- /**
- * Gets the value of the 'tags' field.
- * Tags associated with the metrics in the form key:value.
- * @return The value.
- */
- public java.util.List<java.lang.String> getTags() {
- return tags;
- }
-
- /**
- * Sets the value of the 'tags' field.
- * Tags associated with the metrics in the form key:value.
- * @param value The value of 'tags'.
- * @return This builder.
- */
- public org.apache.gobblin.metrics.FlatGobblinMetric.Builder setTags(java.util.List<java.lang.String> value) {
- validate(fields()[0], value);
- this.tags = value;
- fieldSetFlags()[0] = true;
- return this;
- }
-
- /**
- * Checks whether the 'tags' field has been set.
- * Tags associated with the metrics in the form key:value.
- * @return True if the 'tags' field has been set, false otherwise.
- */
- public boolean hasTags() {
- return fieldSetFlags()[0];
- }
-
-
- /**
- * Clears the value of the 'tags' field.
- * Tags associated with the metrics in the form key:value.
- * @return This builder.
- */
- public org.apache.gobblin.metrics.FlatGobblinMetric.Builder clearTags() {
- tags = null;
- fieldSetFlags()[0] = false;
- return this;
- }
-
- /**
- * Gets the value of the 'timestamp' field.
- * Time at which metrics were reported.
- * @return The value.
- */
- public java.lang.Long getTimestamp() {
- return timestamp;
- }
-
- /**
- * Sets the value of the 'timestamp' field.
- * Time at which metrics were reported.
- * @param value The value of 'timestamp'.
- * @return This builder.
- */
- public org.apache.gobblin.metrics.FlatGobblinMetric.Builder setTimestamp(long value) {
- validate(fields()[1], value);
- this.timestamp = value;
- fieldSetFlags()[1] = true;
- return this;
- }
-
- /**
- * Checks whether the 'timestamp' field has been set.
- * Time at which metrics were reported.
- * @return True if the 'timestamp' field has been set, false otherwise.
- */
- public boolean hasTimestamp() {
- return fieldSetFlags()[1];
- }
-
-
- /**
- * Clears the value of the 'timestamp' field.
- * Time at which metrics were reported.
- * @return This builder.
- */
- public org.apache.gobblin.metrics.FlatGobblinMetric.Builder clearTimestamp() {
- fieldSetFlags()[1] = false;
- return this;
- }
-
- /**
- * Gets the value of the 'metricName' field.
- * The name of this metric.
- * @return The value.
- */
- public java.lang.String getMetricName() {
- return metricName;
- }
-
- /**
- * Sets the value of the 'metricName' field.
- * The name of this metric.
- * @param value The value of 'metricName'.
- * @return This builder.
- */
- public org.apache.gobblin.metrics.FlatGobblinMetric.Builder setMetricName(java.lang.String value) {
- validate(fields()[2], value);
- this.metricName = value;
- fieldSetFlags()[2] = true;
- return this;
- }
-
- /**
- * Checks whether the 'metricName' field has been set.
- * The name of this metric.
- * @return True if the 'metricName' field has been set, false otherwise.
- */
- public boolean hasMetricName() {
- return fieldSetFlags()[2];
- }
-
-
- /**
- * Clears the value of the 'metricName' field.
- * The name of this metric.
- * @return This builder.
- */
- public org.apache.gobblin.metrics.FlatGobblinMetric.Builder clearMetricName() {
- metricName = null;
- fieldSetFlags()[2] = false;
- return this;
- }
-
- /**
- * Gets the value of the 'metricValue' field.
- * The value of this metric.
- * @return The value.
- */
- public java.lang.Double getMetricValue() {
- return metricValue;
- }
-
- /**
- * Sets the value of the 'metricValue' field.
- * The value of this metric.
- * @param value The value of 'metricValue'.
- * @return This builder.
- */
- public org.apache.gobblin.metrics.FlatGobblinMetric.Builder setMetricValue(double value) {
- validate(fields()[3], value);
- this.metricValue = value;
- fieldSetFlags()[3] = true;
- return this;
- }
-
- /**
- * Checks whether the 'metricValue' field has been set.
- * The value of this metric.
- * @return True if the 'metricValue' field has been set, false otherwise.
- */
- public boolean hasMetricValue() {
- return fieldSetFlags()[3];
- }
-
-
- /**
- * Clears the value of the 'metricValue' field.
- * The value of this metric.
- * @return This builder.
- */
- public org.apache.gobblin.metrics.FlatGobblinMetric.Builder clearMetricValue() {
- fieldSetFlags()[3] = false;
- return this;
- }
-
- @Override
- public FlatGobblinMetric build() {
- try {
- FlatGobblinMetric record = new FlatGobblinMetric();
- record.tags = fieldSetFlags()[0] ? this.tags : (java.util.List<java.lang.String>) defaultValue(fields()[0]);
- record.timestamp = fieldSetFlags()[1] ? this.timestamp : (java.lang.Long) defaultValue(fields()[1]);
- record.metricName = fieldSetFlags()[2] ? this.metricName : (java.lang.String) defaultValue(fields()[2]);
- record.metricValue = fieldSetFlags()[3] ? this.metricValue : (java.lang.Double) defaultValue(fields()[3]);
- return record;
- } catch (Exception e) {
- throw new org.apache.avro.AvroRuntimeException(e);
- }
- }
- }
-
- private static final org.apache.avro.io.DatumWriter
- WRITER$ = new org.apache.avro.specific.SpecificDatumWriter(SCHEMA$);
-
- @Override public void writeExternal(java.io.ObjectOutput out)
- throws java.io.IOException {
- WRITER$.write(this, SpecificData.getEncoder(out));
- }
-
- private static final org.apache.avro.io.DatumReader
- READER$ = new org.apache.avro.specific.SpecificDatumReader(SCHEMA$);
-
- @Override public void readExternal(java.io.ObjectInput in)
- throws java.io.IOException {
- READER$.read(this, SpecificData.getDecoder(in));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-gobblin/blob/92e1276e/gobblin-metrics-libs/gobblin-metrics-base/src/main/gen-java/org/apache/gobblin/metrics/GobblinTrackingEvent.java
----------------------------------------------------------------------
diff --git a/gobblin-metrics-libs/gobblin-metrics-base/src/main/gen-java/org/apache/gobblin/metrics/GobblinTrackingEvent.java b/gobblin-metrics-libs/gobblin-metrics-base/src/main/gen-java/org/apache/gobblin/metrics/GobblinTrackingEvent.java
deleted file mode 100644
index 716ec89..0000000
--- a/gobblin-metrics-libs/gobblin-metrics-base/src/main/gen-java/org/apache/gobblin/metrics/GobblinTrackingEvent.java
+++ /dev/null
@@ -1,434 +0,0 @@
-/**
- * Autogenerated by Avro
- *
- * DO NOT EDIT DIRECTLY
- */
-package org.apache.gobblin.metrics;
-
-import org.apache.avro.specific.SpecificData;
-
-@SuppressWarnings("all")
-@org.apache.avro.specific.AvroGenerated
-public class GobblinTrackingEvent extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
- private static final long serialVersionUID = -6700465194787422943L;
- public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"GobblinTrackingEvent\",\"namespace\":\"gobblin.metrics\",\"fields\":[{\"name\":\"timestamp\",\"type\":\"long\",\"doc\":\"Time at which event was created.\",\"default\":0},{\"name\":\"namespace\",\"type\":[{\"type\":\"string\",\"avro.java.string\":\"String\"},\"null\"],\"doc\":\"Namespace used for filtering of events.\"},{\"name\":\"name\",\"type\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"doc\":\"Event name.\"},{\"name\":\"metadata\",\"type\":{\"type\":\"map\",\"values\":{\"type\":\"string\",\"avro.java.string\":\"String\"},\"avro.java.string\":\"String\"},\"doc\":\"Event metadata.\",\"default\":{}}]}");
- public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
- /** Time at which event was created. */
- @Deprecated public long timestamp;
- /** Namespace used for filtering of events. */
- @Deprecated public java.lang.String namespace;
- /** Event name. */
- @Deprecated public java.lang.String name;
- /** Event metadata. */
- @Deprecated public java.util.Map<java.lang.String,java.lang.String> metadata;
-
- /**
- * Default constructor. Note that this does not initialize fields
- * to their default values from the schema. If that is desired then
- * one should use <code>newBuilder()</code>.
- */
- public GobblinTrackingEvent() {}
-
- /**
- * All-args constructor.
- * @param timestamp Time at which event was created.
- * @param namespace Namespace used for filtering of events.
- * @param name Event name.
- * @param metadata Event metadata.
- */
- public GobblinTrackingEvent(java.lang.Long timestamp, java.lang.String namespace, java.lang.String name, java.util.Map<java.lang.String,java.lang.String> metadata) {
- this.timestamp = timestamp;
- this.namespace = namespace;
- this.name = name;
- this.metadata = metadata;
- }
-
- public org.apache.avro.Schema getSchema() { return SCHEMA$; }
- // Used by DatumWriter. Applications should not call.
- public java.lang.Object get(int field$) {
- switch (field$) {
- case 0: return timestamp;
- case 1: return namespace;
- case 2: return name;
- case 3: return metadata;
- default: throw new org.apache.avro.AvroRuntimeException("Bad index");
- }
- }
-
- // Used by DatumReader. Applications should not call.
- @SuppressWarnings(value="unchecked")
- public void put(int field$, java.lang.Object value$) {
- switch (field$) {
- case 0: timestamp = (java.lang.Long)value$; break;
- case 1: namespace = (java.lang.String)value$; break;
- case 2: name = (java.lang.String)value$; break;
- case 3: metadata = (java.util.Map<java.lang.String,java.lang.String>)value$; break;
- default: throw new org.apache.avro.AvroRuntimeException("Bad index");
- }
- }
-
- /**
- * Gets the value of the 'timestamp' field.
- * @return Time at which event was created.
- */
- public java.lang.Long getTimestamp() {
- return timestamp;
- }
-
- /**
- * Sets the value of the 'timestamp' field.
- * Time at which event was created.
- * @param value the value to set.
- */
- public void setTimestamp(java.lang.Long value) {
- this.timestamp = value;
- }
-
- /**
- * Gets the value of the 'namespace' field.
- * @return Namespace used for filtering of events.
- */
- public java.lang.String getNamespace() {
- return namespace;
- }
-
- /**
- * Sets the value of the 'namespace' field.
- * Namespace used for filtering of events.
- * @param value the value to set.
- */
- public void setNamespace(java.lang.String value) {
- this.namespace = value;
- }
-
- /**
- * Gets the value of the 'name' field.
- * @return Event name.
- */
- public java.lang.String getName() {
- return name;
- }
-
- /**
- * Sets the value of the 'name' field.
- * Event name.
- * @param value the value to set.
- */
- public void setName(java.lang.String value) {
- this.name = value;
- }
-
- /**
- * Gets the value of the 'metadata' field.
- * @return Event metadata.
- */
- public java.util.Map<java.lang.String,java.lang.String> getMetadata() {
- return metadata;
- }
-
- /**
- * Sets the value of the 'metadata' field.
- * Event metadata.
- * @param value the value to set.
- */
- public void setMetadata(java.util.Map<java.lang.String,java.lang.String> value) {
- this.metadata = value;
- }
-
- /**
- * Creates a new GobblinTrackingEvent RecordBuilder.
- * @return A new GobblinTrackingEvent RecordBuilder
- */
- public static org.apache.gobblin.metrics.GobblinTrackingEvent.Builder newBuilder() {
- return new org.apache.gobblin.metrics.GobblinTrackingEvent.Builder();
- }
-
- /**
- * Creates a new GobblinTrackingEvent RecordBuilder by copying an existing Builder.
- * @param other The existing builder to copy.
- * @return A new GobblinTrackingEvent RecordBuilder
- */
- public static org.apache.gobblin.metrics.GobblinTrackingEvent.Builder newBuilder(org.apache.gobblin.metrics.GobblinTrackingEvent.Builder other) {
- return new org.apache.gobblin.metrics.GobblinTrackingEvent.Builder(other);
- }
-
- /**
- * Creates a new GobblinTrackingEvent RecordBuilder by copying an existing GobblinTrackingEvent instance.
- * @param other The existing instance to copy.
- * @return A new GobblinTrackingEvent RecordBuilder
- */
- public static org.apache.gobblin.metrics.GobblinTrackingEvent.Builder newBuilder(org.apache.gobblin.metrics.GobblinTrackingEvent other) {
- return new org.apache.gobblin.metrics.GobblinTrackingEvent.Builder(other);
- }
-
- /**
- * RecordBuilder for GobblinTrackingEvent instances.
- */
- public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<GobblinTrackingEvent>
- implements org.apache.avro.data.RecordBuilder<GobblinTrackingEvent> {
-
- /** Time at which event was created. */
- private long timestamp;
- /** Namespace used for filtering of events. */
- private java.lang.String namespace;
- /** Event name. */
- private java.lang.String name;
- /** Event metadata. */
- private java.util.Map<java.lang.String,java.lang.String> metadata;
-
- /** Creates a new Builder */
- private Builder() {
- super(SCHEMA$);
- }
-
- /**
- * Creates a Builder by copying an existing Builder.
- * @param other The existing Builder to copy.
- */
- private Builder(org.apache.gobblin.metrics.GobblinTrackingEvent.Builder other) {
- super(other);
- if (isValidValue(fields()[0], other.timestamp)) {
- this.timestamp = data().deepCopy(fields()[0].schema(), other.timestamp);
- fieldSetFlags()[0] = true;
- }
- if (isValidValue(fields()[1], other.namespace)) {
- this.namespace = data().deepCopy(fields()[1].schema(), other.namespace);
- fieldSetFlags()[1] = true;
- }
- if (isValidValue(fields()[2], other.name)) {
- this.name = data().deepCopy(fields()[2].schema(), other.name);
- fieldSetFlags()[2] = true;
- }
- if (isValidValue(fields()[3], other.metadata)) {
- this.metadata = data().deepCopy(fields()[3].schema(), other.metadata);
- fieldSetFlags()[3] = true;
- }
- }
-
- /**
- * Creates a Builder by copying an existing GobblinTrackingEvent instance
- * @param other The existing instance to copy.
- */
- private Builder(org.apache.gobblin.metrics.GobblinTrackingEvent other) {
- super(SCHEMA$);
- if (isValidValue(fields()[0], other.timestamp)) {
- this.timestamp = data().deepCopy(fields()[0].schema(), other.timestamp);
- fieldSetFlags()[0] = true;
- }
- if (isValidValue(fields()[1], other.namespace)) {
- this.namespace = data().deepCopy(fields()[1].schema(), other.namespace);
- fieldSetFlags()[1] = true;
- }
- if (isValidValue(fields()[2], other.name)) {
- this.name = data().deepCopy(fields()[2].schema(), other.name);
- fieldSetFlags()[2] = true;
- }
- if (isValidValue(fields()[3], other.metadata)) {
- this.metadata = data().deepCopy(fields()[3].schema(), other.metadata);
- fieldSetFlags()[3] = true;
- }
- }
-
- /**
- * Gets the value of the 'timestamp' field.
- * Time at which event was created.
- * @return The value.
- */
- public java.lang.Long getTimestamp() {
- return timestamp;
- }
-
- /**
- * Sets the value of the 'timestamp' field.
- * Time at which event was created.
- * @param value The value of 'timestamp'.
- * @return This builder.
- */
- public org.apache.gobblin.metrics.GobblinTrackingEvent.Builder setTimestamp(long value) {
- validate(fields()[0], value);
- this.timestamp = value;
- fieldSetFlags()[0] = true;
- return this;
- }
-
- /**
- * Checks whether the 'timestamp' field has been set.
- * Time at which event was created.
- * @return True if the 'timestamp' field has been set, false otherwise.
- */
- public boolean hasTimestamp() {
- return fieldSetFlags()[0];
- }
-
-
- /**
- * Clears the value of the 'timestamp' field.
- * Time at which event was created.
- * @return This builder.
- */
- public org.apache.gobblin.metrics.GobblinTrackingEvent.Builder clearTimestamp() {
- fieldSetFlags()[0] = false;
- return this;
- }
-
- /**
- * Gets the value of the 'namespace' field.
- * Namespace used for filtering of events.
- * @return The value.
- */
- public java.lang.String getNamespace() {
- return namespace;
- }
-
- /**
- * Sets the value of the 'namespace' field.
- * Namespace used for filtering of events.
- * @param value The value of 'namespace'.
- * @return This builder.
- */
- public org.apache.gobblin.metrics.GobblinTrackingEvent.Builder setNamespace(java.lang.String value) {
- validate(fields()[1], value);
- this.namespace = value;
- fieldSetFlags()[1] = true;
- return this;
- }
-
- /**
- * Checks whether the 'namespace' field has been set.
- * Namespace used for filtering of events.
- * @return True if the 'namespace' field has been set, false otherwise.
- */
- public boolean hasNamespace() {
- return fieldSetFlags()[1];
- }
-
-
- /**
- * Clears the value of the 'namespace' field.
- * Namespace used for filtering of events.
- * @return This builder.
- */
- public org.apache.gobblin.metrics.GobblinTrackingEvent.Builder clearNamespace() {
- namespace = null;
- fieldSetFlags()[1] = false;
- return this;
- }
-
- /**
- * Gets the value of the 'name' field.
- * Event name.
- * @return The value.
- */
- public java.lang.String getName() {
- return name;
- }
-
- /**
- * Sets the value of the 'name' field.
- * Event name.
- * @param value The value of 'name'.
- * @return This builder.
- */
- public org.apache.gobblin.metrics.GobblinTrackingEvent.Builder setName(java.lang.String value) {
- validate(fields()[2], value);
- this.name = value;
- fieldSetFlags()[2] = true;
- return this;
- }
-
- /**
- * Checks whether the 'name' field has been set.
- * Event name.
- * @return True if the 'name' field has been set, false otherwise.
- */
- public boolean hasName() {
- return fieldSetFlags()[2];
- }
-
-
- /**
- * Clears the value of the 'name' field.
- * Event name.
- * @return This builder.
- */
- public org.apache.gobblin.metrics.GobblinTrackingEvent.Builder clearName() {
- name = null;
- fieldSetFlags()[2] = false;
- return this;
- }
-
- /**
- * Gets the value of the 'metadata' field.
- * Event metadata.
- * @return The value.
- */
- public java.util.Map<java.lang.String,java.lang.String> getMetadata() {
- return metadata;
- }
-
- /**
- * Sets the value of the 'metadata' field.
- * Event metadata.
- * @param value The value of 'metadata'.
- * @return This builder.
- */
- public org.apache.gobblin.metrics.GobblinTrackingEvent.Builder setMetadata(java.util.Map<java.lang.String,java.lang.String> value) {
- validate(fields()[3], value);
- this.metadata = value;
- fieldSetFlags()[3] = true;
- return this;
- }
-
- /**
- * Checks whether the 'metadata' field has been set.
- * Event metadata.
- * @return True if the 'metadata' field has been set, false otherwise.
- */
- public boolean hasMetadata() {
- return fieldSetFlags()[3];
- }
-
-
- /**
- * Clears the value of the 'metadata' field.
- * Event metadata.
- * @return This builder.
- */
- public org.apache.gobblin.metrics.GobblinTrackingEvent.Builder clearMetadata() {
- metadata = null;
- fieldSetFlags()[3] = false;
- return this;
- }
-
- @Override
- public GobblinTrackingEvent build() {
- try {
- GobblinTrackingEvent record = new GobblinTrackingEvent();
- record.timestamp = fieldSetFlags()[0] ? this.timestamp : (java.lang.Long) defaultValue(fields()[0]);
- record.namespace = fieldSetFlags()[1] ? this.namespace : (java.lang.String) defaultValue(fields()[1]);
- record.name = fieldSetFlags()[2] ? this.name : (java.lang.String) defaultValue(fields()[2]);
- record.metadata = fieldSetFlags()[3] ? this.metadata : (java.util.Map<java.lang.String,java.lang.String>) defaultValue(fields()[3]);
- return record;
- } catch (Exception e) {
- throw new org.apache.avro.AvroRuntimeException(e);
- }
- }
- }
-
- private static final org.apache.avro.io.DatumWriter
- WRITER$ = new org.apache.avro.specific.SpecificDatumWriter(SCHEMA$);
-
- @Override public void writeExternal(java.io.ObjectOutput out)
- throws java.io.IOException {
- WRITER$.write(this, SpecificData.getEncoder(out));
- }
-
- private static final org.apache.avro.io.DatumReader
- READER$ = new org.apache.avro.specific.SpecificDatumReader(SCHEMA$);
-
- @Override public void readExternal(java.io.ObjectInput in)
- throws java.io.IOException {
- READER$.read(this, SpecificData.getDecoder(in));
- }
-
-}