mcvsubbu commented on a change in pull request #3749: Fix
SegmentStatusCheckerIntegrationTest setup timings
URL: https://github.com/apache/incubator-pinot/pull/3749#discussion_r251258383
##########
File path:
pinot-controller/src/main/java/org/apache/pinot/controller/helix/SegmentStatusChecker.java
##########
@@ -95,11 +94,21 @@ protected void preprocess() {
@Override
protected void processTable(String tableNameWithType) {
- updateSegmentMetrics(tableNameWithType);
+ try {
+ updateSegmentMetrics(tableNameWithType);
+ _numTablesProcessed ++;
+ } catch (Exception e) {
+ LOGGER.error("Caught exception while updating segment status for table
{}", tableNameWithType, e);
+
+ // Remove the metric for this table
+ resetTableMetrics(tableNameWithType);
+ }
}
@Override
protected void postprocess() {
+
_metricsRegistry.setValueOfGlobalGauge(ControllerGauge.SEGMENT_STATUS_CHECKER_NUM_TABLES_PROCESSED,
Review comment:
You should be able to do this in the base class using a variant of
_controllerMetrics.setValueOfTableGauge(). All that we need is to add a prefix
(or suffix) to a known metric name, as in this method, and we can do this with
the daemon name that we already have in the base class.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]