mayankshriv opened a new pull request #6977:
URL: https://github.com/apache/incubator-pinot/pull/6977


   Enhanced the existing endpoint for table deugging on controller as well as 
server
   to include segment state transition and consumption related errors and 
information.
   
   Note: This is a debug endpoint and should not be expected to maintain 
backward compatibility
   from user's perspective. It would, however, ensure that debug calls from 
controller to
   servers maintain compatibility.
   
   - TableDataManager now caches exceptions caused during segment consumption 
or state transition.
     Currently, only 100 exceptions are stored in each TableDataManager.
   
   - Table debug endpoint on server now returns:
     - Segment name and size
     - Consumption info
     - Error info
   
   - Table debug endpoint on the controller returns aggregated segment info's 
across all server
     in addition to existing broker and server info's.
   
   - By default, only segments with issues are reported. To report all 
segments, an optional
     parameter `verbose=true` can be specified in the api call.
   
   Sample output:
   
   ```
   [ {
     "tableName" : "rk_REALTIME",
     "numSegments" : 1,
     "numServers" : 1,
     "numBrokers" : 1,
     "segmentDebugInfos" : [ {
       "segmentName" : "rk__0__0__20210525T2349Z",
       "serverState" : {
         "Server_192.168.1.90_7000" : {
           "segmentSize" : "0 bytes",
           "consumerInfo" : {
             "segmentName" : "rk__0__0__20210525T2349Z",
             "consumerState" : "CONSUMING",
             "lastConsumedTimestamp" : 0,
             "partitionToOffsetMap" : {
               "0" : "1"
             }
           },
           "errorInfo" : {
             "timeStamp" : "2021-05-25 16:49:34 PDT",
             "error" : "Caught exception while transforming the record: {}",
             "exception" : "java.lang.RuntimeException: Caught exception while 
transforming data type for column: current_ts\n\tat 
org.apache.pinot.segment.local.recordtransformer.DataTypeTransformer.transform(DataTypeTransformer.java:120)\n\tat
 
org.apache.pinot.segment.local.recordtransformer.CompositeTransformer.transform(CompositeTransformer.java:82)\n\tat
 
org.apache.pinot.core.data.manager.realtime.LLRealtimeSegmentDataManager.processStreamEvents(LLRealtimeSegmentDataManager.java:510)\n\tat
 
org.apache.pinot.core.data.manager.realtime.LLRealtimeSegmentDataManager.consumeLoop(LLRealtimeSegmentDataManager.java:417)\n\tat
 
org.apache.pinot.core.data.manager.realtime.LLRealtimeSegmentDataManager$PartitionConsumer.run(LLRealtimeSegmentDataManager.java:560)\n\tat
 java.lang.Thread.run(Thread.java:748)\nCaused by: 
java.lang.NumberFormatException: For input string: 
\"2021-05-12T08:13:16.152000\"\n\tat 
java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)\n\tat
 java.l
 ang.Long.parseLong(Long.java:589)\n\tat 
java.lang.Long.parseLong(Long.java:631)\n\tat 
org.apache.pinot.common.utils.PinotDataType$10.toLong(PinotDataType.java:502)\n\tat
 
org.apache.pinot.common.utils.PinotDataType$6.convert(PinotDataType.java:333)\n\tat
 
org.apache.pinot.common.utils.PinotDataType$6.convert(PinotDataType.java:290)\n\tat
 
org.apache.pinot.segment.local.recordtransformer.DataTypeTransformer.transform(DataTypeTransformer.java:114)\n\t...
 5 more\n"
           },
           "isState" : "CONSUMING",
           "evState" : "CONSUMING"
         }
       }
     } ],
     "serverDebugInfos" : [ ],
     "brokerDebugInfos" : [ ],
     "tableSize" : {
       "reportedSize" : "0 bytes",
       "estimatedSize" : "0 bytes"
     }
   } ]
   ```
   
   ## Description
   <!-- Add a description of your PR here.
   A good description should include pointers to an issue or design document, 
etc.
   -->
   ## Upgrade Notes
   Does this PR prevent a zero down-time upgrade? (Assume upgrade order: 
Controller, Broker, Server, Minion)
   * [ ] Yes (Please label as **<code>backward-incompat</code>**, and complete 
the section below on Release Notes)
   
   Does this PR fix a zero-downtime upgrade introduced earlier?
   * [ ] Yes (Please label this as **<code>backward-incompat</code>**, and 
complete the section below on Release Notes)
   
   Does this PR otherwise need attention when creating release notes? Things to 
consider:
   - New configuration options
   - Deprecation of configurations
   - Signature changes to public methods/interfaces
   - New plugins added or old plugins removed
   * [ ] Yes (Please label this PR as **<code>release-notes</code>** and 
complete the section on Release Notes)
   ## Release Notes
   <!-- If you have tagged this as either backward-incompat or release-notes,
   you MUST add text here that you would like to see appear in release notes of 
the
   next release. -->
   
   <!-- If you have a series of commits adding or enabling a feature, then
   add this section only in final commit that marks the feature completed.
   Refer to earlier release notes to see examples of text.
   -->
   ## Documentation
   <!-- If you have introduced a new feature or configuration, please add it to 
the documentation as well.
   See 
https://docs.pinot.apache.org/developers/developers-and-contributors/update-document
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to