[ https://issues.apache.org/jira/browse/DRILL-6639?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16562557#comment-16562557 ]
ASF GitHub Bot commented on DRILL-6639: --------------------------------------- ilooner closed pull request #1404: DRILL-6639: Exception happens while displaying operator profiles for … URL: https://github.com/apache/drill/pull/1404 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/MapRDBSubScan.java b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/MapRDBSubScan.java index 95471863660..c6dfda45ae0 100644 --- a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/MapRDBSubScan.java +++ b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/mapr/db/MapRDBSubScan.java @@ -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 PhysicalOperator getNewWithChildren(List<PhysicalOperator> children) { @Override public int getOperatorType() { - return 1001; + return CoreOperatorType.MAPRDB_SUB_SCAN_VALUE; } @JsonIgnore diff --git a/contrib/native/client/src/protobuf/UserBitShared.pb.cc b/contrib/native/client/src/protobuf/UserBitShared.pb.cc index e6366a367a5..282f581c5b6 100644 --- a/contrib/native/client/src/protobuf/UserBitShared.pb.cc +++ b/contrib/native/client/src/protobuf/UserBitShared.pb.cc @@ -750,7 +750,7 @@ void protobuf_AddDesc_UserBitShared_2eproto() { "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" @@ -773,11 +773,15 @@ void protobuf_AddDesc_UserBitShared_2eproto() { "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", 5219); + "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", 5385); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( "UserBitShared.proto", &protobuf_RegisterTypes); UserCredentials::default_instance_ = new UserCredentials(); @@ -944,6 +948,14 @@ bool CoreOperatorType_IsValid(int value) { case 43: case 44: case 45: + case 46: + case 47: + case 48: + case 49: + case 50: + case 51: + case 52: + case 53: return true; default: return false; diff --git a/contrib/native/client/src/protobuf/UserBitShared.pb.h b/contrib/native/client/src/protobuf/UserBitShared.pb.h index 6efeffb62ff..134dc2b500c 100644 --- a/contrib/native/client/src/protobuf/UserBitShared.pb.h +++ b/contrib/native/client/src/protobuf/UserBitShared.pb.h @@ -249,11 +249,19 @@ enum CoreOperatorType { UNNEST = 42, HIVE_DRILL_NATIVE_PARQUET_ROW_GROUP_SCAN = 43, JDBC_SCAN = 44, - REGEX_SUB_SCAN = 45 + REGEX_SUB_SCAN = 45, + MAPRDB_SUB_SCAN = 46, + MONGO_SUB_SCAN = 47, + KUDU_WRITER = 48, + OPEN_TSDB_SUB_SCAN = 49, + JSON_WRITER = 50, + HTPPD_LOG_SUB_SCAN = 51, + IMAGE_SUB_SCAN = 52, + SEQUENCE_SUB_SCAN = 53 }; bool CoreOperatorType_IsValid(int value); const CoreOperatorType CoreOperatorType_MIN = SINGLE_SENDER; -const CoreOperatorType CoreOperatorType_MAX = REGEX_SUB_SCAN; +const CoreOperatorType CoreOperatorType_MAX = SEQUENCE_SUB_SCAN; const int CoreOperatorType_ARRAYSIZE = CoreOperatorType_MAX + 1; const ::google::protobuf::EnumDescriptor* CoreOperatorType_descriptor(); diff --git a/contrib/storage-kudu/src/main/java/org/apache/drill/exec/store/kudu/KuduWriter.java b/contrib/storage-kudu/src/main/java/org/apache/drill/exec/store/kudu/KuduWriter.java index 88a6849d1ec..d0fa1581c57 100644 --- a/contrib/storage-kudu/src/main/java/org/apache/drill/exec/store/kudu/KuduWriter.java +++ b/contrib/storage-kudu/src/main/java/org/apache/drill/exec/store/kudu/KuduWriter.java @@ -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 diff --git a/contrib/storage-mongo/src/main/java/org/apache/drill/exec/store/mongo/MongoSubScan.java b/contrib/storage-mongo/src/main/java/org/apache/drill/exec/store/mongo/MongoSubScan.java index ed9f555c7dd..cff3f5700e8 100644 --- a/contrib/storage-mongo/src/main/java/org/apache/drill/exec/store/mongo/MongoSubScan.java +++ b/contrib/storage-mongo/src/main/java/org/apache/drill/exec/store/mongo/MongoSubScan.java @@ -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 diff --git a/contrib/storage-opentsdb/src/main/java/org/apache/drill/exec/store/openTSDB/OpenTSDBSubScan.java b/contrib/storage-opentsdb/src/main/java/org/apache/drill/exec/store/openTSDB/OpenTSDBSubScan.java index 4e938049b95..240d6610826 100644 --- a/contrib/storage-opentsdb/src/main/java/org/apache/drill/exec/store/openTSDB/OpenTSDBSubScan.java +++ b/contrib/storage-opentsdb/src/main/java/org/apache/drill/exec/store/openTSDB/OpenTSDBSubScan.java @@ -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 diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/config/IteratorValidator.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/config/IteratorValidator.java index 6494f9f5773..9fbef972621 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/config/IteratorValidator.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/config/IteratorValidator.java @@ -41,6 +41,7 @@ protected PhysicalOperator getNewWithChild(PhysicalOperator child) { @Override public int getOperatorType() { + // TODO: DRILL-6643: this implementation should be revisited return -1; } } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/config/Values.java b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/config/Values.java index f32ed3ac24d..445851132d0 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/config/Values.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/config/Values.java @@ -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; } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/OperatorWrapper.java b/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/OperatorWrapper.java index 0a4c4a58dae..85545e3d79a 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/OperatorWrapper.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/server/rest/profile/OperatorWrapper.java @@ -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) { diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/easy/EasyWriter.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/easy/EasyWriter.java index 52ce8b0328a..f0e7435418c 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/easy/EasyWriter.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/easy/EasyWriter.java @@ -101,6 +101,6 @@ protected PhysicalOperator getNewWithChild(PhysicalOperator child) { @Override public int getOperatorType() { - return formatPlugin.getReaderOperatorType(); + return formatPlugin.getWriterOperatorType(); } } diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/json/JSONFormatPlugin.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/json/JSONFormatPlugin.java index 5eec5cc6e24..c42bbd3c782 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/json/JSONFormatPlugin.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/json/JSONFormatPlugin.java @@ -144,7 +144,7 @@ public int getReaderOperatorType() { @Override public int getWriterOperatorType() { - throw new UnsupportedOperationException(); + return CoreOperatorType.JSON_WRITER_VALUE; } @Override diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/sequencefile/SequenceFileFormatPlugin.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/sequencefile/SequenceFileFormatPlugin.java index ec480ae0242..2da44753afb 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/sequencefile/SequenceFileFormatPlugin.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/easy/sequencefile/SequenceFileFormatPlugin.java @@ -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 diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/httpd/HttpdLogFormatPlugin.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/httpd/HttpdLogFormatPlugin.java index cee9a89247c..23bd5d12be5 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/httpd/HttpdLogFormatPlugin.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/httpd/HttpdLogFormatPlugin.java @@ -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(); } -} \ No newline at end of file +} diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/image/ImageFormatPlugin.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/image/ImageFormatPlugin.java index 6b0b9b4933f..e26ae23b212 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/image/ImageFormatPlugin.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/image/ImageFormatPlugin.java @@ -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 diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/pcap/PcapFormatPlugin.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/pcap/PcapFormatPlugin.java index 0f24538d364..38cabbc0b84 100644 --- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/pcap/PcapFormatPlugin.java +++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/pcap/PcapFormatPlugin.java @@ -81,7 +81,7 @@ public int getReaderOperatorType() { @Override public int getWriterOperatorType() { - return 0; + throw new UnsupportedOperationException(); } @Override diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/UserBitShared.java b/protocol/src/main/java/org/apache/drill/exec/proto/UserBitShared.java index 0243ed5f59e..a8574f5aa6a 100644 --- a/protocol/src/main/java/org/apache/drill/exec/proto/UserBitShared.java +++ b/protocol/src/main/java/org/apache/drill/exec/proto/UserBitShared.java @@ -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() { diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/beans/CoreOperatorType.java b/protocol/src/main/java/org/apache/drill/exec/proto/beans/CoreOperatorType.java index 45b9cc11443..53af5719015 100644 --- a/protocol/src/main/java/org/apache/drill/exec/proto/beans/CoreOperatorType.java +++ b/protocol/src/main/java/org/apache/drill/exec/proto/beans/CoreOperatorType.java @@ -67,7 +67,15 @@ UNNEST(42), HIVE_DRILL_NATIVE_PARQUET_ROW_GROUP_SCAN(43), JDBC_SCAN(44), - REGEX_SUB_SCAN(45); + REGEX_SUB_SCAN(45), + MAPRDB_SUB_SCAN(46), + MONGO_SUB_SCAN(47), + KUDU_WRITER(48), + OPEN_TSDB_SUB_SCAN(49), + JSON_WRITER(50), + HTPPD_LOG_SUB_SCAN(51), + IMAGE_SUB_SCAN(52), + SEQUENCE_SUB_SCAN(53); public final int number; @@ -131,6 +139,14 @@ public static CoreOperatorType valueOf(int number) 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; } } diff --git a/protocol/src/main/protobuf/UserBitShared.proto b/protocol/src/main/protobuf/UserBitShared.proto index 47715a4c321..4c4960ec2e2 100644 --- a/protocol/src/main/protobuf/UserBitShared.proto +++ b/protocol/src/main/protobuf/UserBitShared.proto @@ -334,6 +334,14 @@ enum CoreOperatorType { HIVE_DRILL_NATIVE_PARQUET_ROW_GROUP_SCAN = 43; JDBC_SCAN = 44; REGEX_SUB_SCAN = 45; + MAPRDB_SUB_SCAN = 46; + MONGO_SUB_SCAN = 47; + KUDU_WRITER = 48; + OPEN_TSDB_SUB_SCAN = 49; + JSON_WRITER = 50; + HTPPD_LOG_SUB_SCAN = 51; + IMAGE_SUB_SCAN = 52; + SEQUENCE_SUB_SCAN = 53; } /* Registry that contains list of jars, each jar contains its name and list of function signatures. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Exception happens while displaying operator profiles for some queries > ---------------------------------------------------------------------- > > Key: DRILL-6639 > URL: https://issues.apache.org/jira/browse/DRILL-6639 > Project: Apache Drill > Issue Type: Bug > Affects Versions: 1.14.0 > Reporter: Anton Gozhiy > Assignee: Vitalii Diravka > Priority: Major > Labels: ready-to-commit > Fix For: 1.14.0 > > > *Prerequisites:* > *1.* Create a MapR-DB JSON table: > {noformat} > hadoop fs -mkdir /tmp/mdb_tabl > mapr dbshell > create /tmp/mdb_table/json > insert /tmp/mdb_table/json --value '{"_id":"movie0000002" , > "title":"Developers on the Edge", "studio":"Command Line Studios"}' > insert /tmp/mdb_table/json --id movie0000003 --value '{"title":"The Golden > Master", "studio":"All-Nighter"}' > {noformat} > *2.* Create a Hive external table: > {noformat} > CREATE EXTERNAL TABLE mapr_db_json_hive_tbl ( > movie_id string, title string, studio string) > STORED BY 'org.apache.hadoop.hive.maprdb.json.MapRDBJsonStorageHandler' > TBLPROPERTIES("maprdb.table.name" = "/tmp/mdb_table/json","maprdb.column.id" > = "movie_id"); > {noformat} > *3.* Enable Hive storage plugin in Drill: > {code:json} > { > "type": "hive", > "enabled": true, > "configProps": { > "hive.metastore.uris": "thrift://localhost:9083", > "fs.default.name": "maprfs:///", > "hive.metastore.sasl.enabled": "false" > } > } > {code} > *Steps:* > *1.* Run the following query: > {noformat} > select * from hive.`mapr_db_json_hive_tbl` > {noformat} > *2.* Open the query profile in the Drill UI, look at the Operator Profiles > *Expected result:* > Operator Profiles should be displayed > *Actual result:* > Exception displayed: > {code} > FreeMarker template error (DEBUG mode; use RETHROW in production!): Java > method > "org.apache.drill.exec.server.rest.profile.ProfileWrapper.getOperatorsOverview()" > threw an exception when invoked on > org.apache.drill.exec.server.rest.profile.ProfileWrapper object > "org.apache.drill.exec.server.rest.profile.ProfileWrapper@36c94e5"; see cause > exception in the Java stack trace. ---- FTL stack trace ("~" means > nesting-related): - Failed at: ${model.getOperatorsOverview()?no_esc} [in > template "rest/profile/profile.ftl" in macro "page_body" at line 338, column > 11] - Reached through: @page_body [in template "rest/generic.ftl" in macro > "page_html" at line 99, column 9] - Reached through: @page_html [in template > "rest/profile/profile.ftl" at line 474, column 1] ---- Java stack trace (for > programmers): ---- freemarker.core._TemplateModelException: [... Exception > message was already printed; see it above ...] at > freemarker.ext.beans._MethodUtil.newInvocationTemplateModelException(_MethodUtil.java:289) > at > freemarker.ext.beans._MethodUtil.newInvocationTemplateModelException(_MethodUtil.java:252) > at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:74) at > freemarker.core.MethodCall._eval(MethodCall.java:65) at > freemarker.core.Expression.eval(Expression.java:81) at > freemarker.core.BuiltInsForOutputFormatRelated$AbstractConverterBI.calculateResult(BuiltInsForOutputFormatRelated.java:50) > at > freemarker.core.MarkupOutputFormatBoundBuiltIn._eval(MarkupOutputFormatBoundBuiltIn.java:40) > at freemarker.core.Expression.eval(Expression.java:81) at > freemarker.core.DollarVariable.calculateInterpolatedStringOrMarkup(DollarVariable.java:96) > at freemarker.core.DollarVariable.accept(DollarVariable.java:59) at > freemarker.core.Environment.visit(Environment.java:362) at > freemarker.core.Environment.invoke(Environment.java:714) at > freemarker.core.UnifiedCall.accept(UnifiedCall.java:83) at > freemarker.core.Environment.visit(Environment.java:362) at > freemarker.core.Environment.invoke(Environment.java:714) at > freemarker.core.UnifiedCall.accept(UnifiedCall.java:83) at > freemarker.core.Environment.visit(Environment.java:326) at > freemarker.core.Environment.visit(Environment.java:332) at > freemarker.core.Environment.process(Environment.java:305) at > freemarker.template.Template.process(Template.java:378) at > org.glassfish.jersey.server.mvc.freemarker.FreemarkerViewProcessor.writeTo(FreemarkerViewProcessor.java:143) > at > org.glassfish.jersey.server.mvc.freemarker.FreemarkerViewProcessor.writeTo(FreemarkerViewProcessor.java:85) > at > org.glassfish.jersey.server.mvc.spi.ResolvedViewable.writeTo(ResolvedViewable.java:116) > at > org.glassfish.jersey.server.mvc.internal.ViewableMessageBodyWriter.writeTo(ViewableMessageBodyWriter.java:134) > at > org.glassfish.jersey.server.mvc.internal.ViewableMessageBodyWriter.writeTo(ViewableMessageBodyWriter.java:88) > at > org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.invokeWriteTo(WriterInterceptorExecutor.java:263) > at > org.glassfish.jersey.message.internal.WriterInterceptorExecutor$TerminalWriterInterceptor.aroundWriteTo(WriterInterceptorExecutor.java:250) > at > org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162) > at > org.glassfish.jersey.server.mvc.internal.TemplateMethodInterceptor.aroundWriteTo(TemplateMethodInterceptor.java:77) > at > org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162) > at > org.glassfish.jersey.server.internal.JsonWithPaddingInterceptor.aroundWriteTo(JsonWithPaddingInterceptor.java:103) > at > org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162) > at > org.glassfish.jersey.server.internal.MappableExceptionWrapperInterceptor.aroundWriteTo(MappableExceptionWrapperInterceptor.java:88) > at > org.glassfish.jersey.message.internal.WriterInterceptorExecutor.proceed(WriterInterceptorExecutor.java:162) > at > org.glassfish.jersey.message.internal.MessageBodyFactory.writeTo(MessageBodyFactory.java:1154) > at > org.glassfish.jersey.server.ServerRuntime$Responder.writeResponse(ServerRuntime.java:613) > at > org.glassfish.jersey.server.ServerRuntime$Responder.processResponse(ServerRuntime.java:375) > at > org.glassfish.jersey.server.ServerRuntime$Responder.process(ServerRuntime.java:365) > at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:272) > at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) at > org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) at > org.glassfish.jersey.internal.Errors.process(Errors.java:315) at > org.glassfish.jersey.internal.Errors.process(Errors.java:297) at > org.glassfish.jersey.internal.Errors.process(Errors.java:267) at > org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:297) > at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:252) > at > org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1023) > at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:372) > at > org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:382) > at > org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:345) > at > org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:220) > at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:738) at > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:551) at > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:219) > at > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1111) > at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:478) > at > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183) > at > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1045) > at > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) > at > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) > at org.eclipse.jetty.server.Server.handle(Server.java:462) at > org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:279) at > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:232) > at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:534) > at > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607) > at > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536) > at java.lang.Thread.run(Thread.java:748) Caused by: > java.lang.NullPointerException at > org.apache.drill.exec.server.rest.profile.OperatorWrapper.getSpillCycleMetricIndex(OperatorWrapper.java:258) > at > org.apache.drill.exec.server.rest.profile.OperatorWrapper.addSummary(OperatorWrapper.java:161) > at > org.apache.drill.exec.server.rest.profile.ProfileWrapper.getOperatorsOverview(ProfileWrapper.java:291) > at sun.reflect.GeneratedMethodAccessor196.invoke(Unknown Source) at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) at > freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:1487) at > freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:69) ... 64 > more > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)