Skip to content
Permalink
Browse files
DRILL-6639: Exception happens while displaying operator profiles for …
…some queries
  • Loading branch information
vdiravka authored and Ben-Zvi committed Jul 27, 2018
1 parent d979d7b commit e76e3894f93494e53aba08bb4043ee9de562bfbf
Show file tree
Hide file tree
Showing 18 changed files with 160 additions and 27 deletions.
@@ -28,6 +28,7 @@
import org.apache.drill.exec.physical.base.PhysicalOperator;
import org.apache.drill.exec.physical.base.PhysicalVisitor;
import org.apache.drill.exec.physical.base.SubScan;
import org.apache.drill.exec.proto.UserBitShared.CoreOperatorType;
import org.apache.drill.exec.store.StoragePluginRegistry;

import com.fasterxml.jackson.annotation.JacksonInject;
@@ -120,7 +121,7 @@ public Iterator<PhysicalOperator> iterator() {

@Override
public int getOperatorType() {
return 1001;
return CoreOperatorType.MAPRDB_SUB_SCAN_VALUE;
}

@JsonIgnore

Some generated files are not rendered by default. Learn more.

Some generated files are not rendered by default. Learn more.

@@ -23,6 +23,7 @@
import org.apache.drill.common.logical.StoragePluginConfig;
import org.apache.drill.exec.physical.base.AbstractWriter;
import org.apache.drill.exec.physical.base.PhysicalOperator;
import org.apache.drill.exec.proto.UserBitShared.CoreOperatorType;
import org.apache.drill.exec.store.StoragePluginRegistry;

import com.fasterxml.jackson.annotation.JacksonInject;
@@ -56,7 +57,7 @@ public KuduWriter(

@Override
public int getOperatorType() {
return 3001;
return CoreOperatorType.KUDU_WRITER_VALUE;
}

@Override
@@ -29,6 +29,7 @@
import org.apache.drill.exec.physical.base.PhysicalOperator;
import org.apache.drill.exec.physical.base.PhysicalVisitor;
import org.apache.drill.exec.physical.base.SubScan;
import org.apache.drill.exec.proto.UserBitShared.CoreOperatorType;
import org.apache.drill.exec.store.StoragePluginRegistry;
import org.bson.Document;
import org.slf4j.Logger;
@@ -114,7 +115,7 @@ public PhysicalOperator getNewWithChildren(List<PhysicalOperator> children)

@Override
public int getOperatorType() {
return 1009;
return CoreOperatorType.MONGO_SUB_SCAN_VALUE;
}

@Override
@@ -29,6 +29,7 @@
import org.apache.drill.exec.physical.base.PhysicalOperator;
import org.apache.drill.exec.physical.base.PhysicalVisitor;
import org.apache.drill.exec.physical.base.SubScan;
import org.apache.drill.exec.proto.UserBitShared.CoreOperatorType;
import org.apache.drill.exec.store.StoragePluginRegistry;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -73,7 +74,7 @@ public OpenTSDBSubScan(OpenTSDBStoragePlugin plugin, OpenTSDBStoragePluginConfig

@Override
public int getOperatorType() {
return 0;
return CoreOperatorType.OPEN_TSDB_SUB_SCAN_VALUE;
}

@Override
@@ -41,6 +41,7 @@ protected PhysicalOperator getNewWithChild(PhysicalOperator child) {

@Override
public int getOperatorType() {
// TODO: DRILL-6643: this implementation should be revisited
return -1;
}
}
@@ -60,6 +60,7 @@ public PhysicalOperator getNewWithChildren(List<PhysicalOperator> children) thro

@Override
public int getOperatorType() {
// TODO: DRILL-6643: this implementation should be revisited
return -1;
}

@@ -253,6 +253,10 @@ public void addSummary(TableBuilder tb, HashMap<String, Long> majorFragmentBusyT
* @return index of spill metric
*/
private int getSpillCycleMetricIndex(CoreOperatorType operatorType) {
// TODO: DRILL-6642, replace null values for ProtocolMessageEnum with UNRECOGNIZED NullValue to avoid null checks
if (operatorType == null) {
return NO_SPILL_METRIC_INDEX;
}
String metricName;

switch (operatorType) {
@@ -101,6 +101,6 @@ protected PhysicalOperator getNewWithChild(PhysicalOperator child) {

@Override
public int getOperatorType() {
return formatPlugin.getReaderOperatorType();
return formatPlugin.getWriterOperatorType();
}
}
@@ -144,7 +144,7 @@ public int getReaderOperatorType() {

@Override
public int getWriterOperatorType() {
throw new UnsupportedOperationException();
return CoreOperatorType.JSON_WRITER_VALUE;
}

@Override
@@ -22,6 +22,7 @@
import org.apache.drill.common.logical.StoragePluginConfig;
import org.apache.drill.exec.ops.FragmentContext;
import org.apache.drill.exec.physical.base.AbstractGroupScan;
import org.apache.drill.exec.proto.UserBitShared.CoreOperatorType;
import org.apache.drill.exec.server.DrillbitContext;
import org.apache.drill.exec.store.RecordReader;
import org.apache.drill.exec.store.RecordWriter;
@@ -76,7 +77,7 @@ public RecordReader getRecordReader(FragmentContext context,

@Override
public int getReaderOperatorType() {
return 4001;
return CoreOperatorType.SEQUENCE_SUB_SCAN_VALUE;
}

@Override
@@ -34,6 +34,7 @@
import org.apache.drill.exec.ops.FragmentContext;
import org.apache.drill.exec.ops.OperatorContext;
import org.apache.drill.exec.physical.impl.OutputMutator;
import org.apache.drill.exec.proto.UserBitShared.CoreOperatorType;
import org.apache.drill.exec.server.DrillbitContext;
import org.apache.drill.exec.store.AbstractRecordReader;
import org.apache.drill.exec.store.RecordWriter;
@@ -266,11 +267,11 @@ public RecordWriter getRecordWriter(final FragmentContext context, final EasyWri

@Override
public int getReaderOperatorType() {
return -1;
return CoreOperatorType.HTPPD_LOG_SUB_SCAN_VALUE;
}

@Override
public int getWriterOperatorType() {
return -1;
throw new UnsupportedOperationException();
}
}
}
@@ -26,6 +26,7 @@
import org.apache.drill.common.expression.SchemaPath;
import org.apache.drill.common.logical.StoragePluginConfig;
import org.apache.drill.exec.ops.FragmentContext;
import org.apache.drill.exec.proto.UserBitShared.CoreOperatorType;
import org.apache.drill.exec.server.DrillbitContext;
import org.apache.drill.exec.store.RecordReader;
import org.apache.drill.exec.store.RecordWriter;
@@ -67,7 +68,7 @@ public RecordWriter getRecordWriter(FragmentContext context, EasyWriter writer)

@Override
public int getReaderOperatorType() {
return 4002;
return CoreOperatorType.IMAGE_SUB_SCAN_VALUE;
}

@Override
@@ -81,7 +81,7 @@ public int getReaderOperatorType() {

@Override
public int getWriterOperatorType() {
return 0;
throw new UnsupportedOperationException();
}

@Override
@@ -549,6 +549,38 @@ private FragmentState(int index, int value) {
* <code>REGEX_SUB_SCAN = 45;</code>
*/
REGEX_SUB_SCAN(45, 45),
/**
* <code>MAPRDB_SUB_SCAN = 46;</code>
*/
MAPRDB_SUB_SCAN(46, 46),
/**
* <code>MONGO_SUB_SCAN = 47;</code>
*/
MONGO_SUB_SCAN(47, 47),
/**
* <code>KUDU_WRITER = 48;</code>
*/
KUDU_WRITER(48, 48),
/**
* <code>OPEN_TSDB_SUB_SCAN = 49;</code>
*/
OPEN_TSDB_SUB_SCAN(49, 49),
/**
* <code>JSON_WRITER = 50;</code>
*/
JSON_WRITER(50, 50),
/**
* <code>HTPPD_LOG_SUB_SCAN = 51;</code>
*/
HTPPD_LOG_SUB_SCAN(51, 51),
/**
* <code>IMAGE_SUB_SCAN = 52;</code>
*/
IMAGE_SUB_SCAN(52, 52),
/**
* <code>SEQUENCE_SUB_SCAN = 53;</code>
*/
SEQUENCE_SUB_SCAN(53, 53),
;

/**
@@ -735,6 +767,38 @@ private FragmentState(int index, int value) {
* <code>REGEX_SUB_SCAN = 45;</code>
*/
public static final int REGEX_SUB_SCAN_VALUE = 45;
/**
* <code>MAPRDB_SUB_SCAN = 46;</code>
*/
public static final int MAPRDB_SUB_SCAN_VALUE = 46;
/**
* <code>MONGO_SUB_SCAN = 47;</code>
*/
public static final int MONGO_SUB_SCAN_VALUE = 47;
/**
* <code>KUDU_WRITER = 48;</code>
*/
public static final int KUDU_WRITER_VALUE = 48;
/**
* <code>OPEN_TSDB_SUB_SCAN = 49;</code>
*/
public static final int OPEN_TSDB_SUB_SCAN_VALUE = 49;
/**
* <code>JSON_WRITER = 50;</code>
*/
public static final int JSON_WRITER_VALUE = 50;
/**
* <code>HTPPD_LOG_SUB_SCAN = 51;</code>
*/
public static final int HTPPD_LOG_SUB_SCAN_VALUE = 51;
/**
* <code>IMAGE_SUB_SCAN = 52;</code>
*/
public static final int IMAGE_SUB_SCAN_VALUE = 52;
/**
* <code>SEQUENCE_SUB_SCAN = 53;</code>
*/
public static final int SEQUENCE_SUB_SCAN_VALUE = 53;


public final int getNumber() { return value; }
@@ -787,6 +851,14 @@ public static CoreOperatorType valueOf(int value) {
case 43: return HIVE_DRILL_NATIVE_PARQUET_ROW_GROUP_SCAN;
case 44: return JDBC_SCAN;
case 45: return REGEX_SUB_SCAN;
case 46: return MAPRDB_SUB_SCAN;
case 47: return MONGO_SUB_SCAN;
case 48: return KUDU_WRITER;
case 49: return OPEN_TSDB_SUB_SCAN;
case 50: return JSON_WRITER;
case 51: return HTPPD_LOG_SUB_SCAN;
case 52: return IMAGE_SUB_SCAN;
case 53: return SEQUENCE_SUB_SCAN;
default: return null;
}
}
@@ -24323,7 +24395,7 @@ public Builder clearStatus() {
"TATEMENT\020\005*\207\001\n\rFragmentState\022\013\n\007SENDING\020" +
"\000\022\027\n\023AWAITING_ALLOCATION\020\001\022\013\n\007RUNNING\020\002\022" +
"\014\n\010FINISHED\020\003\022\r\n\tCANCELLED\020\004\022\n\n\006FAILED\020\005" +
"\022\032\n\026CANCELLATION_REQUESTED\020\006*\223\007\n\020CoreOpe" +
"\022\032\n\026CANCELLATION_REQUESTED\020\006*\271\010\n\020CoreOpe" +
"ratorType\022\021\n\rSINGLE_SENDER\020\000\022\024\n\020BROADCAS" +
"T_SENDER\020\001\022\n\n\006FILTER\020\002\022\022\n\016HASH_AGGREGATE" +
"\020\003\022\r\n\tHASH_JOIN\020\004\022\016\n\nMERGE_JOIN\020\005\022\031\n\025HAS" +
@@ -24346,11 +24418,15 @@ public Builder clearStatus() {
"N\020&\022\021\n\rKUDU_SUB_SCAN\020\'\022\013\n\007FLATTEN\020(\022\020\n\014L" +
"ATERAL_JOIN\020)\022\n\n\006UNNEST\020*\022,\n(HIVE_DRILL_" +
"NATIVE_PARQUET_ROW_GROUP_SCAN\020+\022\r\n\tJDBC_" +
"SCAN\020,\022\022\n\016REGEX_SUB_SCAN\020-*g\n\nSaslStatus" +
"\022\020\n\014SASL_UNKNOWN\020\000\022\016\n\nSASL_START\020\001\022\024\n\020SA" +
"SL_IN_PROGRESS\020\002\022\020\n\014SASL_SUCCESS\020\003\022\017\n\013SA" +
"SL_FAILED\020\004B.\n\033org.apache.drill.exec.pro",
"toB\rUserBitSharedH\001"
"SCAN\020,\022\022\n\016REGEX_SUB_SCAN\020-\022\023\n\017MAPRDB_SUB" +
"_SCAN\020.\022\022\n\016MONGO_SUB_SCAN\020/\022\017\n\013KUDU_WRIT" +
"ER\0200\022\026\n\022OPEN_TSDB_SUB_SCAN\0201\022\017\n\013JSON_WRI" +
"TER\0202\022\026\n\022HTPPD_LOG_SUB_SCAN\0203\022\022\n\016IMAGE_S",
"UB_SCAN\0204\022\025\n\021SEQUENCE_SUB_SCAN\0205*g\n\nSasl" +
"Status\022\020\n\014SASL_UNKNOWN\020\000\022\016\n\nSASL_START\020\001" +
"\022\024\n\020SASL_IN_PROGRESS\020\002\022\020\n\014SASL_SUCCESS\020\003" +
"\022\017\n\013SASL_FAILED\020\004B.\n\033org.apache.drill.ex" +
"ec.protoB\rUserBitSharedH\001"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {

0 comments on commit e76e389

Please sign in to comment.