diff --git a/pom.xml b/pom.xml
index 4b73edf0d638..7b9199f1653e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -488,7 +488,12 @@
com.google.protobuf
protobuf-java
- 2.5.0
+ 3.0.2
+
+
+ com.google.protobuf
+ protobuf-java-util
+ 3.0.2
io.tesla.aether
diff --git a/processing/pom.xml b/processing/pom.xml
index 7fc3fc70820f..fff0e4d6d340 100644
--- a/processing/pom.xml
+++ b/processing/pom.xml
@@ -59,6 +59,10 @@
com.google.protobuf
protobuf-java
+
+ com.google.protobuf
+ protobuf-java-util
+
commons-io
commons-io
diff --git a/processing/src/main/java/io/druid/data/input/ProtoBufInputRowParser.java b/processing/src/main/java/io/druid/data/input/ProtoBufInputRowParser.java
index 4592af370a9b..27e08ec1fa88 100644
--- a/processing/src/main/java/io/druid/data/input/ProtoBufInputRowParser.java
+++ b/processing/src/main/java/io/druid/data/input/ProtoBufInputRowParser.java
@@ -23,13 +23,13 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.google.common.base.Throwables;
-import com.google.common.collect.Maps;
import com.google.protobuf.ByteString;
-import com.google.protobuf.Descriptors;
import com.google.protobuf.DynamicMessage;
import com.google.protobuf.InvalidProtocolBufferException;
+import com.google.protobuf.util.JsonFormat;
import com.metamx.common.logger.Logger;
-import io.druid.data.input.impl.MapInputRowParser;
+import com.metamx.common.parsers.ParseException;
+import com.metamx.common.parsers.Parser;
import io.druid.data.input.impl.ParseSpec;
import java.io.InputStream;
@@ -46,7 +46,7 @@ public class ProtoBufInputRowParser implements ByteBufferInputRowParser
private static final Logger log = new Logger(ProtoBufInputRowParser.class);
private final ParseSpec parseSpec;
- private final MapInputRowParser mapParser;
+ private Parser parser;
private final String descriptorFileInClasspath;
@JsonCreator
@@ -57,7 +57,7 @@ public ProtoBufInputRowParser(
{
this.parseSpec = parseSpec;
this.descriptorFileInClasspath = descriptorFileInClasspath;
- this.mapParser = new MapInputRowParser(this.parseSpec);
+ this.parser = parseSpec.makeParser();
}
@Override
@@ -74,44 +74,28 @@ public ProtoBufInputRowParser withParseSpec(ParseSpec parseSpec)
@Override
public InputRow parse(ByteBuffer input)
- {
- // We should really create a ProtoBufBasedInputRow that does not need an intermediate map but accesses
- // the DynamicMessage directly...
- Map theMap = buildStringKeyMap(input);
-
- return mapParser.parse(theMap);
- }
-
- private Map buildStringKeyMap(ByteBuffer input)
{
final Descriptor descriptor = getDescriptor(descriptorFileInClasspath);
- final Map theMap = Maps.newHashMap();
-
+ DynamicMessage message;
try {
- DynamicMessage message = DynamicMessage.parseFrom(descriptor, ByteString.copyFrom(input));
- Map allFields = message.getAllFields();
-
- for (Map.Entry entry : allFields.entrySet()) {
- String name = entry.getKey().getName();
- if (theMap.containsKey(name)) {
- continue;
- // Perhaps throw an exception here?
- // throw new RuntimeException("dupicate key " + name + " in " + message);
- }
- Object value = entry.getValue();
- if (value instanceof Descriptors.EnumValueDescriptor) {
- Descriptors.EnumValueDescriptor desc = (Descriptors.EnumValueDescriptor) value;
- value = desc.getName();
- }
-
- theMap.put(name, value);
- }
-
+ message = DynamicMessage.parseFrom(descriptor, ByteString.copyFrom(input));
+ }
+ catch (InvalidProtocolBufferException e) {
+ throw new ParseException(e, "Invalid protobuf exception");
+ }
+ String json = null;
+ try {
+ json = JsonFormat.printer().print(message);
}
catch (InvalidProtocolBufferException e) {
- log.warn(e, "Problem with protobuf something");
+ e.printStackTrace();
}
- return theMap;
+ Map record = parser.parse(json);
+ return new MapBasedInputRow(
+ parseSpec.getTimestampSpec().extractTimestamp(record),
+ parseSpec.getDimensionsSpec().getDimensionNames(),
+ record
+ );
}
private Descriptor getDescriptor(String descriptorFileInClassPath)
@@ -121,7 +105,7 @@ private Descriptor getDescriptor(String descriptorFileInClassPath)
FileDescriptorSet set = FileDescriptorSet.parseFrom(fin);
FileDescriptor file = FileDescriptor.buildFrom(
set.getFile(0), new FileDescriptor[]
- {}
+ {}
);
return file.getMessageTypes().get(0);
}
diff --git a/processing/src/test/java/io/druid/data/input/ProtoBufInputRowParserTest.java b/processing/src/test/java/io/druid/data/input/ProtoBufInputRowParserTest.java
index f2bded3fc77f..12de185d687e 100644
--- a/processing/src/test/java/io/druid/data/input/ProtoBufInputRowParserTest.java
+++ b/processing/src/test/java/io/druid/data/input/ProtoBufInputRowParserTest.java
@@ -19,15 +19,21 @@
package io.druid.data.input;
+import com.google.common.collect.Lists;
+import io.druid.data.input.impl.DimensionSchema;
import io.druid.data.input.impl.DimensionsSpec;
-import io.druid.data.input.impl.TimeAndDimsParseSpec;
+import io.druid.data.input.impl.JSONParseSpec;
+import io.druid.data.input.impl.JSONPathFieldSpec;
+import io.druid.data.input.impl.JSONPathFieldType;
+import io.druid.data.input.impl.JSONPathSpec;
+import io.druid.data.input.impl.ParseSpec;
+import io.druid.data.input.impl.StringDimensionSchema;
import io.druid.data.input.impl.TimestampSpec;
import org.joda.time.DateTime;
import org.junit.Test;
import java.io.ByteArrayOutputStream;
import java.nio.ByteBuffer;
-import java.util.Arrays;
import java.util.List;
import static org.junit.Assert.assertEquals;
@@ -35,49 +41,52 @@
public class ProtoBufInputRowParserTest
{
- public static final String[] DIMENSIONS = new String[]{"eventType", "id", "someOtherId", "isValid"};
-
- /*
- eventType = 1;
-
- required uint64 id = 2;
- required string timestamp = 3;
- optional uint32 someOtherId = 4;
- optional bool isValid = 5;
- optional string description = 6;
-
- optional float someFloatColumn = 7;
- optional uint32 someIntColumn = 8;
- optional uint64 someLongColumn = 9;
- */
-
@Test
public void testParse() throws Exception
{
-
- //configure parser with desc file
- ProtoBufInputRowParser parser = new ProtoBufInputRowParser(
- new TimeAndDimsParseSpec(
- new TimestampSpec("timestamp", "iso", null),
- new DimensionsSpec(DimensionsSpec.getDefaultSchemas(Arrays.asList(DIMENSIONS)), Arrays.asList(), null)
- ),
- "prototest.desc"
+ ParseSpec parseSpec = new JSONParseSpec(
+ new TimestampSpec("timestamp", "iso", null),
+ new DimensionsSpec(Lists.newArrayList(
+ new StringDimensionSchema("event"),
+ new StringDimensionSchema("id"),
+ new StringDimensionSchema("someOtherId"),
+ new StringDimensionSchema("isValid")
+ ), null, null),
+ new JSONPathSpec(
+ true,
+ Lists.newArrayList(
+ new JSONPathFieldSpec(JSONPathFieldType.ROOT, "eventType", "eventType"),
+ new JSONPathFieldSpec(JSONPathFieldType.PATH, "foobar", "$.foo.bar"),
+ new JSONPathFieldSpec(JSONPathFieldType.PATH, "bar0", "$.bar[0].bar")
+ )
+ ), null
);
+ //configure parser with desc file
+ ProtoBufInputRowParser parser = new ProtoBufInputRowParser(parseSpec, "prototest.desc");
//create binary of proto test event
DateTime dateTime = new DateTime(2012, 07, 12, 9, 30);
ProtoTestEventWrapper.ProtoTestEvent event = ProtoTestEventWrapper.ProtoTestEvent.newBuilder()
- .setDescription("description")
- .setEventType(ProtoTestEventWrapper.ProtoTestEvent.EventCategory.CATEGORY_ONE)
- .setId(4711L)
- .setIsValid(true)
- .setSomeOtherId(4712)
- .setTimestamp(dateTime.toString())
- .setSomeFloatColumn(47.11F)
- .setSomeIntColumn(815)
- .setSomeLongColumn(816L)
- .build();
+ .setDescription("description")
+ .setEventType(ProtoTestEventWrapper.ProtoTestEvent.EventCategory.CATEGORY_ONE)
+ .setId(4711L)
+ .setIsValid(true)
+ .setSomeOtherId(4712)
+ .setTimestamp(dateTime.toString())
+ .setSomeFloatColumn(47.11F)
+ .setSomeIntColumn(815)
+ .setSomeLongColumn(816L)
+ .setFoo(ProtoTestEventWrapper.ProtoTestEvent.Foo
+ .newBuilder()
+ .setBar("baz"))
+ .addBar(ProtoTestEventWrapper.ProtoTestEvent.Foo
+ .newBuilder()
+ .setBar("bar0"))
+ .addBar(ProtoTestEventWrapper.ProtoTestEvent.Foo
+ .newBuilder()
+ .setBar("bar1"))
+ .build();
ByteArrayOutputStream out = new ByteArrayOutputStream();
event.writeTo(out);
@@ -85,20 +94,21 @@ public void testParse() throws Exception
InputRow row = parser.parse(ByteBuffer.wrap(out.toByteArray()));
System.out.println(row);
- assertEquals(Arrays.asList(DIMENSIONS), row.getDimensions());
assertEquals(dateTime.getMillis(), row.getTimestampFromEpoch());
assertDimensionEquals(row, "id", "4711");
assertDimensionEquals(row, "isValid", "true");
assertDimensionEquals(row, "someOtherId", "4712");
assertDimensionEquals(row, "description", "description");
+
assertDimensionEquals(row, "eventType", ProtoTestEventWrapper.ProtoTestEvent.EventCategory.CATEGORY_ONE.name());
+ assertDimensionEquals(row, "foobar", "baz");
+ assertDimensionEquals(row, "bar0", "bar0");
assertEquals(47.11F, row.getFloatMetric("someFloatColumn"), 0.0);
assertEquals(815.0F, row.getFloatMetric("someIntColumn"), 0.0);
assertEquals(816.0F, row.getFloatMetric("someLongColumn"), 0.0);
-
}
private void assertDimensionEquals(InputRow row, String dimension, Object expected)
diff --git a/processing/src/test/java/io/druid/data/input/ProtoTestEventWrapper.java b/processing/src/test/java/io/druid/data/input/ProtoTestEventWrapper.java
index d683f87e2486..720b917539d4 100644
--- a/processing/src/test/java/io/druid/data/input/ProtoTestEventWrapper.java
+++ b/processing/src/test/java/io/druid/data/input/ProtoTestEventWrapper.java
@@ -22,102 +22,349 @@
package io.druid.data.input;
-import com.google.protobuf.AbstractMessage;
-import com.google.protobuf.UnknownFieldSet;
-
public final class ProtoTestEventWrapper {
private ProtoTestEventWrapper() {}
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistryLite registry) {
+ }
+
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions(
+ (com.google.protobuf.ExtensionRegistryLite) registry);
}
- public interface ProtoTestEventOrBuilder
- extends com.google.protobuf.MessageOrBuilder {
-
- // required .prototest.ProtoTestEvent.EventCategory eventType = 1;
+ public interface ProtoTestEventOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:prototest.ProtoTestEvent)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * required .prototest.ProtoTestEvent.EventCategory eventType = 1;
+ */
boolean hasEventType();
- ProtoTestEventWrapper.ProtoTestEvent.EventCategory getEventType();
-
- // required uint64 id = 2;
+ /**
+ * required .prototest.ProtoTestEvent.EventCategory eventType = 1;
+ */
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.EventCategory getEventType();
+
+ /**
+ * required uint64 id = 2;
+ */
boolean hasId();
+ /**
+ * required uint64 id = 2;
+ */
long getId();
-
- // required string timestamp = 3;
+
+ /**
+ * required string timestamp = 3;
+ */
boolean hasTimestamp();
- String getTimestamp();
-
- // optional uint32 someOtherId = 4;
+ /**
+ * required string timestamp = 3;
+ */
+ java.lang.String getTimestamp();
+ /**
+ * required string timestamp = 3;
+ */
+ com.google.protobuf.ByteString
+ getTimestampBytes();
+
+ /**
+ * optional uint32 someOtherId = 4;
+ */
boolean hasSomeOtherId();
+ /**
+ * optional uint32 someOtherId = 4;
+ */
int getSomeOtherId();
-
- // optional bool isValid = 5;
+
+ /**
+ * optional bool isValid = 5;
+ */
boolean hasIsValid();
+ /**
+ * optional bool isValid = 5;
+ */
boolean getIsValid();
-
- // optional string description = 6;
+
+ /**
+ * optional string description = 6;
+ */
boolean hasDescription();
- String getDescription();
-
- // optional float someFloatColumn = 7;
+ /**
+ * optional string description = 6;
+ */
+ java.lang.String getDescription();
+ /**
+ * optional string description = 6;
+ */
+ com.google.protobuf.ByteString
+ getDescriptionBytes();
+
+ /**
+ * optional float someFloatColumn = 7;
+ */
boolean hasSomeFloatColumn();
+ /**
+ * optional float someFloatColumn = 7;
+ */
float getSomeFloatColumn();
-
- // optional uint32 someIntColumn = 8;
+
+ /**
+ * optional uint32 someIntColumn = 8;
+ */
boolean hasSomeIntColumn();
+ /**
+ * optional uint32 someIntColumn = 8;
+ */
int getSomeIntColumn();
-
- // optional uint64 someLongColumn = 9;
+
+ /**
+ * optional uint64 someLongColumn = 9;
+ */
boolean hasSomeLongColumn();
+ /**
+ * optional uint64 someLongColumn = 9;
+ */
long getSomeLongColumn();
+
+ /**
+ * optional .prototest.ProtoTestEvent.Foo foo = 10;
+ */
+ boolean hasFoo();
+ /**
+ * optional .prototest.ProtoTestEvent.Foo foo = 10;
+ */
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo getFoo();
+ /**
+ * optional .prototest.ProtoTestEvent.Foo foo = 10;
+ */
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder getFooOrBuilder();
+
+ /**
+ * repeated .prototest.ProtoTestEvent.Foo bar = 11;
+ */
+ java.util.List
+ getBarList();
+ /**
+ * repeated .prototest.ProtoTestEvent.Foo bar = 11;
+ */
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo getBar(int index);
+ /**
+ * repeated .prototest.ProtoTestEvent.Foo bar = 11;
+ */
+ int getBarCount();
+ /**
+ * repeated .prototest.ProtoTestEvent.Foo bar = 11;
+ */
+ java.util.List extends io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder>
+ getBarOrBuilderList();
+ /**
+ * repeated .prototest.ProtoTestEvent.Foo bar = 11;
+ */
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder getBarOrBuilder(
+ int index);
}
- public static final class ProtoTestEvent extends
- com.google.protobuf.GeneratedMessage
- implements ProtoTestEventOrBuilder {
+ /**
+ * Protobuf type {@code prototest.ProtoTestEvent}
+ */
+ public static final class ProtoTestEvent extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:prototest.ProtoTestEvent)
+ ProtoTestEventOrBuilder {
// Use ProtoTestEvent.newBuilder() to construct.
- private ProtoTestEvent(Builder builder) {
+ private ProtoTestEvent(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
- private ProtoTestEvent(boolean noInit) {}
-
- private static final ProtoTestEvent defaultInstance;
- public static ProtoTestEvent getDefaultInstance() {
- return defaultInstance;
- }
-
- public ProtoTestEvent getDefaultInstanceForType() {
- return defaultInstance;
+ private ProtoTestEvent() {
+ eventType_ = 0;
+ id_ = 0L;
+ timestamp_ = "";
+ someOtherId_ = 0;
+ isValid_ = false;
+ description_ = "";
+ someFloatColumn_ = 0F;
+ someIntColumn_ = 0;
+ someLongColumn_ = 0L;
+ bar_ = java.util.Collections.emptyList();
}
- @Override
- public UnknownFieldSet getUnknownFields()
- {
- return UnknownFieldSet.getDefaultInstance();
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private ProtoTestEvent(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 8: {
+ int rawValue = input.readEnum();
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.EventCategory value = io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.EventCategory.valueOf(rawValue);
+ if (value == null) {
+ unknownFields.mergeVarintField(1, rawValue);
+ } else {
+ bitField0_ |= 0x00000001;
+ eventType_ = rawValue;
+ }
+ break;
+ }
+ case 16: {
+ bitField0_ |= 0x00000002;
+ id_ = input.readUInt64();
+ break;
+ }
+ case 26: {
+ com.google.protobuf.ByteString bs = input.readBytes();
+ bitField0_ |= 0x00000004;
+ timestamp_ = bs;
+ break;
+ }
+ case 32: {
+ bitField0_ |= 0x00000008;
+ someOtherId_ = input.readUInt32();
+ break;
+ }
+ case 40: {
+ bitField0_ |= 0x00000010;
+ isValid_ = input.readBool();
+ break;
+ }
+ case 50: {
+ com.google.protobuf.ByteString bs = input.readBytes();
+ bitField0_ |= 0x00000020;
+ description_ = bs;
+ break;
+ }
+ case 61: {
+ bitField0_ |= 0x00000040;
+ someFloatColumn_ = input.readFloat();
+ break;
+ }
+ case 64: {
+ bitField0_ |= 0x00000080;
+ someIntColumn_ = input.readUInt32();
+ break;
+ }
+ case 72: {
+ bitField0_ |= 0x00000100;
+ someLongColumn_ = input.readUInt64();
+ break;
+ }
+ case 82: {
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder subBuilder = null;
+ if (((bitField0_ & 0x00000200) == 0x00000200)) {
+ subBuilder = foo_.toBuilder();
+ }
+ foo_ = input.readMessage(io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.PARSER, extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(foo_);
+ foo_ = subBuilder.buildPartial();
+ }
+ bitField0_ |= 0x00000200;
+ break;
+ }
+ case 90: {
+ if (!((mutable_bitField0_ & 0x00000400) == 0x00000400)) {
+ bar_ = new java.util.ArrayList();
+ mutable_bitField0_ |= 0x00000400;
+ }
+ bar_.add(
+ input.readMessage(io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.PARSER, extensionRegistry));
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ if (((mutable_bitField0_ & 0x00000400) == 0x00000400)) {
+ bar_ = java.util.Collections.unmodifiableList(bar_);
+ }
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
}
-
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return ProtoTestEventWrapper.internal_static_prototest_ProtoTestEvent_descriptor;
+ return io.druid.data.input.ProtoTestEventWrapper.internal_static_prototest_ProtoTestEvent_descriptor;
}
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return ProtoTestEventWrapper.internal_static_prototest_ProtoTestEvent_fieldAccessorTable;
+ return io.druid.data.input.ProtoTestEventWrapper.internal_static_prototest_ProtoTestEvent_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.class, io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Builder.class);
}
-
+
+ /**
+ * Protobuf enum {@code prototest.ProtoTestEvent.EventCategory}
+ */
public enum EventCategory
implements com.google.protobuf.ProtocolMessageEnum {
- CATEGORY_ZERO(0, 0),
- CATEGORY_ONE(1, 1),
- CATEGORY_TWO(2, 2),
+ /**
+ * CATEGORY_ZERO = 0;
+ */
+ CATEGORY_ZERO(0),
+ /**
+ * CATEGORY_ONE = 1;
+ */
+ CATEGORY_ONE(1),
+ /**
+ * CATEGORY_TWO = 2;
+ */
+ CATEGORY_TWO(2),
;
-
+
+ /**
+ * CATEGORY_ZERO = 0;
+ */
public static final int CATEGORY_ZERO_VALUE = 0;
+ /**
+ * CATEGORY_ONE = 1;
+ */
public static final int CATEGORY_ONE_VALUE = 1;
+ /**
+ * CATEGORY_TWO = 2;
+ */
public static final int CATEGORY_TWO_VALUE = 2;
-
-
- public final int getNumber() { return value; }
-
+
+
+ public final int getNumber() {
+ return value;
+ }
+
+ /**
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
public static EventCategory valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static EventCategory forNumber(int value) {
switch (value) {
case 0: return CATEGORY_ZERO;
case 1: return CATEGORY_ONE;
@@ -125,22 +372,22 @@ public static EventCategory valueOf(int value) {
default: return null;
}
}
-
+
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
- private static com.google.protobuf.Internal.EnumLiteMap
- internalValueMap =
+ private static final com.google.protobuf.Internal.EnumLiteMap<
+ EventCategory> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public EventCategory findValueByNumber(int number) {
- return EventCategory.valueOf(number);
+ return EventCategory.forNumber(number);
}
};
-
+
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
- return getDescriptor().getValues().get(index);
+ return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
@@ -148,13 +395,11 @@ public EventCategory findValueByNumber(int number) {
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
- return ProtoTestEventWrapper.ProtoTestEvent.getDescriptor().getEnumTypes().get(0);
+ return io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.getDescriptor().getEnumTypes().get(0);
}
-
- private static final EventCategory[] VALUES = {
- CATEGORY_ZERO, CATEGORY_ONE, CATEGORY_TWO,
- };
-
+
+ private static final EventCategory[] VALUES = values();
+
public static EventCategory valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
@@ -163,169 +408,820 @@ public static EventCategory valueOf(
}
return VALUES[desc.getIndex()];
}
-
- private final int index;
+
private final int value;
-
- private EventCategory(int index, int value) {
- this.index = index;
+
+ private EventCategory(int value) {
this.value = value;
}
-
+
// @@protoc_insertion_point(enum_scope:prototest.ProtoTestEvent.EventCategory)
}
-
+
+ public interface FooOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:prototest.ProtoTestEvent.Foo)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * required string bar = 1;
+ */
+ boolean hasBar();
+ /**
+ * required string bar = 1;
+ */
+ java.lang.String getBar();
+ /**
+ * required string bar = 1;
+ */
+ com.google.protobuf.ByteString
+ getBarBytes();
+ }
+ /**
+ * Protobuf type {@code prototest.ProtoTestEvent.Foo}
+ */
+ public static final class Foo extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:prototest.ProtoTestEvent.Foo)
+ FooOrBuilder {
+ // Use Foo.newBuilder() to construct.
+ private Foo(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private Foo() {
+ bar_ = "";
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return this.unknownFields;
+ }
+ private Foo(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ int mutable_bitField0_ = 0;
+ com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+ com.google.protobuf.UnknownFieldSet.newBuilder();
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!parseUnknownField(input, unknownFields,
+ extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ com.google.protobuf.ByteString bs = input.readBytes();
+ bitField0_ |= 0x00000001;
+ bar_ = bs;
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ this.unknownFields = unknownFields.build();
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return io.druid.data.input.ProtoTestEventWrapper.internal_static_prototest_ProtoTestEvent_Foo_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return io.druid.data.input.ProtoTestEventWrapper.internal_static_prototest_ProtoTestEvent_Foo_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.class, io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int BAR_FIELD_NUMBER = 1;
+ private volatile java.lang.Object bar_;
+ /**
+ * required string bar = 1;
+ */
+ public boolean hasBar() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * required string bar = 1;
+ */
+ public java.lang.String getBar() {
+ java.lang.Object ref = bar_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ bar_ = s;
+ }
+ return s;
+ }
+ }
+ /**
+ * required string bar = 1;
+ */
+ public com.google.protobuf.ByteString
+ getBarBytes() {
+ java.lang.Object ref = bar_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ bar_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ if (!hasBar()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, bar_);
+ }
+ unknownFields.writeTo(output);
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) == 0x00000001)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, bar_);
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo)) {
+ return super.equals(obj);
+ }
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo other = (io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo) obj;
+
+ boolean result = true;
+ result = result && (hasBar() == other.hasBar());
+ if (hasBar()) {
+ result = result && getBar()
+ .equals(other.getBar());
+ }
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptorForType().hashCode();
+ if (hasBar()) {
+ hash = (37 * hash) + BAR_FIELD_NUMBER;
+ hash = (53 * hash) + getBar().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code prototest.ProtoTestEvent.Foo}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:prototest.ProtoTestEvent.Foo)
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return io.druid.data.input.ProtoTestEventWrapper.internal_static_prototest_ProtoTestEvent_Foo_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return io.druid.data.input.ProtoTestEventWrapper.internal_static_prototest_ProtoTestEvent_Foo_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.class, io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder.class);
+ }
+
+ // Construct using io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.newBuilder()
+ private Builder() {
+ maybeForceBuilderInitialization();
+ }
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ maybeForceBuilderInitialization();
+ }
+ private void maybeForceBuilderInitialization() {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ }
+ }
+ public Builder clear() {
+ super.clear();
+ bar_ = "";
+ bitField0_ = (bitField0_ & ~0x00000001);
+ return this;
+ }
+
+ public com.google.protobuf.Descriptors.Descriptor
+ getDescriptorForType() {
+ return io.druid.data.input.ProtoTestEventWrapper.internal_static_prototest_ProtoTestEvent_Foo_descriptor;
+ }
+
+ public io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo getDefaultInstanceForType() {
+ return io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.getDefaultInstance();
+ }
+
+ public io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo build() {
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo buildPartial() {
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo result = new io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo(this);
+ int from_bitField0_ = bitField0_;
+ int to_bitField0_ = 0;
+ if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+ to_bitField0_ |= 0x00000001;
+ }
+ result.bar_ = bar_;
+ result.bitField0_ = to_bitField0_;
+ onBuilt();
+ return result;
+ }
+
+ public Builder clone() {
+ return (Builder) super.clone();
+ }
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.setField(field, value);
+ }
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return (Builder) super.clearField(field);
+ }
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return (Builder) super.clearOneof(oneof);
+ }
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, Object value) {
+ return (Builder) super.setRepeatedField(field, index, value);
+ }
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.addRepeatedField(field, value);
+ }
+ public Builder mergeFrom(com.google.protobuf.Message other) {
+ if (other instanceof io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo) {
+ return mergeFrom((io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo other) {
+ if (other == io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.getDefaultInstance()) return this;
+ if (other.hasBar()) {
+ bitField0_ |= 0x00000001;
+ bar_ = other.bar_;
+ onChanged();
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
+ return this;
+ }
+
+ public final boolean isInitialized() {
+ if (!hasBar()) {
+ return false;
+ }
+ return true;
+ }
+
+ public Builder mergeFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
+ }
+ }
+ return this;
+ }
+ private int bitField0_;
+
+ private java.lang.Object bar_ = "";
+ /**
+ * required string bar = 1;
+ */
+ public boolean hasBar() {
+ return ((bitField0_ & 0x00000001) == 0x00000001);
+ }
+ /**
+ * required string bar = 1;
+ */
+ public java.lang.String getBar() {
+ java.lang.Object ref = bar_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ bar_ = s;
+ }
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * required string bar = 1;
+ */
+ public com.google.protobuf.ByteString
+ getBarBytes() {
+ java.lang.Object ref = bar_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ bar_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * required string bar = 1;
+ */
+ public Builder setBar(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ bar_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ * required string bar = 1;
+ */
+ public Builder clearBar() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ bar_ = getDefaultInstance().getBar();
+ onChanged();
+ return this;
+ }
+ /**
+ * required string bar = 1;
+ */
+ public Builder setBarBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ bar_ = value;
+ onChanged();
+ return this;
+ }
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:prototest.ProtoTestEvent.Foo)
+ }
+
+ // @@protoc_insertion_point(class_scope:prototest.ProtoTestEvent.Foo)
+ private static final io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo();
+ }
+
+ public static io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ @java.lang.Deprecated public static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ public Foo parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new Foo(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ public io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+ }
+
private int bitField0_;
- // required .prototest.ProtoTestEvent.EventCategory eventType = 1;
public static final int EVENTTYPE_FIELD_NUMBER = 1;
- private ProtoTestEventWrapper.ProtoTestEvent.EventCategory eventType_;
+ private int eventType_;
+ /**
+ * required .prototest.ProtoTestEvent.EventCategory eventType = 1;
+ */
public boolean hasEventType() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
- public ProtoTestEventWrapper.ProtoTestEvent.EventCategory getEventType() {
- return eventType_;
+ /**
+ * required .prototest.ProtoTestEvent.EventCategory eventType = 1;
+ */
+ public io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.EventCategory getEventType() {
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.EventCategory result = io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.EventCategory.valueOf(eventType_);
+ return result == null ? io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.EventCategory.CATEGORY_ZERO : result;
}
-
- // required uint64 id = 2;
+
public static final int ID_FIELD_NUMBER = 2;
private long id_;
+ /**
+ * required uint64 id = 2;
+ */
public boolean hasId() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
+ /**
+ * required uint64 id = 2;
+ */
public long getId() {
return id_;
}
-
- // required string timestamp = 3;
+
public static final int TIMESTAMP_FIELD_NUMBER = 3;
- private java.lang.Object timestamp_;
+ private volatile java.lang.Object timestamp_;
+ /**
+ * required string timestamp = 3;
+ */
public boolean hasTimestamp() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
- public String getTimestamp() {
+ /**
+ * required string timestamp = 3;
+ */
+ public java.lang.String getTimestamp() {
java.lang.Object ref = timestamp_;
- if (ref instanceof String) {
- return (String) ref;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (com.google.protobuf.Internal.isValidUtf8(bs)) {
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
timestamp_ = s;
}
return s;
}
}
- private com.google.protobuf.ByteString getTimestampBytes() {
+ /**
+ * required string timestamp = 3;
+ */
+ public com.google.protobuf.ByteString
+ getTimestampBytes() {
java.lang.Object ref = timestamp_;
- if (ref instanceof String) {
+ if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((String) ref);
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
timestamp_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
-
- // optional uint32 someOtherId = 4;
+
public static final int SOMEOTHERID_FIELD_NUMBER = 4;
private int someOtherId_;
+ /**
+ * optional uint32 someOtherId = 4;
+ */
public boolean hasSomeOtherId() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
+ /**
+ * optional uint32 someOtherId = 4;
+ */
public int getSomeOtherId() {
return someOtherId_;
}
-
- // optional bool isValid = 5;
+
public static final int ISVALID_FIELD_NUMBER = 5;
private boolean isValid_;
+ /**
+ * optional bool isValid = 5;
+ */
public boolean hasIsValid() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
+ /**
+ * optional bool isValid = 5;
+ */
public boolean getIsValid() {
return isValid_;
}
-
- // optional string description = 6;
+
public static final int DESCRIPTION_FIELD_NUMBER = 6;
- private java.lang.Object description_;
+ private volatile java.lang.Object description_;
+ /**
+ * optional string description = 6;
+ */
public boolean hasDescription() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
- public String getDescription() {
+ /**
+ * optional string description = 6;
+ */
+ public java.lang.String getDescription() {
java.lang.Object ref = description_;
- if (ref instanceof String) {
- return (String) ref;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (com.google.protobuf.Internal.isValidUtf8(bs)) {
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
description_ = s;
}
return s;
}
}
- private com.google.protobuf.ByteString getDescriptionBytes() {
+ /**
+ * optional string description = 6;
+ */
+ public com.google.protobuf.ByteString
+ getDescriptionBytes() {
java.lang.Object ref = description_;
- if (ref instanceof String) {
+ if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((String) ref);
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
-
- // optional float someFloatColumn = 7;
+
public static final int SOMEFLOATCOLUMN_FIELD_NUMBER = 7;
private float someFloatColumn_;
+ /**
+ * optional float someFloatColumn = 7;
+ */
public boolean hasSomeFloatColumn() {
return ((bitField0_ & 0x00000040) == 0x00000040);
}
+ /**
+ * optional float someFloatColumn = 7;
+ */
public float getSomeFloatColumn() {
return someFloatColumn_;
}
-
- // optional uint32 someIntColumn = 8;
+
public static final int SOMEINTCOLUMN_FIELD_NUMBER = 8;
private int someIntColumn_;
+ /**
+ * optional uint32 someIntColumn = 8;
+ */
public boolean hasSomeIntColumn() {
return ((bitField0_ & 0x00000080) == 0x00000080);
}
+ /**
+ * optional uint32 someIntColumn = 8;
+ */
public int getSomeIntColumn() {
return someIntColumn_;
}
-
- // optional uint64 someLongColumn = 9;
+
public static final int SOMELONGCOLUMN_FIELD_NUMBER = 9;
private long someLongColumn_;
+ /**
+ * optional uint64 someLongColumn = 9;
+ */
public boolean hasSomeLongColumn() {
return ((bitField0_ & 0x00000100) == 0x00000100);
}
+ /**
+ * optional uint64 someLongColumn = 9;
+ */
public long getSomeLongColumn() {
return someLongColumn_;
}
-
- private void initFields() {
- eventType_ = ProtoTestEventWrapper.ProtoTestEvent.EventCategory.CATEGORY_ZERO;
- id_ = 0L;
- timestamp_ = "";
- someOtherId_ = 0;
- isValid_ = false;
- description_ = "";
- someFloatColumn_ = 0F;
- someIntColumn_ = 0;
- someLongColumn_ = 0L;
+
+ public static final int FOO_FIELD_NUMBER = 10;
+ private io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo foo_;
+ /**
+ * optional .prototest.ProtoTestEvent.Foo foo = 10;
+ */
+ public boolean hasFoo() {
+ return ((bitField0_ & 0x00000200) == 0x00000200);
}
+ /**
+ * optional .prototest.ProtoTestEvent.Foo foo = 10;
+ */
+ public io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo getFoo() {
+ return foo_ == null ? io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.getDefaultInstance() : foo_;
+ }
+ /**
+ * optional .prototest.ProtoTestEvent.Foo foo = 10;
+ */
+ public io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder getFooOrBuilder() {
+ return foo_ == null ? io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.getDefaultInstance() : foo_;
+ }
+
+ public static final int BAR_FIELD_NUMBER = 11;
+ private java.util.List bar_;
+ /**
+ * repeated .prototest.ProtoTestEvent.Foo bar = 11;
+ */
+ public java.util.List getBarList() {
+ return bar_;
+ }
+ /**
+ * repeated .prototest.ProtoTestEvent.Foo bar = 11;
+ */
+ public java.util.List extends io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder>
+ getBarOrBuilderList() {
+ return bar_;
+ }
+ /**
+ * repeated .prototest.ProtoTestEvent.Foo bar = 11;
+ */
+ public int getBarCount() {
+ return bar_.size();
+ }
+ /**
+ * repeated .prototest.ProtoTestEvent.Foo bar = 11;
+ */
+ public io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo getBar(int index) {
+ return bar_.get(index);
+ }
+ /**
+ * repeated .prototest.ProtoTestEvent.Foo bar = 11;
+ */
+ public io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder getBarOrBuilder(
+ int index) {
+ return bar_.get(index);
+ }
+
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
- if (isInitialized != -1) return isInitialized == 1;
-
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
if (!hasEventType()) {
memoizedIsInitialized = 0;
return false;
@@ -338,21 +1234,32 @@ public final boolean isInitialized() {
memoizedIsInitialized = 0;
return false;
}
+ if (hasFoo()) {
+ if (!getFoo().isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
+ for (int i = 0; i < getBarCount(); i++) {
+ if (!getBar(i).isInitialized()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
+ }
memoizedIsInitialized = 1;
return true;
}
-
+
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (((bitField0_ & 0x00000001) == 0x00000001)) {
- output.writeEnum(1, eventType_.getNumber());
+ output.writeEnum(1, eventType_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeUInt64(2, id_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
- output.writeBytes(3, getTimestampBytes());
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, timestamp_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeUInt32(4, someOtherId_);
@@ -361,7 +1268,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
output.writeBool(5, isValid_);
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
- output.writeBytes(6, getDescriptionBytes());
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_);
}
if (((bitField0_ & 0x00000040) == 0x00000040)) {
output.writeFloat(7, someFloatColumn_);
@@ -372,26 +1279,30 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
if (((bitField0_ & 0x00000100) == 0x00000100)) {
output.writeUInt64(9, someLongColumn_);
}
- getUnknownFields().writeTo(output);
+ if (((bitField0_ & 0x00000200) == 0x00000200)) {
+ output.writeMessage(10, getFoo());
+ }
+ for (int i = 0; i < bar_.size(); i++) {
+ output.writeMessage(11, bar_.get(i));
+ }
+ unknownFields.writeTo(output);
}
-
- private int memoizedSerializedSize = -1;
+
public int getSerializedSize() {
- int size = memoizedSerializedSize;
+ int size = memoizedSize;
if (size != -1) return size;
-
+
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
- .computeEnumSize(1, eventType_.getNumber());
+ .computeEnumSize(1, eventType_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(2, id_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(3, getTimestampBytes());
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, timestamp_);
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
@@ -402,8 +1313,7 @@ public int getSerializedSize() {
.computeBoolSize(5, isValid_);
}
if (((bitField0_ & 0x00000020) == 0x00000020)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(6, getDescriptionBytes());
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_);
}
if (((bitField0_ & 0x00000040) == 0x00000040)) {
size += com.google.protobuf.CodedOutputStream
@@ -417,131 +1327,264 @@ public int getSerializedSize() {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(9, someLongColumn_);
}
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
+ if (((bitField0_ & 0x00000200) == 0x00000200)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(10, getFoo());
+ }
+ for (int i = 0; i < bar_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(11, bar_.get(i));
+ }
+ size += unknownFields.getSerializedSize();
+ memoizedSize = size;
return size;
}
-
+
private static final long serialVersionUID = 0L;
@java.lang.Override
- protected java.lang.Object writeReplace()
- throws java.io.ObjectStreamException {
- return super.writeReplace();
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent)) {
+ return super.equals(obj);
+ }
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent other = (io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent) obj;
+
+ boolean result = true;
+ result = result && (hasEventType() == other.hasEventType());
+ if (hasEventType()) {
+ result = result && eventType_ == other.eventType_;
+ }
+ result = result && (hasId() == other.hasId());
+ if (hasId()) {
+ result = result && (getId()
+ == other.getId());
+ }
+ result = result && (hasTimestamp() == other.hasTimestamp());
+ if (hasTimestamp()) {
+ result = result && getTimestamp()
+ .equals(other.getTimestamp());
+ }
+ result = result && (hasSomeOtherId() == other.hasSomeOtherId());
+ if (hasSomeOtherId()) {
+ result = result && (getSomeOtherId()
+ == other.getSomeOtherId());
+ }
+ result = result && (hasIsValid() == other.hasIsValid());
+ if (hasIsValid()) {
+ result = result && (getIsValid()
+ == other.getIsValid());
+ }
+ result = result && (hasDescription() == other.hasDescription());
+ if (hasDescription()) {
+ result = result && getDescription()
+ .equals(other.getDescription());
+ }
+ result = result && (hasSomeFloatColumn() == other.hasSomeFloatColumn());
+ if (hasSomeFloatColumn()) {
+ result = result && (
+ java.lang.Float.floatToIntBits(getSomeFloatColumn())
+ == java.lang.Float.floatToIntBits(
+ other.getSomeFloatColumn()));
+ }
+ result = result && (hasSomeIntColumn() == other.hasSomeIntColumn());
+ if (hasSomeIntColumn()) {
+ result = result && (getSomeIntColumn()
+ == other.getSomeIntColumn());
+ }
+ result = result && (hasSomeLongColumn() == other.hasSomeLongColumn());
+ if (hasSomeLongColumn()) {
+ result = result && (getSomeLongColumn()
+ == other.getSomeLongColumn());
+ }
+ result = result && (hasFoo() == other.hasFoo());
+ if (hasFoo()) {
+ result = result && getFoo()
+ .equals(other.getFoo());
+ }
+ result = result && getBarList()
+ .equals(other.getBarList());
+ result = result && unknownFields.equals(other.unknownFields);
+ return result;
}
-
- public static ProtoTestEventWrapper.ProtoTestEvent parseFrom(
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptorForType().hashCode();
+ if (hasEventType()) {
+ hash = (37 * hash) + EVENTTYPE_FIELD_NUMBER;
+ hash = (53 * hash) + eventType_;
+ }
+ if (hasId()) {
+ hash = (37 * hash) + ID_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getId());
+ }
+ if (hasTimestamp()) {
+ hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
+ hash = (53 * hash) + getTimestamp().hashCode();
+ }
+ if (hasSomeOtherId()) {
+ hash = (37 * hash) + SOMEOTHERID_FIELD_NUMBER;
+ hash = (53 * hash) + getSomeOtherId();
+ }
+ if (hasIsValid()) {
+ hash = (37 * hash) + ISVALID_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
+ getIsValid());
+ }
+ if (hasDescription()) {
+ hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
+ hash = (53 * hash) + getDescription().hashCode();
+ }
+ if (hasSomeFloatColumn()) {
+ hash = (37 * hash) + SOMEFLOATCOLUMN_FIELD_NUMBER;
+ hash = (53 * hash) + java.lang.Float.floatToIntBits(
+ getSomeFloatColumn());
+ }
+ if (hasSomeIntColumn()) {
+ hash = (37 * hash) + SOMEINTCOLUMN_FIELD_NUMBER;
+ hash = (53 * hash) + getSomeIntColumn();
+ }
+ if (hasSomeLongColumn()) {
+ hash = (37 * hash) + SOMELONGCOLUMN_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getSomeLongColumn());
+ }
+ if (hasFoo()) {
+ hash = (37 * hash) + FOO_FIELD_NUMBER;
+ hash = (53 * hash) + getFoo().hashCode();
+ }
+ if (getBarCount() > 0) {
+ hash = (37 * hash) + BAR_FIELD_NUMBER;
+ hash = (53 * hash) + getBarList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
+ return PARSER.parseFrom(data);
}
- public static ProtoTestEventWrapper.ProtoTestEvent parseFrom(
+ public static io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
+ return PARSER.parseFrom(data, extensionRegistry);
}
- public static ProtoTestEventWrapper.ProtoTestEvent parseFrom(byte[] data)
+ public static io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
+ return PARSER.parseFrom(data);
}
- public static ProtoTestEventWrapper.ProtoTestEvent parseFrom(
+ public static io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
+ return PARSER.parseFrom(data, extensionRegistry);
}
- public static ProtoTestEventWrapper.ProtoTestEvent parseFrom(java.io.InputStream input)
+ public static io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent parseFrom(java.io.InputStream input)
throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
}
- public static ProtoTestEventWrapper.ProtoTestEvent parseFrom(
+ public static io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
}
- public static ProtoTestEventWrapper.ProtoTestEvent parseDelimitedFrom(java.io.InputStream input)
+ public static io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
}
- public static ProtoTestEventWrapper.ProtoTestEvent parseDelimitedFrom(
+ public static io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
- return builder.buildParsed();
- } else {
- return null;
- }
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
- public static ProtoTestEventWrapper.ProtoTestEvent parseFrom(
+ public static io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
}
- public static ProtoTestEventWrapper.ProtoTestEvent parseFrom(
+ public static io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
-
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(ProtoTestEventWrapper.ProtoTestEvent prototype) {
- return newBuilder().mergeFrom(prototype);
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
}
- public Builder toBuilder() { return newBuilder(this); }
-
+
@java.lang.Override
protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
+ /**
+ * Protobuf type {@code prototest.ProtoTestEvent}
+ */
public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder
- implements ProtoTestEventWrapper.ProtoTestEventOrBuilder {
+ com.google.protobuf.GeneratedMessageV3.Builder implements
+ // @@protoc_insertion_point(builder_implements:prototest.ProtoTestEvent)
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEventOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
- return ProtoTestEventWrapper.internal_static_prototest_ProtoTestEvent_descriptor;
+ return io.druid.data.input.ProtoTestEventWrapper.internal_static_prototest_ProtoTestEvent_descriptor;
}
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
- return ProtoTestEventWrapper.internal_static_prototest_ProtoTestEvent_fieldAccessorTable;
+ return io.druid.data.input.ProtoTestEventWrapper.internal_static_prototest_ProtoTestEvent_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.class, io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Builder.class);
}
-
+
// Construct using io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
-
- private Builder(BuilderParent parent) {
+
+ private Builder(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+ if (com.google.protobuf.GeneratedMessageV3
+ .alwaysUseFieldBuilders) {
+ getFooFieldBuilder();
+ getBarFieldBuilder();
}
}
- private static Builder create() {
- return new Builder();
- }
-
public Builder clear() {
super.clear();
- eventType_ = ProtoTestEventWrapper.ProtoTestEvent.EventCategory.CATEGORY_ZERO;
+ eventType_ = 0;
bitField0_ = (bitField0_ & ~0x00000001);
id_ = 0L;
bitField0_ = (bitField0_ & ~0x00000002);
@@ -559,43 +1602,40 @@ public Builder clear() {
bitField0_ = (bitField0_ & ~0x00000080);
someLongColumn_ = 0L;
bitField0_ = (bitField0_ & ~0x00000100);
+ if (fooBuilder_ == null) {
+ foo_ = null;
+ } else {
+ fooBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000200);
+ if (barBuilder_ == null) {
+ bar_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000400);
+ } else {
+ barBuilder_.clear();
+ }
return this;
}
-
- public Builder clone() {
- return create().mergeFrom(buildPartial());
- }
-
+
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
- return ProtoTestEventWrapper.ProtoTestEvent.getDescriptor();
- }
-
- public ProtoTestEventWrapper.ProtoTestEvent getDefaultInstanceForType() {
- return ProtoTestEventWrapper.ProtoTestEvent.getDefaultInstance();
+ return io.druid.data.input.ProtoTestEventWrapper.internal_static_prototest_ProtoTestEvent_descriptor;
}
-
- public ProtoTestEventWrapper.ProtoTestEvent build() {
- ProtoTestEventWrapper.ProtoTestEvent result = buildPartial();
- if (!result.isInitialized()) {
- throw AbstractMessage.Builder.newUninitializedMessageException(result);
- }
- return result;
+
+ public io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent getDefaultInstanceForType() {
+ return io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.getDefaultInstance();
}
-
- private ProtoTestEventWrapper.ProtoTestEvent buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- ProtoTestEventWrapper.ProtoTestEvent result = buildPartial();
+
+ public io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent build() {
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent result = buildPartial();
if (!result.isInitialized()) {
- throw AbstractMessage.Builder.newUninitializedMessageException(
- result
- ).asInvalidProtocolBufferException();
+ throw newUninitializedMessageException(result);
}
return result;
}
-
- public ProtoTestEventWrapper.ProtoTestEvent buildPartial() {
- ProtoTestEventWrapper.ProtoTestEvent result = new ProtoTestEventWrapper.ProtoTestEvent(this);
+
+ public io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent buildPartial() {
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent result = new io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
@@ -634,22 +1674,65 @@ public ProtoTestEventWrapper.ProtoTestEvent buildPartial() {
to_bitField0_ |= 0x00000100;
}
result.someLongColumn_ = someLongColumn_;
+ if (((from_bitField0_ & 0x00000200) == 0x00000200)) {
+ to_bitField0_ |= 0x00000200;
+ }
+ if (fooBuilder_ == null) {
+ result.foo_ = foo_;
+ } else {
+ result.foo_ = fooBuilder_.build();
+ }
+ if (barBuilder_ == null) {
+ if (((bitField0_ & 0x00000400) == 0x00000400)) {
+ bar_ = java.util.Collections.unmodifiableList(bar_);
+ bitField0_ = (bitField0_ & ~0x00000400);
+ }
+ result.bar_ = bar_;
+ } else {
+ result.bar_ = barBuilder_.build();
+ }
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
-
+
+ public Builder clone() {
+ return (Builder) super.clone();
+ }
+ public Builder setField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.setField(field, value);
+ }
+ public Builder clearField(
+ com.google.protobuf.Descriptors.FieldDescriptor field) {
+ return (Builder) super.clearField(field);
+ }
+ public Builder clearOneof(
+ com.google.protobuf.Descriptors.OneofDescriptor oneof) {
+ return (Builder) super.clearOneof(oneof);
+ }
+ public Builder setRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ int index, Object value) {
+ return (Builder) super.setRepeatedField(field, index, value);
+ }
+ public Builder addRepeatedField(
+ com.google.protobuf.Descriptors.FieldDescriptor field,
+ Object value) {
+ return (Builder) super.addRepeatedField(field, value);
+ }
public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof ProtoTestEventWrapper.ProtoTestEvent) {
- return mergeFrom((ProtoTestEventWrapper.ProtoTestEvent)other);
+ if (other instanceof io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent) {
+ return mergeFrom((io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent)other);
} else {
super.mergeFrom(other);
return this;
}
}
-
- public Builder mergeFrom(ProtoTestEventWrapper.ProtoTestEvent other) {
- if (other == ProtoTestEventWrapper.ProtoTestEvent.getDefaultInstance()) return this;
+
+ public Builder mergeFrom(io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent other) {
+ if (other == io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.getDefaultInstance()) return this;
if (other.hasEventType()) {
setEventType(other.getEventType());
}
@@ -657,7 +1740,9 @@ public Builder mergeFrom(ProtoTestEventWrapper.ProtoTestEvent other) {
setId(other.getId());
}
if (other.hasTimestamp()) {
- setTimestamp(other.getTimestamp());
+ bitField0_ |= 0x00000004;
+ timestamp_ = other.timestamp_;
+ onChanged();
}
if (other.hasSomeOtherId()) {
setSomeOtherId(other.getSomeOtherId());
@@ -666,7 +1751,9 @@ public Builder mergeFrom(ProtoTestEventWrapper.ProtoTestEvent other) {
setIsValid(other.getIsValid());
}
if (other.hasDescription()) {
- setDescription(other.getDescription());
+ bitField0_ |= 0x00000020;
+ description_ = other.description_;
+ onChanged();
}
if (other.hasSomeFloatColumn()) {
setSomeFloatColumn(other.getSomeFloatColumn());
@@ -677,167 +1764,195 @@ public Builder mergeFrom(ProtoTestEventWrapper.ProtoTestEvent other) {
if (other.hasSomeLongColumn()) {
setSomeLongColumn(other.getSomeLongColumn());
}
- this.mergeUnknownFields(other.getUnknownFields());
+ if (other.hasFoo()) {
+ mergeFoo(other.getFoo());
+ }
+ if (barBuilder_ == null) {
+ if (!other.bar_.isEmpty()) {
+ if (bar_.isEmpty()) {
+ bar_ = other.bar_;
+ bitField0_ = (bitField0_ & ~0x00000400);
+ } else {
+ ensureBarIsMutable();
+ bar_.addAll(other.bar_);
+ }
+ onChanged();
+ }
+ } else {
+ if (!other.bar_.isEmpty()) {
+ if (barBuilder_.isEmpty()) {
+ barBuilder_.dispose();
+ barBuilder_ = null;
+ bar_ = other.bar_;
+ bitField0_ = (bitField0_ & ~0x00000400);
+ barBuilder_ =
+ com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
+ getBarFieldBuilder() : null;
+ } else {
+ barBuilder_.addAllMessages(other.bar_);
+ }
+ }
+ }
+ this.mergeUnknownFields(other.unknownFields);
+ onChanged();
return this;
}
-
+
public final boolean isInitialized() {
if (!hasEventType()) {
-
return false;
}
if (!hasId()) {
-
return false;
}
if (!hasTimestamp()) {
-
return false;
}
+ if (hasFoo()) {
+ if (!getFoo().isInitialized()) {
+ return false;
+ }
+ }
+ for (int i = 0; i < getBarCount(); i++) {
+ if (!getBar(i).isInitialized()) {
+ return false;
+ }
+ }
return true;
}
-
+
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder(
- this.getUnknownFields());
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- this.setUnknownFields(unknownFields.build());
- onChanged();
- return this;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- this.setUnknownFields(unknownFields.build());
- onChanged();
- return this;
- }
- break;
- }
- case 8: {
- int rawValue = input.readEnum();
- ProtoTestEventWrapper.ProtoTestEvent.EventCategory value = ProtoTestEventWrapper.ProtoTestEvent.EventCategory.valueOf(rawValue);
- if (value == null) {
- unknownFields.mergeVarintField(1, rawValue);
- } else {
- bitField0_ |= 0x00000001;
- eventType_ = value;
- }
- break;
- }
- case 16: {
- bitField0_ |= 0x00000002;
- id_ = input.readUInt64();
- break;
- }
- case 26: {
- bitField0_ |= 0x00000004;
- timestamp_ = input.readBytes();
- break;
- }
- case 32: {
- bitField0_ |= 0x00000008;
- someOtherId_ = input.readUInt32();
- break;
- }
- case 40: {
- bitField0_ |= 0x00000010;
- isValid_ = input.readBool();
- break;
- }
- case 50: {
- bitField0_ |= 0x00000020;
- description_ = input.readBytes();
- break;
- }
- case 61: {
- bitField0_ |= 0x00000040;
- someFloatColumn_ = input.readFloat();
- break;
- }
- case 64: {
- bitField0_ |= 0x00000080;
- someIntColumn_ = input.readUInt32();
- break;
- }
- case 72: {
- bitField0_ |= 0x00000100;
- someLongColumn_ = input.readUInt64();
- break;
- }
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent) e.getUnfinishedMessage();
+ throw e.unwrapIOException();
+ } finally {
+ if (parsedMessage != null) {
+ mergeFrom(parsedMessage);
}
}
+ return this;
}
-
private int bitField0_;
-
- // required .prototest.ProtoTestEvent.EventCategory eventType = 1;
- private ProtoTestEventWrapper.ProtoTestEvent.EventCategory eventType_ = ProtoTestEventWrapper.ProtoTestEvent.EventCategory.CATEGORY_ZERO;
+
+ private int eventType_ = 0;
+ /**
+ * required .prototest.ProtoTestEvent.EventCategory eventType = 1;
+ */
public boolean hasEventType() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
- public ProtoTestEventWrapper.ProtoTestEvent.EventCategory getEventType() {
- return eventType_;
- }
- public Builder setEventType(ProtoTestEventWrapper.ProtoTestEvent.EventCategory value) {
+ /**
+ * required .prototest.ProtoTestEvent.EventCategory eventType = 1;
+ */
+ public io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.EventCategory getEventType() {
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.EventCategory result = io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.EventCategory.valueOf(eventType_);
+ return result == null ? io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.EventCategory.CATEGORY_ZERO : result;
+ }
+ /**
+ * required .prototest.ProtoTestEvent.EventCategory eventType = 1;
+ */
+ public Builder setEventType(io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.EventCategory value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
- eventType_ = value;
+ eventType_ = value.getNumber();
onChanged();
return this;
}
+ /**
+ * required .prototest.ProtoTestEvent.EventCategory eventType = 1;
+ */
public Builder clearEventType() {
bitField0_ = (bitField0_ & ~0x00000001);
- eventType_ = ProtoTestEventWrapper.ProtoTestEvent.EventCategory.CATEGORY_ZERO;
+ eventType_ = 0;
onChanged();
return this;
}
-
- // required uint64 id = 2;
+
private long id_ ;
+ /**
+ * required uint64 id = 2;
+ */
public boolean hasId() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
+ /**
+ * required uint64 id = 2;
+ */
public long getId() {
return id_;
}
+ /**
+ * required uint64 id = 2;
+ */
public Builder setId(long value) {
bitField0_ |= 0x00000002;
id_ = value;
onChanged();
return this;
}
+ /**
+ * required uint64 id = 2;
+ */
public Builder clearId() {
bitField0_ = (bitField0_ & ~0x00000002);
id_ = 0L;
onChanged();
return this;
}
-
- // required string timestamp = 3;
+
private java.lang.Object timestamp_ = "";
+ /**
+ * required string timestamp = 3;
+ */
public boolean hasTimestamp() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
- public String getTimestamp() {
+ /**
+ * required string timestamp = 3;
+ */
+ public java.lang.String getTimestamp() {
java.lang.Object ref = timestamp_;
- if (!(ref instanceof String)) {
- String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
- timestamp_ = s;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ timestamp_ = s;
+ }
return s;
} else {
- return (String) ref;
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ * required string timestamp = 3;
+ */
+ public com.google.protobuf.ByteString
+ getTimestampBytes() {
+ java.lang.Object ref = timestamp_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ timestamp_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
}
}
- public Builder setTimestamp(String value) {
+ /**
+ * required string timestamp = 3;
+ */
+ public Builder setTimestamp(
+ java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
@@ -846,76 +1961,138 @@ public Builder setTimestamp(String value) {
onChanged();
return this;
}
+ /**
+ * required string timestamp = 3;
+ */
public Builder clearTimestamp() {
bitField0_ = (bitField0_ & ~0x00000004);
timestamp_ = getDefaultInstance().getTimestamp();
onChanged();
return this;
}
- void setTimestamp(com.google.protobuf.ByteString value) {
- bitField0_ |= 0x00000004;
+ /**
+ * required string timestamp = 3;
+ */
+ public Builder setTimestampBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000004;
timestamp_ = value;
onChanged();
+ return this;
}
-
- // optional uint32 someOtherId = 4;
+
private int someOtherId_ ;
+ /**
+ * optional uint32 someOtherId = 4;
+ */
public boolean hasSomeOtherId() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
+ /**
+ * optional uint32 someOtherId = 4;
+ */
public int getSomeOtherId() {
return someOtherId_;
}
+ /**
+ * optional uint32 someOtherId = 4;
+ */
public Builder setSomeOtherId(int value) {
bitField0_ |= 0x00000008;
someOtherId_ = value;
onChanged();
return this;
}
+ /**
+ * optional uint32 someOtherId = 4;
+ */
public Builder clearSomeOtherId() {
bitField0_ = (bitField0_ & ~0x00000008);
someOtherId_ = 0;
onChanged();
return this;
}
-
- // optional bool isValid = 5;
+
private boolean isValid_ ;
+ /**
+ * optional bool isValid = 5;
+ */
public boolean hasIsValid() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
+ /**
+ * optional bool isValid = 5;
+ */
public boolean getIsValid() {
return isValid_;
}
+ /**
+ * optional bool isValid = 5;
+ */
public Builder setIsValid(boolean value) {
bitField0_ |= 0x00000010;
isValid_ = value;
onChanged();
return this;
}
+ /**
+ * optional bool isValid = 5;
+ */
public Builder clearIsValid() {
bitField0_ = (bitField0_ & ~0x00000010);
isValid_ = false;
onChanged();
return this;
}
-
- // optional string description = 6;
+
private java.lang.Object description_ = "";
+ /**
+ * optional string description = 6;
+ */
public boolean hasDescription() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
- public String getDescription() {
+ /**
+ * optional string description = 6;
+ */
+ public java.lang.String getDescription() {
java.lang.Object ref = description_;
- if (!(ref instanceof String)) {
- String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
- description_ = s;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ if (bs.isValidUtf8()) {
+ description_ = s;
+ }
return s;
} else {
- return (String) ref;
+ return (java.lang.String) ref;
}
}
- public Builder setDescription(String value) {
+ /**
+ * optional string description = 6;
+ */
+ public com.google.protobuf.ByteString
+ getDescriptionBytes() {
+ java.lang.Object ref = description_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ description_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ * optional string description = 6;
+ */
+ public Builder setDescription(
+ java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
@@ -924,139 +2101,589 @@ public Builder setDescription(String value) {
onChanged();
return this;
}
+ /**
+ * optional string description = 6;
+ */
public Builder clearDescription() {
bitField0_ = (bitField0_ & ~0x00000020);
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
- void setDescription(com.google.protobuf.ByteString value) {
- bitField0_ |= 0x00000020;
+ /**
+ * optional string description = 6;
+ */
+ public Builder setDescriptionBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000020;
description_ = value;
onChanged();
+ return this;
}
-
- // optional float someFloatColumn = 7;
+
private float someFloatColumn_ ;
+ /**
+ * optional float someFloatColumn = 7;
+ */
public boolean hasSomeFloatColumn() {
return ((bitField0_ & 0x00000040) == 0x00000040);
}
+ /**
+ * optional float someFloatColumn = 7;
+ */
public float getSomeFloatColumn() {
return someFloatColumn_;
}
+ /**
+ * optional float someFloatColumn = 7;
+ */
public Builder setSomeFloatColumn(float value) {
bitField0_ |= 0x00000040;
someFloatColumn_ = value;
onChanged();
return this;
}
+ /**
+ * optional float someFloatColumn = 7;
+ */
public Builder clearSomeFloatColumn() {
bitField0_ = (bitField0_ & ~0x00000040);
someFloatColumn_ = 0F;
onChanged();
return this;
}
-
- // optional uint32 someIntColumn = 8;
+
private int someIntColumn_ ;
+ /**
+ * optional uint32 someIntColumn = 8;
+ */
public boolean hasSomeIntColumn() {
return ((bitField0_ & 0x00000080) == 0x00000080);
}
+ /**
+ * optional uint32 someIntColumn = 8;
+ */
public int getSomeIntColumn() {
return someIntColumn_;
}
+ /**
+ * optional uint32 someIntColumn = 8;
+ */
public Builder setSomeIntColumn(int value) {
bitField0_ |= 0x00000080;
someIntColumn_ = value;
onChanged();
return this;
}
+ /**
+ * optional uint32 someIntColumn = 8;
+ */
public Builder clearSomeIntColumn() {
bitField0_ = (bitField0_ & ~0x00000080);
someIntColumn_ = 0;
onChanged();
return this;
}
-
- // optional uint64 someLongColumn = 9;
+
private long someLongColumn_ ;
+ /**
+ * optional uint64 someLongColumn = 9;
+ */
public boolean hasSomeLongColumn() {
return ((bitField0_ & 0x00000100) == 0x00000100);
}
+ /**
+ * optional uint64 someLongColumn = 9;
+ */
public long getSomeLongColumn() {
return someLongColumn_;
}
+ /**
+ * optional uint64 someLongColumn = 9;
+ */
public Builder setSomeLongColumn(long value) {
bitField0_ |= 0x00000100;
someLongColumn_ = value;
onChanged();
return this;
}
+ /**
+ * optional uint64 someLongColumn = 9;
+ */
public Builder clearSomeLongColumn() {
bitField0_ = (bitField0_ & ~0x00000100);
someLongColumn_ = 0L;
onChanged();
return this;
}
-
+
+ private io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo foo_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo, io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder, io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder> fooBuilder_;
+ /**
+ * optional .prototest.ProtoTestEvent.Foo foo = 10;
+ */
+ public boolean hasFoo() {
+ return ((bitField0_ & 0x00000200) == 0x00000200);
+ }
+ /**
+ * optional .prototest.ProtoTestEvent.Foo foo = 10;
+ */
+ public io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo getFoo() {
+ if (fooBuilder_ == null) {
+ return foo_ == null ? io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.getDefaultInstance() : foo_;
+ } else {
+ return fooBuilder_.getMessage();
+ }
+ }
+ /**
+ * optional .prototest.ProtoTestEvent.Foo foo = 10;
+ */
+ public Builder setFoo(io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo value) {
+ if (fooBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ foo_ = value;
+ onChanged();
+ } else {
+ fooBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000200;
+ return this;
+ }
+ /**
+ * optional .prototest.ProtoTestEvent.Foo foo = 10;
+ */
+ public Builder setFoo(
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder builderForValue) {
+ if (fooBuilder_ == null) {
+ foo_ = builderForValue.build();
+ onChanged();
+ } else {
+ fooBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000200;
+ return this;
+ }
+ /**
+ * optional .prototest.ProtoTestEvent.Foo foo = 10;
+ */
+ public Builder mergeFoo(io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo value) {
+ if (fooBuilder_ == null) {
+ if (((bitField0_ & 0x00000200) == 0x00000200) &&
+ foo_ != null &&
+ foo_ != io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.getDefaultInstance()) {
+ foo_ =
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.newBuilder(foo_).mergeFrom(value).buildPartial();
+ } else {
+ foo_ = value;
+ }
+ onChanged();
+ } else {
+ fooBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000200;
+ return this;
+ }
+ /**
+ * optional .prototest.ProtoTestEvent.Foo foo = 10;
+ */
+ public Builder clearFoo() {
+ if (fooBuilder_ == null) {
+ foo_ = null;
+ onChanged();
+ } else {
+ fooBuilder_.clear();
+ }
+ bitField0_ = (bitField0_ & ~0x00000200);
+ return this;
+ }
+ /**
+ * optional .prototest.ProtoTestEvent.Foo foo = 10;
+ */
+ public io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder getFooBuilder() {
+ bitField0_ |= 0x00000200;
+ onChanged();
+ return getFooFieldBuilder().getBuilder();
+ }
+ /**
+ * optional .prototest.ProtoTestEvent.Foo foo = 10;
+ */
+ public io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder getFooOrBuilder() {
+ if (fooBuilder_ != null) {
+ return fooBuilder_.getMessageOrBuilder();
+ } else {
+ return foo_ == null ?
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.getDefaultInstance() : foo_;
+ }
+ }
+ /**
+ * optional .prototest.ProtoTestEvent.Foo foo = 10;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo, io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder, io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder>
+ getFooFieldBuilder() {
+ if (fooBuilder_ == null) {
+ fooBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo, io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder, io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder>(
+ getFoo(),
+ getParentForChildren(),
+ isClean());
+ foo_ = null;
+ }
+ return fooBuilder_;
+ }
+
+ private java.util.List bar_ =
+ java.util.Collections.emptyList();
+ private void ensureBarIsMutable() {
+ if (!((bitField0_ & 0x00000400) == 0x00000400)) {
+ bar_ = new java.util.ArrayList(bar_);
+ bitField0_ |= 0x00000400;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo, io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder, io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder> barBuilder_;
+
+ /**
+ * repeated .prototest.ProtoTestEvent.Foo bar = 11;
+ */
+ public java.util.List getBarList() {
+ if (barBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(bar_);
+ } else {
+ return barBuilder_.getMessageList();
+ }
+ }
+ /**
+ * repeated .prototest.ProtoTestEvent.Foo bar = 11;
+ */
+ public int getBarCount() {
+ if (barBuilder_ == null) {
+ return bar_.size();
+ } else {
+ return barBuilder_.getCount();
+ }
+ }
+ /**
+ * repeated .prototest.ProtoTestEvent.Foo bar = 11;
+ */
+ public io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo getBar(int index) {
+ if (barBuilder_ == null) {
+ return bar_.get(index);
+ } else {
+ return barBuilder_.getMessage(index);
+ }
+ }
+ /**
+ * repeated .prototest.ProtoTestEvent.Foo bar = 11;
+ */
+ public Builder setBar(
+ int index, io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo value) {
+ if (barBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureBarIsMutable();
+ bar_.set(index, value);
+ onChanged();
+ } else {
+ barBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .prototest.ProtoTestEvent.Foo bar = 11;
+ */
+ public Builder setBar(
+ int index, io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder builderForValue) {
+ if (barBuilder_ == null) {
+ ensureBarIsMutable();
+ bar_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ barBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .prototest.ProtoTestEvent.Foo bar = 11;
+ */
+ public Builder addBar(io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo value) {
+ if (barBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureBarIsMutable();
+ bar_.add(value);
+ onChanged();
+ } else {
+ barBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ * repeated .prototest.ProtoTestEvent.Foo bar = 11;
+ */
+ public Builder addBar(
+ int index, io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo value) {
+ if (barBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureBarIsMutable();
+ bar_.add(index, value);
+ onChanged();
+ } else {
+ barBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ * repeated .prototest.ProtoTestEvent.Foo bar = 11;
+ */
+ public Builder addBar(
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder builderForValue) {
+ if (barBuilder_ == null) {
+ ensureBarIsMutable();
+ bar_.add(builderForValue.build());
+ onChanged();
+ } else {
+ barBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .prototest.ProtoTestEvent.Foo bar = 11;
+ */
+ public Builder addBar(
+ int index, io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder builderForValue) {
+ if (barBuilder_ == null) {
+ ensureBarIsMutable();
+ bar_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ barBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ * repeated .prototest.ProtoTestEvent.Foo bar = 11;
+ */
+ public Builder addAllBar(
+ java.lang.Iterable extends io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo> values) {
+ if (barBuilder_ == null) {
+ ensureBarIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, bar_);
+ onChanged();
+ } else {
+ barBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ * repeated .prototest.ProtoTestEvent.Foo bar = 11;
+ */
+ public Builder clearBar() {
+ if (barBuilder_ == null) {
+ bar_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000400);
+ onChanged();
+ } else {
+ barBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ * repeated .prototest.ProtoTestEvent.Foo bar = 11;
+ */
+ public Builder removeBar(int index) {
+ if (barBuilder_ == null) {
+ ensureBarIsMutable();
+ bar_.remove(index);
+ onChanged();
+ } else {
+ barBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ * repeated .prototest.ProtoTestEvent.Foo bar = 11;
+ */
+ public io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder getBarBuilder(
+ int index) {
+ return getBarFieldBuilder().getBuilder(index);
+ }
+ /**
+ * repeated .prototest.ProtoTestEvent.Foo bar = 11;
+ */
+ public io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder getBarOrBuilder(
+ int index) {
+ if (barBuilder_ == null) {
+ return bar_.get(index); } else {
+ return barBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ * repeated .prototest.ProtoTestEvent.Foo bar = 11;
+ */
+ public java.util.List extends io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder>
+ getBarOrBuilderList() {
+ if (barBuilder_ != null) {
+ return barBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(bar_);
+ }
+ }
+ /**
+ * repeated .prototest.ProtoTestEvent.Foo bar = 11;
+ */
+ public io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder addBarBuilder() {
+ return getBarFieldBuilder().addBuilder(
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.getDefaultInstance());
+ }
+ /**
+ * repeated .prototest.ProtoTestEvent.Foo bar = 11;
+ */
+ public io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder addBarBuilder(
+ int index) {
+ return getBarFieldBuilder().addBuilder(
+ index, io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.getDefaultInstance());
+ }
+ /**
+ * repeated .prototest.ProtoTestEvent.Foo bar = 11;
+ */
+ public java.util.List
+ getBarBuilderList() {
+ return getBarFieldBuilder().getBuilderList();
+ }
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo, io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder, io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder>
+ getBarFieldBuilder() {
+ if (barBuilder_ == null) {
+ barBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
+ io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo, io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder, io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder>(
+ bar_,
+ ((bitField0_ & 0x00000400) == 0x00000400),
+ getParentForChildren(),
+ isClean());
+ bar_ = null;
+ }
+ return barBuilder_;
+ }
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+
// @@protoc_insertion_point(builder_scope:prototest.ProtoTestEvent)
}
-
+
+ // @@protoc_insertion_point(class_scope:prototest.ProtoTestEvent)
+ private static final io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent DEFAULT_INSTANCE;
static {
- defaultInstance = new ProtoTestEvent(true);
- defaultInstance.initFields();
+ DEFAULT_INSTANCE = new io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent();
}
-
- // @@protoc_insertion_point(class_scope:prototest.ProtoTestEvent)
+
+ public static io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ @java.lang.Deprecated public static final com.google.protobuf.Parser
+ PARSER = new com.google.protobuf.AbstractParser() {
+ public ProtoTestEvent parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new ProtoTestEvent(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser getParserForType() {
+ return PARSER;
+ }
+
+ public io.druid.data.input.ProtoTestEventWrapper.ProtoTestEvent getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
}
-
- private static com.google.protobuf.Descriptors.Descriptor
+
+ private static final com.google.protobuf.Descriptors.Descriptor
internal_static_prototest_ProtoTestEvent_descriptor;
- private static
- com.google.protobuf.GeneratedMessage.FieldAccessorTable
+ private static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_prototest_ProtoTestEvent_fieldAccessorTable;
-
+ private static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_prototest_ProtoTestEvent_Foo_descriptor;
+ private static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_prototest_ProtoTestEvent_Foo_fieldAccessorTable;
+
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
- private static com.google.protobuf.Descriptors.FileDescriptor
+ private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
- "\n\017ProtoTest.proto\022\tprototest\"\266\002\n\016ProtoTe" +
+ "\n\017ProtoTest.proto\022\tprototest\"\242\003\n\016ProtoTe" +
"stEvent\022:\n\teventType\030\001 \002(\0162\'.prototest.P" +
"rotoTestEvent.EventCategory\022\n\n\002id\030\002 \002(\004\022" +
"\021\n\ttimestamp\030\003 \002(\t\022\023\n\013someOtherId\030\004 \001(\r\022" +
"\017\n\007isValid\030\005 \001(\010\022\023\n\013description\030\006 \001(\t\022\027\n" +
"\017someFloatColumn\030\007 \001(\002\022\025\n\rsomeIntColumn\030" +
- "\010 \001(\r\022\026\n\016someLongColumn\030\t \001(\004\"F\n\rEventCa" +
- "tegory\022\021\n\rCATEGORY_ZERO\020\000\022\020\n\014CATEGORY_ON" +
- "E\020\001\022\020\n\014CATEGORY_TWO\020\002B6\n\035com.metamx.drui" +
- "d.indexer.dataB\025ProtoTestEventWrapper"
+ "\010 \001(\r\022\026\n\016someLongColumn\030\t \001(\004\022*\n\003foo\030\n \001" +
+ "(\0132\035.prototest.ProtoTestEvent.Foo\022*\n\003bar" +
+ "\030\013 \003(\0132\035.prototest.ProtoTestEvent.Foo\032\022\n" +
+ "\003Foo\022\013\n\003bar\030\001 \002(\t\"F\n\rEventCategory\022\021\n\rCA",
+ "TEGORY_ZERO\020\000\022\020\n\014CATEGORY_ONE\020\001\022\020\n\014CATEG" +
+ "ORY_TWO\020\002B,\n\023io.druid.data.inputB\025ProtoT" +
+ "estEventWrapper"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
- new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
- public com.google.protobuf.ExtensionRegistry assignDescriptors(
- com.google.protobuf.Descriptors.FileDescriptor root) {
- descriptor = root;
- internal_static_prototest_ProtoTestEvent_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_prototest_ProtoTestEvent_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessage.FieldAccessorTable(
- internal_static_prototest_ProtoTestEvent_descriptor,
- new java.lang.String[] { "EventType", "Id", "Timestamp", "SomeOtherId", "IsValid", "Description", "SomeFloatColumn", "SomeIntColumn", "SomeLongColumn", },
- ProtoTestEventWrapper.ProtoTestEvent.class,
- ProtoTestEventWrapper.ProtoTestEvent.Builder.class);
- return null;
- }
- };
+ new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
+ public com.google.protobuf.ExtensionRegistry assignDescriptors(
+ com.google.protobuf.Descriptors.FileDescriptor root) {
+ descriptor = root;
+ return null;
+ }
+ };
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
}, assigner);
+ internal_static_prototest_ProtoTestEvent_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_prototest_ProtoTestEvent_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_prototest_ProtoTestEvent_descriptor,
+ new java.lang.String[] { "EventType", "Id", "Timestamp", "SomeOtherId", "IsValid", "Description", "SomeFloatColumn", "SomeIntColumn", "SomeLongColumn", "Foo", "Bar", });
+ internal_static_prototest_ProtoTestEvent_Foo_descriptor =
+ internal_static_prototest_ProtoTestEvent_descriptor.getNestedTypes().get(0);
+ internal_static_prototest_ProtoTestEvent_Foo_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_prototest_ProtoTestEvent_Foo_descriptor,
+ new java.lang.String[] { "Bar", });
}
-
// @@protoc_insertion_point(outer_class_scope)
}
diff --git a/processing/src/test/resources/ProtoTest.proto b/processing/src/test/resources/ProtoTest.proto
index 956db5259ac9..d3ccc012ed2f 100644
--- a/processing/src/test/resources/ProtoTest.proto
+++ b/processing/src/test/resources/ProtoTest.proto
@@ -1,31 +1,31 @@
-
+syntax = "proto2";
package prototest;
-option java_package = "io.druid.indexer.data";
+option java_package = "io.druid.data.input";
option java_outer_classname = "ProtoTestEventWrapper";
-
message ProtoTestEvent {
-
-
-enum EventCategory {
- CATEGORY_ZERO = 0;
- CATEGORY_ONE = 1;
- CATEGORY_TWO = 2;
-}
-
- required EventCategory eventType = 1;
-
- required uint64 id = 2;
- required string timestamp = 3;
- optional uint32 someOtherId = 4;
- optional bool isValid = 5;
- optional string description = 6;
-
- optional float someFloatColumn = 7;
- optional uint32 someIntColumn = 8;
- optional uint64 someLongColumn = 9;
-
-
+ enum EventCategory {
+ CATEGORY_ZERO = 0;
+ CATEGORY_ONE = 1;
+ CATEGORY_TWO = 2;
+ }
+
+ message Foo {
+ required string bar = 1;
+ }
+
+ required EventCategory eventType = 1;
+ required uint64 id = 2;
+ required string timestamp = 3;
+ optional uint32 someOtherId = 4;
+ optional bool isValid = 5;
+ optional string description = 6;
+
+ optional float someFloatColumn = 7;
+ optional uint32 someIntColumn = 8;
+ optional uint64 someLongColumn = 9;
+ optional Foo foo = 10;
+ repeated Foo bar = 11;
}
diff --git a/processing/src/test/resources/prototest.desc b/processing/src/test/resources/prototest.desc
index 649ce5bcb8fe..9dc75a0d51f3 100644
Binary files a/processing/src/test/resources/prototest.desc and b/processing/src/test/resources/prototest.desc differ