public class org.apache.drill.exec.store.splunk.SplunkBatchReader extends java.lang.Object implements org.apache.drill.exec.physical.impl.scan.framework.ManagedReader
{
private static final org.slf4j.Logger logger;
private static final java.util.List INT_COLS;
private static final java.util.List TS_COLS;
private static final java.lang.String EARLIEST_TIME_COLUMN;
private static final java.lang.String LATEST_TIME_COLUMN;
private final org.apache.drill.exec.store.splunk.SplunkPluginConfig config;
private final org.apache.drill.exec.store.splunk.SplunkSubScan subScan;
private final java.util.List projectedColumns;
private final com.splunk.Service splunkService;
private final org.apache.drill.exec.store.splunk.SplunkScanSpec subScanSpec;
private final com.univocity.parsers.csv.CsvParserSettings csvSettings;
private com.splunk.JobExportArgs exportArgs;
private java.io.InputStream searchResults;
private com.univocity.parsers.csv.CsvParser csvReader;
private java.lang.String[] firstRow;
private org.apache.drill.common.exceptions.CustomErrorContext errorContext;
private java.util.List columnWriters;
private org.apache.drill.exec.record.metadata.SchemaBuilder builder;
private org.apache.drill.exec.physical.resultSet.RowSetLoader rowWriter;
private org.apache.drill.shaded.guava.com.google.common.base.Stopwatch timer;
public void <init>(org.apache.drill.exec.store.splunk.SplunkPluginConfig, org.apache.drill.exec.store.splunk.SplunkSubScan)
{
org.apache.drill.exec.store.splunk.SplunkSubScan v;
com.univocity.parsers.csv.CsvParserSettings v, v, v, v;
org.apache.drill.exec.store.splunk.SplunkBatchReader v;
com.univocity.parsers.common.processor.RowListProcessor v;
org.apache.drill.exec.store.splunk.SplunkConnection v;
java.util.List v;
org.apache.drill.exec.store.splunk.SplunkScanSpec v;
com.splunk.Service v;
int v;
org.apache.drill.exec.store.splunk.SplunkPluginConfig v;
java.lang.String v;
v := @this: org.apache.drill.exec.store.splunk.SplunkBatchReader;
v := @parameter: org.apache.drill.exec.store.splunk.SplunkPluginConfig;
v := @parameter: org.apache.drill.exec.store.splunk.SplunkSubScan;
specialinvoke v.<java.lang.Object: void <init>()>();
v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.exec.store.splunk.SplunkPluginConfig config> = v;
v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.exec.store.splunk.SplunkSubScan subScan> = v;
v = virtualinvoke v.<org.apache.drill.exec.store.splunk.SplunkSubScan: java.util.List getColumns()>();
v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: java.util.List projectedColumns> = v;
v = virtualinvoke v.<org.apache.drill.exec.store.splunk.SplunkSubScan: org.apache.drill.exec.store.splunk.SplunkScanSpec getScanSpec()>();
v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.exec.store.splunk.SplunkScanSpec subScanSpec> = v;
v = new org.apache.drill.exec.store.splunk.SplunkConnection;
v = virtualinvoke v.<org.apache.drill.exec.store.splunk.SplunkSubScan: java.lang.String getUserName()>();
specialinvoke v.<org.apache.drill.exec.store.splunk.SplunkConnection: void <init>(org.apache.drill.exec.store.splunk.SplunkPluginConfig,java.lang.String)>(v, v);
v = virtualinvoke v.<org.apache.drill.exec.store.splunk.SplunkConnection: com.splunk.Service connect()>();
v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: com.splunk.Service splunkService> = v;
v = new com.univocity.parsers.csv.CsvParserSettings;
specialinvoke v.<com.univocity.parsers.csv.CsvParserSettings: void <init>()>();
v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: com.univocity.parsers.csv.CsvParserSettings csvSettings> = v;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: com.univocity.parsers.csv.CsvParserSettings csvSettings>;
virtualinvoke v.<com.univocity.parsers.csv.CsvParserSettings: void setLineSeparatorDetectionEnabled(boolean)>(1);
v = new com.univocity.parsers.common.processor.RowListProcessor;
specialinvoke v.<com.univocity.parsers.common.processor.RowListProcessor: void <init>()>();
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: com.univocity.parsers.csv.CsvParserSettings csvSettings>;
virtualinvoke v.<com.univocity.parsers.csv.CsvParserSettings: void setProcessor(com.univocity.parsers.common.processor.core.Processor)>(v);
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: com.univocity.parsers.csv.CsvParserSettings csvSettings>;
v = <org.apache.drill.exec.vector.ValueVector: int MAX_BUFFER_SIZE>;
virtualinvoke v.<com.univocity.parsers.csv.CsvParserSettings: void setMaxCharsPerColumn(int)>(v);
return;
}
public boolean open(org.apache.drill.exec.physical.impl.scan.framework.SchemaNegotiator)
{
org.apache.drill.exec.physical.impl.scan.framework.SchemaNegotiator v;
org.apache.drill.exec.record.metadata.SchemaBuilder v;
java.lang.Integer v, v, v, v;
java.time.Duration v, v, v, v;
org.apache.drill.exec.store.splunk.SplunkBatchReader v;
org.apache.drill.exec.record.metadata.TupleMetadata v;
com.splunk.Service v;
org.apache.drill.shaded.guava.com.google.common.base.Stopwatch v, v, v, v, v, v;
org.apache.drill.common.exceptions.CustomErrorContext v;
org.apache.drill.exec.physical.resultSet.RowSetLoader v;
com.splunk.JobExportArgs v;
int v, v, v, v, v, v, v, v;
java.lang.String v;
com.univocity.parsers.csv.CsvParser v, v;
com.univocity.parsers.csv.CsvParserSettings v;
org.slf4j.Logger v, v, v, v, v;
org.apache.drill.exec.physical.resultSet.ResultSetLoader v;
java.io.InputStream v, v;
v := @this: org.apache.drill.exec.store.splunk.SplunkBatchReader;
v := @parameter: org.apache.drill.exec.physical.impl.scan.framework.SchemaNegotiator;
v = staticinvoke <org.apache.drill.shaded.guava.com.google.common.base.Stopwatch: org.apache.drill.shaded.guava.com.google.common.base.Stopwatch createUnstarted()>();
v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.shaded.guava.com.google.common.base.Stopwatch timer> = v;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.shaded.guava.com.google.common.base.Stopwatch timer>;
virtualinvoke v.<org.apache.drill.shaded.guava.com.google.common.base.Stopwatch: org.apache.drill.shaded.guava.com.google.common.base.Stopwatch start()>();
v = interfaceinvoke v.<org.apache.drill.exec.physical.impl.scan.framework.SchemaNegotiator: org.apache.drill.common.exceptions.CustomErrorContext parentErrorContext()>();
v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.common.exceptions.CustomErrorContext errorContext> = v;
v = specialinvoke v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: java.lang.String buildQueryString()>();
v = <org.apache.drill.exec.store.splunk.SplunkBatchReader: org.slf4j.Logger logger>;
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String,java.lang.Object)>("Query Sent to Splunk: {}", v);
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: com.splunk.Service splunkService>;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: com.splunk.JobExportArgs exportArgs>;
v = virtualinvoke v.<com.splunk.Service: java.io.InputStream export(java.lang.String,com.splunk.JobExportArgs)>(v, v);
v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: java.io.InputStream searchResults> = v;
v = <org.apache.drill.exec.store.splunk.SplunkBatchReader: org.slf4j.Logger logger>;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.shaded.guava.com.google.common.base.Stopwatch timer>;
v = virtualinvoke v.<org.apache.drill.shaded.guava.com.google.common.base.Stopwatch: java.time.Duration elapsed()>();
v = virtualinvoke v.<java.time.Duration: int getNano()>();
v = v / 100000;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String,java.lang.Object)>("Time to execute query: {} milliseconds", v);
v = new com.univocity.parsers.csv.CsvParser;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: com.univocity.parsers.csv.CsvParserSettings csvSettings>;
specialinvoke v.<com.univocity.parsers.csv.CsvParser: void <init>(com.univocity.parsers.csv.CsvParserSettings)>(v);
v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: com.univocity.parsers.csv.CsvParser csvReader> = v;
v = <org.apache.drill.exec.store.splunk.SplunkBatchReader: org.slf4j.Logger logger>;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.shaded.guava.com.google.common.base.Stopwatch timer>;
v = virtualinvoke v.<org.apache.drill.shaded.guava.com.google.common.base.Stopwatch: java.time.Duration elapsed()>();
v = virtualinvoke v.<java.time.Duration: int getNano()>();
v = v / 100000;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String,java.lang.Object)>("Time to open CSV Parser: {} milliseconds", v);
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: com.univocity.parsers.csv.CsvParser csvReader>;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: java.io.InputStream searchResults>;
virtualinvoke v.<com.univocity.parsers.csv.CsvParser: void beginParsing(java.io.InputStream,java.lang.String)>(v, "utf-8");
v = <org.apache.drill.exec.store.splunk.SplunkBatchReader: org.slf4j.Logger logger>;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.shaded.guava.com.google.common.base.Stopwatch timer>;
v = virtualinvoke v.<org.apache.drill.shaded.guava.com.google.common.base.Stopwatch: java.time.Duration elapsed()>();
v = virtualinvoke v.<java.time.Duration: int getNano()>();
v = v / 100000;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String,java.lang.Object)>("Time to open input stream: {} milliseconds", v);
v = new org.apache.drill.exec.record.metadata.SchemaBuilder;
specialinvoke v.<org.apache.drill.exec.record.metadata.SchemaBuilder: void <init>()>();
v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.exec.record.metadata.SchemaBuilder builder> = v;
v = specialinvoke v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.exec.record.metadata.TupleMetadata buildSchema()>();
interfaceinvoke v.<org.apache.drill.exec.physical.impl.scan.framework.SchemaNegotiator: void tableSchema(org.apache.drill.exec.record.metadata.TupleMetadata,boolean)>(v, 0);
v = interfaceinvoke v.<org.apache.drill.exec.physical.impl.scan.framework.SchemaNegotiator: org.apache.drill.exec.physical.resultSet.ResultSetLoader build()>();
v = interfaceinvoke v.<org.apache.drill.exec.physical.resultSet.ResultSetLoader: org.apache.drill.exec.physical.resultSet.RowSetLoader writer()>();
v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.exec.physical.resultSet.RowSetLoader rowWriter> = v;
specialinvoke v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: void populateWriterArray()>();
v = <org.apache.drill.exec.store.splunk.SplunkBatchReader: org.slf4j.Logger logger>;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.shaded.guava.com.google.common.base.Stopwatch timer>;
v = virtualinvoke v.<org.apache.drill.shaded.guava.com.google.common.base.Stopwatch: java.time.Duration elapsed()>();
v = virtualinvoke v.<java.time.Duration: int getNano()>();
v = v / 100000;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String,java.lang.Object)>("Completed open function in {} milliseconds", v);
return 1;
}
public boolean next()
{
org.apache.drill.exec.physical.resultSet.RowSetLoader v;
org.apache.drill.exec.store.splunk.SplunkBatchReader v;
boolean v, v;
v := @this: org.apache.drill.exec.store.splunk.SplunkBatchReader;
label:
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.exec.physical.resultSet.RowSetLoader rowWriter>;
v = interfaceinvoke v.<org.apache.drill.exec.physical.resultSet.RowSetLoader: boolean isFull()>();
if v != 0 goto label;
v = specialinvoke v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: boolean processRow()>();
if v != 0 goto label;
return 0;
label:
return 1;
}
public void close()
{
java.lang.AutoCloseable[] v;
org.apache.drill.exec.store.splunk.SplunkBatchReader v;
org.apache.drill.shaded.guava.com.google.common.base.Stopwatch v;
java.io.InputStream v, v;
v := @this: org.apache.drill.exec.store.splunk.SplunkBatchReader;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.shaded.guava.com.google.common.base.Stopwatch timer>;
virtualinvoke v.<org.apache.drill.shaded.guava.com.google.common.base.Stopwatch: org.apache.drill.shaded.guava.com.google.common.base.Stopwatch stop()>();
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: java.io.InputStream searchResults>;
if v == null goto label;
v = newarray (java.lang.AutoCloseable)[1];
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: java.io.InputStream searchResults>;
v[0] = v;
staticinvoke <org.apache.drill.common.AutoCloseables: void closeSilently(java.lang.AutoCloseable[])>(v);
v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: java.io.InputStream searchResults> = null;
label:
return;
}
private org.apache.drill.exec.record.metadata.TupleMetadata buildSchema()
{
java.lang.String[] v, v, v;
org.apache.drill.exec.record.metadata.SchemaBuilder v, v, v, v, v;
java.lang.Integer v;
org.apache.drill.common.types.TypeProtos$MinorType v, v, v;
java.time.Duration v;
int v, v, v, v;
java.lang.String v;
com.univocity.parsers.csv.CsvParser v;
boolean v, v;
org.apache.drill.exec.store.splunk.SplunkBatchReader v;
org.slf4j.Logger v, v;
org.apache.drill.exec.record.metadata.TupleMetadata v, v;
java.lang.Exception v;
java.util.List v, v;
org.apache.drill.shaded.guava.com.google.common.base.Stopwatch v;
v := @this: org.apache.drill.exec.store.splunk.SplunkBatchReader;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: com.univocity.parsers.csv.CsvParser csvReader>;
v = virtualinvoke v.<com.univocity.parsers.csv.CsvParser: java.lang.String[] parseNext()>();
v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: java.lang.String[] firstRow> = v;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: java.lang.String[] firstRow>;
if v != null goto label;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.exec.record.metadata.SchemaBuilder builder>;
v = virtualinvoke v.<org.apache.drill.exec.record.metadata.SchemaBuilder: org.apache.drill.exec.record.metadata.TupleMetadata buildSchema()>();
return v;
label:
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: java.lang.String[] firstRow>;
v = lengthof v;
v = 0;
label:
if v >= v goto label;
v = v[v];
v = <org.apache.drill.exec.store.splunk.SplunkBatchReader: java.util.List INT_COLS>;
v = interfaceinvoke v.<java.util.List: boolean contains(java.lang.Object)>(v);
if v == 0 goto label;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.exec.record.metadata.SchemaBuilder builder>;
v = <org.apache.drill.common.types.TypeProtos$MinorType: org.apache.drill.common.types.TypeProtos$MinorType INT>;
virtualinvoke v.<org.apache.drill.exec.record.metadata.SchemaBuilder: org.apache.drill.exec.record.metadata.SchemaBuilder addNullable(java.lang.String,org.apache.drill.common.types.TypeProtos$MinorType)>(v, v);
goto label;
label:
v = <org.apache.drill.exec.store.splunk.SplunkBatchReader: java.util.List TS_COLS>;
v = interfaceinvoke v.<java.util.List: boolean contains(java.lang.Object)>(v);
if v == 0 goto label;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.exec.record.metadata.SchemaBuilder builder>;
v = <org.apache.drill.common.types.TypeProtos$MinorType: org.apache.drill.common.types.TypeProtos$MinorType TIMESTAMP>;
virtualinvoke v.<org.apache.drill.exec.record.metadata.SchemaBuilder: org.apache.drill.exec.record.metadata.SchemaBuilder addNullable(java.lang.String,org.apache.drill.common.types.TypeProtos$MinorType)>(v, v);
goto label;
label:
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.exec.record.metadata.SchemaBuilder builder>;
v = <org.apache.drill.common.types.TypeProtos$MinorType: org.apache.drill.common.types.TypeProtos$MinorType VARCHAR>;
virtualinvoke v.<org.apache.drill.exec.record.metadata.SchemaBuilder: org.apache.drill.exec.record.metadata.SchemaBuilder addNullable(java.lang.String,org.apache.drill.common.types.TypeProtos$MinorType)>(v, v);
label:
goto label;
label:
v := @caughtexception;
v = <org.apache.drill.exec.store.splunk.SplunkBatchReader: org.slf4j.Logger logger>;
interfaceinvoke v.<org.slf4j.Logger: void warn(java.lang.String,java.lang.Object)>("Splunk attempted to add duplicate column {}", v);
label:
v = v + 1;
goto label;
label:
v = <org.apache.drill.exec.store.splunk.SplunkBatchReader: org.slf4j.Logger logger>;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.shaded.guava.com.google.common.base.Stopwatch timer>;
v = virtualinvoke v.<org.apache.drill.shaded.guava.com.google.common.base.Stopwatch: java.time.Duration elapsed()>();
v = virtualinvoke v.<java.time.Duration: int getNano()>();
v = v / 100000;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String,java.lang.Object)>("Time to build schmea: {} milliseconds", v);
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.exec.record.metadata.SchemaBuilder builder>;
v = virtualinvoke v.<org.apache.drill.exec.record.metadata.SchemaBuilder: org.apache.drill.exec.record.metadata.TupleMetadata buildSchema()>();
return v;
catch java.lang.Exception from label to label with label;
}
private void populateWriterArray()
{
java.lang.String[] v, v, v;
java.lang.Integer v;
java.util.ArrayList v;
org.apache.drill.exec.store.splunk.SplunkBatchReader$IntColumnWriter v;
org.apache.drill.exec.physical.resultSet.RowSetLoader v, v, v;
java.time.Duration v;
int v, v, v, v, v, v;
java.lang.String v;
boolean v, v;
org.apache.drill.exec.store.splunk.SplunkBatchReader v;
org.slf4j.Logger v;
org.apache.drill.exec.store.splunk.SplunkBatchReader$TimestampColumnWriter v;
org.apache.drill.exec.store.splunk.SplunkBatchReader$StringColumnWriter v;
java.util.List v, v, v, v, v;
org.apache.drill.shaded.guava.com.google.common.base.Stopwatch v;
v := @this: org.apache.drill.exec.store.splunk.SplunkBatchReader;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: java.lang.String[] firstRow>;
if v == null goto label;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: java.lang.String[] firstRow>;
v = lengthof v;
if v != 0 goto label;
label:
return;
label:
v = new java.util.ArrayList;
specialinvoke v.<java.util.ArrayList: void <init>()>();
v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: java.util.List columnWriters> = v;
v = 0;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: java.lang.String[] firstRow>;
v = lengthof v;
v = 0;
label:
if v >= v goto label;
v = v[v];
v = <org.apache.drill.exec.store.splunk.SplunkBatchReader: java.util.List INT_COLS>;
v = interfaceinvoke v.<java.util.List: boolean contains(java.lang.Object)>(v);
if v == 0 goto label;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: java.util.List columnWriters>;
v = new org.apache.drill.exec.store.splunk.SplunkBatchReader$IntColumnWriter;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.exec.physical.resultSet.RowSetLoader rowWriter>;
specialinvoke v.<org.apache.drill.exec.store.splunk.SplunkBatchReader$IntColumnWriter: void <init>(java.lang.String,org.apache.drill.exec.physical.resultSet.RowSetLoader,int)>(v, v, v);
interfaceinvoke v.<java.util.List: boolean add(java.lang.Object)>(v);
goto label;
label:
v = <org.apache.drill.exec.store.splunk.SplunkBatchReader: java.util.List TS_COLS>;
v = interfaceinvoke v.<java.util.List: boolean contains(java.lang.Object)>(v);
if v == 0 goto label;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: java.util.List columnWriters>;
v = new org.apache.drill.exec.store.splunk.SplunkBatchReader$TimestampColumnWriter;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.exec.physical.resultSet.RowSetLoader rowWriter>;
specialinvoke v.<org.apache.drill.exec.store.splunk.SplunkBatchReader$TimestampColumnWriter: void <init>(java.lang.String,org.apache.drill.exec.physical.resultSet.RowSetLoader,int)>(v, v, v);
interfaceinvoke v.<java.util.List: boolean add(java.lang.Object)>(v);
goto label;
label:
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: java.util.List columnWriters>;
v = new org.apache.drill.exec.store.splunk.SplunkBatchReader$StringColumnWriter;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.exec.physical.resultSet.RowSetLoader rowWriter>;
specialinvoke v.<org.apache.drill.exec.store.splunk.SplunkBatchReader$StringColumnWriter: void <init>(java.lang.String,org.apache.drill.exec.physical.resultSet.RowSetLoader,int)>(v, v, v);
interfaceinvoke v.<java.util.List: boolean add(java.lang.Object)>(v);
label:
v = v + 1;
v = v + 1;
goto label;
label:
v = <org.apache.drill.exec.store.splunk.SplunkBatchReader: org.slf4j.Logger logger>;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.shaded.guava.com.google.common.base.Stopwatch timer>;
v = virtualinvoke v.<org.apache.drill.shaded.guava.com.google.common.base.Stopwatch: java.time.Duration elapsed()>();
v = virtualinvoke v.<java.time.Duration: int getNano()>();
v = v / 100000;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String,java.lang.Object)>("Time to populate writer array: {} milliseconds", v);
return;
}
private boolean processRow()
{
org.apache.drill.exec.store.splunk.SplunkBatchReader v;
java.util.Iterator v;
java.lang.String[] v;
org.apache.drill.exec.physical.resultSet.RowSetLoader v, v;
java.util.List v;
java.lang.Object v;
com.univocity.parsers.csv.CsvParser v;
boolean v;
v := @this: org.apache.drill.exec.store.splunk.SplunkBatchReader;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: com.univocity.parsers.csv.CsvParser csvReader>;
v = virtualinvoke v.<com.univocity.parsers.csv.CsvParser: java.lang.String[] parseNext()>();
if v != null goto label;
return 0;
label:
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.exec.physical.resultSet.RowSetLoader rowWriter>;
interfaceinvoke v.<org.apache.drill.exec.physical.resultSet.RowSetLoader: boolean start()>();
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: java.util.List columnWriters>;
v = interfaceinvoke v.<java.util.List: java.util.Iterator iterator()>();
label:
v = interfaceinvoke v.<java.util.Iterator: boolean hasNext()>();
if v == 0 goto label;
v = interfaceinvoke v.<java.util.Iterator: java.lang.Object next()>();
virtualinvoke v.<org.apache.drill.exec.store.splunk.SplunkBatchReader$SplunkColumnWriter: void load(java.lang.String[])>(v);
goto label;
label:
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.exec.physical.resultSet.RowSetLoader rowWriter>;
interfaceinvoke v.<org.apache.drill.exec.physical.resultSet.RowSetLoader: void save()>();
return 1;
}
protected static boolean isMultiField(java.lang.String)
{
java.lang.String v;
boolean v, v, v;
v := @parameter: java.lang.String;
v = virtualinvoke v.<java.lang.String: boolean startsWith(java.lang.String)>("{");
if v == 0 goto label;
v = virtualinvoke v.<java.lang.String: boolean endsWith(java.lang.String)>("}");
if v == 0 goto label;
v = 1;
goto label;
label:
v = 0;
label:
return v;
}
private java.lang.String buildQueryString()
{
org.apache.drill.common.exceptions.UserException v;
java.util.Map v;
boolean v, v, v, v, v;
org.apache.drill.exec.store.splunk.SplunkBatchReader v;
org.apache.drill.exec.store.splunk.SplunkQueryBuilder v;
java.util.List v;
org.apache.drill.exec.store.splunk.SplunkPluginConfig v, v;
org.apache.drill.exec.store.splunk.SplunkSubScan v, v, v;
java.lang.Object[] v;
org.apache.drill.common.exceptions.CustomErrorContext v;
org.apache.drill.common.exceptions.UserException$Builder v, v, v;
com.splunk.JobExportArgs$SearchMode v;
org.apache.drill.exec.store.splunk.SplunkScanSpec v, v;
com.splunk.JobExportArgs v, v, v, v, v, v, v;
int v, v;
java.lang.String v, v, v, v, v, v, v, v;
org.slf4j.Logger v, v;
java.util.Iterator v;
org.apache.drill.exec.store.base.filter.ConstantHolder v, v, v, v;
com.splunk.JobExportArgs$OutputMode v;
java.lang.Object v, v, v, v, v, v, v, v, v, v;
v := @this: org.apache.drill.exec.store.splunk.SplunkBatchReader;
v = null;
v = null;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.exec.store.splunk.SplunkSubScan subScan>;
v = virtualinvoke v.<org.apache.drill.exec.store.splunk.SplunkSubScan: java.util.Map getFilters()>();
v = new com.splunk.JobExportArgs;
specialinvoke v.<com.splunk.JobExportArgs: void <init>()>();
v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: com.splunk.JobExportArgs exportArgs> = v;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: com.splunk.JobExportArgs exportArgs>;
v = <com.splunk.JobExportArgs$SearchMode: com.splunk.JobExportArgs$SearchMode NORMAL>;
virtualinvoke v.<com.splunk.JobExportArgs: void setSearchMode(com.splunk.JobExportArgs$SearchMode)>(v);
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: com.splunk.JobExportArgs exportArgs>;
virtualinvoke v.<com.splunk.JobExportArgs: void setTimeFormat(java.lang.String)>("%s");
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: com.splunk.JobExportArgs exportArgs>;
v = <com.splunk.JobExportArgs$OutputMode: com.splunk.JobExportArgs$OutputMode CSV>;
virtualinvoke v.<com.splunk.JobExportArgs: void setOutputMode(com.splunk.JobExportArgs$OutputMode)>(v);
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: com.splunk.JobExportArgs exportArgs>;
virtualinvoke v.<com.splunk.JobExportArgs: void setEnableLookups(boolean)>(1);
if v == null goto label;
v = interfaceinvoke v.<java.util.Map: boolean containsKey(java.lang.Object)>("earliestTime");
if v == 0 goto label;
v = interfaceinvoke v.<java.util.Map: java.lang.Object get(java.lang.Object)>("earliestTime");
v = v.<org.apache.drill.exec.store.base.filter.ExprNode$ColRelOpConstNode: org.apache.drill.exec.store.base.filter.ConstantHolder value>;
v = v.<org.apache.drill.exec.store.base.filter.ConstantHolder: java.lang.Object value>;
v = virtualinvoke v.<java.lang.Object: java.lang.String toString()>();
interfaceinvoke v.<java.util.Map: java.lang.Object remove(java.lang.Object)>("earliestTime");
label:
if v == null goto label;
v = interfaceinvoke v.<java.util.Map: boolean containsKey(java.lang.Object)>("latestTime");
if v == 0 goto label;
v = interfaceinvoke v.<java.util.Map: java.lang.Object get(java.lang.Object)>("latestTime");
v = v.<org.apache.drill.exec.store.base.filter.ExprNode$ColRelOpConstNode: org.apache.drill.exec.store.base.filter.ConstantHolder value>;
v = v.<org.apache.drill.exec.store.base.filter.ConstantHolder: java.lang.Object value>;
v = virtualinvoke v.<java.lang.Object: java.lang.String toString()>();
interfaceinvoke v.<java.util.Map: java.lang.Object remove(java.lang.Object)>("latestTime");
label:
if v != null goto label;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.exec.store.splunk.SplunkPluginConfig config>;
v = virtualinvoke v.<org.apache.drill.exec.store.splunk.SplunkPluginConfig: java.lang.String getEarliestTime()>();
label:
if v != null goto label;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.exec.store.splunk.SplunkPluginConfig config>;
v = virtualinvoke v.<org.apache.drill.exec.store.splunk.SplunkPluginConfig: java.lang.String getLatestTime()>();
label:
v = <org.apache.drill.exec.store.splunk.SplunkBatchReader: org.slf4j.Logger logger>;
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String,java.lang.Object,java.lang.Object)>("Query time bounds: {} and {}", v, v);
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: com.splunk.JobExportArgs exportArgs>;
virtualinvoke v.<com.splunk.JobExportArgs: void setEarliestTime(java.lang.String)>(v);
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: com.splunk.JobExportArgs exportArgs>;
virtualinvoke v.<com.splunk.JobExportArgs: void setLatestTime(java.lang.String)>(v);
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.exec.store.splunk.SplunkScanSpec subScanSpec>;
v = virtualinvoke v.<org.apache.drill.exec.store.splunk.SplunkScanSpec: java.lang.String getIndexName()>();
v = virtualinvoke v.<java.lang.String: boolean equalsIgnoreCase(java.lang.String)>("spl");
if v == 0 goto label;
if v == null goto label;
v = interfaceinvoke v.<java.util.Map: java.lang.Object get(java.lang.Object)>("spl");
if v != null goto label;
label:
v = staticinvoke <org.apache.drill.common.exceptions.UserException: org.apache.drill.common.exceptions.UserException$Builder validationError()>();
v = newarray (java.lang.Object)[0];
v = virtualinvoke v.<org.apache.drill.common.exceptions.UserException$Builder: org.apache.drill.common.exceptions.UserException$Builder message(java.lang.String,java.lang.Object[])>("SPL cannot be empty when querying spl table.", v);
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.common.exceptions.CustomErrorContext errorContext>;
v = virtualinvoke v.<org.apache.drill.common.exceptions.UserException$Builder: org.apache.drill.common.exceptions.UserException$Builder addContext(org.apache.drill.common.exceptions.CustomErrorContext)>(v);
v = <org.apache.drill.exec.store.splunk.SplunkBatchReader: org.slf4j.Logger logger>;
v = virtualinvoke v.<org.apache.drill.common.exceptions.UserException$Builder: org.apache.drill.common.exceptions.UserException build(org.slf4j.Logger)>(v);
throw v;
label:
v = interfaceinvoke v.<java.util.Map: java.lang.Object get(java.lang.Object)>("spl");
v = v.<org.apache.drill.exec.store.base.filter.ExprNode$ColRelOpConstNode: org.apache.drill.exec.store.base.filter.ConstantHolder value>;
v = v.<org.apache.drill.exec.store.base.filter.ConstantHolder: java.lang.Object value>;
v = virtualinvoke v.<java.lang.Object: java.lang.String toString()>();
return v;
label:
v = new org.apache.drill.exec.store.splunk.SplunkQueryBuilder;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.exec.store.splunk.SplunkScanSpec subScanSpec>;
v = virtualinvoke v.<org.apache.drill.exec.store.splunk.SplunkScanSpec: java.lang.String getIndexName()>();
specialinvoke v.<org.apache.drill.exec.store.splunk.SplunkQueryBuilder: void <init>(java.lang.String)>(v);
if v == null goto label;
v = interfaceinvoke v.<java.util.Map: boolean containsKey(java.lang.Object)>("sourcetype");
if v == 0 goto label;
v = interfaceinvoke v.<java.util.Map: java.lang.Object get(java.lang.Object)>("sourcetype");
v = v.<org.apache.drill.exec.store.base.filter.ExprNode$ColRelOpConstNode: org.apache.drill.exec.store.base.filter.ConstantHolder value>;
v = v.<org.apache.drill.exec.store.base.filter.ConstantHolder: java.lang.Object value>;
v = virtualinvoke v.<java.lang.Object: java.lang.String toString()>();
virtualinvoke v.<org.apache.drill.exec.store.splunk.SplunkQueryBuilder: void addSourceType(java.lang.String)>(v);
interfaceinvoke v.<java.util.Map: java.lang.Object remove(java.lang.Object)>("sourcetype");
label:
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: java.util.List projectedColumns>;
v = interfaceinvoke v.<java.util.List: java.util.Iterator iterator()>();
label:
v = interfaceinvoke v.<java.util.Iterator: boolean hasNext()>();
if v == 0 goto label;
v = interfaceinvoke v.<java.util.Iterator: java.lang.Object next()>();
v = virtualinvoke v.<org.apache.drill.common.expression.SchemaPath: java.lang.String getAsUnescapedPath()>();
virtualinvoke v.<org.apache.drill.exec.store.splunk.SplunkQueryBuilder: boolean addField(java.lang.String)>(v);
goto label;
label:
virtualinvoke v.<org.apache.drill.exec.store.splunk.SplunkQueryBuilder: void addFilters(java.util.Map)>(v);
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.exec.store.splunk.SplunkSubScan subScan>;
v = virtualinvoke v.<org.apache.drill.exec.store.splunk.SplunkSubScan: int getMaxRecords()>();
if v <= 0 goto label;
v = v.<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.apache.drill.exec.store.splunk.SplunkSubScan subScan>;
v = virtualinvoke v.<org.apache.drill.exec.store.splunk.SplunkSubScan: int getMaxRecords()>();
virtualinvoke v.<org.apache.drill.exec.store.splunk.SplunkQueryBuilder: void addLimit(int)>(v);
label:
v = virtualinvoke v.<org.apache.drill.exec.store.splunk.SplunkQueryBuilder: java.lang.String build()>();
return v;
}
static void <clinit>()
{
java.util.List v, v;
org.slf4j.Logger v;
java.lang.String[] v, v;
java.util.ArrayList v, v;
v = staticinvoke <org.slf4j.LoggerFactory: org.slf4j.Logger getLogger(java.lang.Class)>(class "Lorg/apache/drill/exec/store/splunk/SplunkBatchReader;");
<org.apache.drill.exec.store.splunk.SplunkBatchReader: org.slf4j.Logger logger> = v;
v = new java.util.ArrayList;
v = newarray (java.lang.String)[6];
v[0] = "date_hour";
v[1] = "date_mday";
v[2] = "date_minute";
v[3] = "date_second";
v[4] = "date_year";
v[5] = "linecount";
v = staticinvoke <java.util.Arrays: java.util.List asList(java.lang.Object[])>(v);
specialinvoke v.<java.util.ArrayList: void <init>(java.util.Collection)>(v);
<org.apache.drill.exec.store.splunk.SplunkBatchReader: java.util.List INT_COLS> = v;
v = new java.util.ArrayList;
v = newarray (java.lang.String)[2];
v[0] = "_indextime";
v[1] = "_time";
v = staticinvoke <java.util.Arrays: java.util.List asList(java.lang.Object[])>(v);
specialinvoke v.<java.util.ArrayList: void <init>(java.util.Collection)>(v);
<org.apache.drill.exec.store.splunk.SplunkBatchReader: java.util.List TS_COLS> = v;
return;
}
}