Search in sources :

Example 1 with FileBasedProtobufBytesDecoder

use of org.apache.druid.data.input.protobuf.FileBasedProtobufBytesDecoder in project druid by druid-io.

the class ProtobufParserBenchmark method setup.

@Setup
public void setup() {
    nestedParseSpec = new JSONParseSpec(new TimestampSpec("timestamp", "iso", null), new DimensionsSpec(Lists.newArrayList(new StringDimensionSchema("event"), new StringDimensionSchema("id"), new StringDimensionSchema("someOtherId"), new StringDimensionSchema("isValid"))), 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, null);
    flatParseSpec = 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, null);
    decoder = new FileBasedProtobufBytesDecoder("prototest.desc", "ProtoTestEvent");
    protoFilePath = "ProtoFile";
    protoInputs = getProtoInputs(protoFilePath);
    nestedParser = new ProtobufInputRowParser(nestedParseSpec, decoder, null, null);
    flatParser = new ProtobufInputRowParser(flatParseSpec, decoder, null, null);
}
Also used : ProtobufInputRowParser(org.apache.druid.data.input.protobuf.ProtobufInputRowParser) TimestampSpec(org.apache.druid.data.input.impl.TimestampSpec) DimensionsSpec(org.apache.druid.data.input.impl.DimensionsSpec) JSONPathSpec(org.apache.druid.java.util.common.parsers.JSONPathSpec) FileBasedProtobufBytesDecoder(org.apache.druid.data.input.protobuf.FileBasedProtobufBytesDecoder) JSONPathFieldSpec(org.apache.druid.java.util.common.parsers.JSONPathFieldSpec) JSONParseSpec(org.apache.druid.data.input.impl.JSONParseSpec) StringDimensionSchema(org.apache.druid.data.input.impl.StringDimensionSchema) Setup(org.openjdk.jmh.annotations.Setup)

Aggregations

DimensionsSpec (org.apache.druid.data.input.impl.DimensionsSpec)1 JSONParseSpec (org.apache.druid.data.input.impl.JSONParseSpec)1 StringDimensionSchema (org.apache.druid.data.input.impl.StringDimensionSchema)1 TimestampSpec (org.apache.druid.data.input.impl.TimestampSpec)1 FileBasedProtobufBytesDecoder (org.apache.druid.data.input.protobuf.FileBasedProtobufBytesDecoder)1 ProtobufInputRowParser (org.apache.druid.data.input.protobuf.ProtobufInputRowParser)1 JSONPathFieldSpec (org.apache.druid.java.util.common.parsers.JSONPathFieldSpec)1 JSONPathSpec (org.apache.druid.java.util.common.parsers.JSONPathSpec)1 Setup (org.openjdk.jmh.annotations.Setup)1