[ https://issues.apache.org/jira/browse/DRILL-6724?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16619390#comment-16619390 ]
ASF GitHub Bot commented on DRILL-6724: --------------------------------------- KazydubB edited a comment on issue #1455: DRILL-6724: Dump operator context to logs when error occurs during query execution URL: https://github.com/apache/drill/pull/1455#issuecomment-422468101 @vdiravka regarding your concerns: - I suppose you are right that there is no need to dump all operators up to a failed one (though having this information may help recreating fragment operators in some cases). Dump from the failed batch might suffice in most cases. Maybe we should consider configuration parameter for number of batches to be dumped? - This `DumpCat` relies on Trace operator which should be injected to physical plan (see comments in [Implement Diagnostic Operator](https://issues.apache.org/jira/browse/DRILL-256)) and it seems that TraceInjector, which traverses the set of operators and injects trace operator before every operator is not invoked anywhere, since the trace operator does not support hyper vectors. Moreover this feature is poorly documented (and may appear unreliable as it is not being tested/accounted for since it was added almost 5 years ago and there are no recent jiras for the subject). And lastly, script to run this tool (`DumpCat`) is not shipped in Drill's distribution ([Remove dumpcat script from Drill distribution](https://issues.apache.org/jira/browse/DRILL-4751)) rendering it hard for users to use it. ---------------------------------------------------------------- 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 > Dump operator context to logs when error occurs during query execution > ---------------------------------------------------------------------- > > Key: DRILL-6724 > URL: https://issues.apache.org/jira/browse/DRILL-6724 > Project: Apache Drill > Issue Type: Improvement > Affects Versions: 1.14.0 > Reporter: Bohdan Kazydub > Assignee: Bohdan Kazydub > Priority: Major > Fix For: 1.15.0 > > > * Sometimes when an error occurs it may be helpful to have operator stack > with context data along with original stacktrace to help developers to track > down a failure. To achieve this, each operator should provide a context which > can be dumped to logs. In the end of FragmentExecutor's execution if the > state is FAILED the operator stack will be dumped to logs before exception > stacktrace. > > Dump example for case > [DRILL-6670|https://issues.apache.org/jira/projects/DRILL/issues/DRILL-6670] > (*Operator dump started* and *Operator dump completed* designate start and > end of dump respectively): > {code} > ... > 2018-09-17 08:26:34,392 [24609ac4-80f6-b318-7296-ee53c406a9f6:frag:0:0] INFO > o.a.d.e.w.fragment.FragmentExecutor - > 24609ac4-80f6-b318-7296-ee53c406a9f6:0:0: State change requested RUNNING --> > FAILED > 2018-09-17 08:26:34,392 [24609ac4-80f6-b318-7296-ee53c406a9f6:frag:0:0] INFO > o.a.d.e.physical.impl.BaseRootExec - Operator dump started. > 2018-09-17 08:26:34,392 [24609ac4-80f6-b318-7296-ee53c406a9f6:frag:0:0] INFO > o.a.d.e.p.i.p.ProjectRecordBatch - ProjectRecordBatch[projector=null, > hasRemainder=false, remainderIndex=0, recordCount=0] > 2018-09-17 08:26:34,392 [24609ac4-80f6-b318-7296-ee53c406a9f6:frag:0:0] INFO > o.a.d.exec.physical.impl.ScanBatch - > ScanBatch[container=org.apache.drill.exec.record.VectorContainer@383d6f45[recordCount > = 0, schemaChanged = true, schema = null, wrappers = [], ...], > currentReader=ParquetRecordReader[File=/home/mapr/example.parquet, Row group > index=0, Records in row group=1, Total records read=-1, > MetadataParquetMetaData{FileMetaData{schema: message schema { > optional binary name (UTF8); > optional binary creation_parameters (UTF8); > optional int64 creation_date (TIMESTAMP_MICROS); > optional int32 data_version; > optional int32 schema_version; > } > , metadata: \{pandas={"index_columns": [], "column_indexes": [], "columns": > [{"name": "name", "field_name": "name", "pandas_type": "unicode", > "numpy_type": "object", "metadata": null}, \{"name": "creation_parameters", > "field_name": "creation_parameters", "pandas_type": "unicode", "numpy_type": > "object", "metadata": null}, \{"name": "creation_date", "field_name": > "creation_date", "pandas_type": "datetime", "numpy_type": "datetime64[ns]", > "metadata": null}, \{"name": "data_version", "field_name": "data_version", > "pandas_type": "int32", "numpy_type": "int32", "metadata": null}, \{"name": > "schema_version", "field_name": "schema_version", "pandas_type": "int32", > "numpy_type": "int32", "metadata": null}], "pandas_version": "0.21.0"}}}, > blocks: [BlockMetaData\{1, 331 [ColumnMetaData{SNAPPY [name] optional binary > name (UTF8) [PLAIN, PLAIN_DICTIONARY, RLE], 27}, ColumnMetaData\{SNAPPY > [creation_parameters] optional binary creation_parameters (UTF8) [PLAIN, > PLAIN_DICTIONARY, RLE], 140}, ColumnMetaData\{SNAPPY [creation_date] optional > int64 creation_date (TIMESTAMP_MICROS) [PLAIN, PLAIN_DICTIONARY, RLE], 267}, > ColumnMetaData\{SNAPPY [data_version] optional int32 data_version [PLAIN, > PLAIN_DICTIONARY, RLE], 430}, ColumnMetaData\{SNAPPY [schema_version] > optional int32 schema_version [PLAIN, PLAIN_DICTIONARY, RLE], 567}]}]}], > schema=null] > 2018-09-17 08:26:34,392 [24609ac4-80f6-b318-7296-ee53c406a9f6:frag:0:0] INFO > o.a.d.e.physical.impl.BaseRootExec - Operator dump completed. > 2018-09-17 08:26:34,392 [24609ac4-80f6-b318-7296-ee53c406a9f6:frag:0:0] INFO > o.a.d.e.w.fragment.FragmentExecutor - > 24609ac4-80f6-b318-7296-ee53c406a9f6:0:0: State change requested FAILED --> > FINISHED > ... > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)