linkedin/cruise-control-ui

Error 500 in CC UI resource distribution if 0 valid windows

jrevillard opened this issue · 7 comments

It displays error 500 instead of an appropriate message. Server logs:

cruise-control_1        | Caused by: com.linkedin.cruisecontrol.exception.NotEnoughValidWindowsException: There are only 0 valid windows when aggregating in range [-1, 1610215532372] for aggregation options (minValidEntityRatio=0.95, minValidEntityGroupRatio=0.00, minValidWindows=1, numEntitiesToInclude=104, granularity=ENTITY)
cruise-control_1        | 	at com.linkedin.cruisecontrol.monitor.sampling.aggregator.MetricSampleAggregator.validateCompleteness(MetricSampleAggregator.java:541)
cruise-control_1        | 	at com.linkedin.cruisecontrol.monitor.sampling.aggregator.MetricSampleAggregator.aggregate(MetricSampleAggregator.java:213)
cruise-control_1        | 	at com.linkedin.kafka.cruisecontrol.monitor.sampling.aggregator.KafkaPartitionMetricSampleAggregator.aggregate(KafkaPartitionMetricSampleAggregator.java:151)
cruise-control_1        | 	at com.linkedin.kafka.cruisecontrol.monitor.LoadMonitor.clusterModel(LoadMonitor.java:544)
cruise-control_1        | 	at com.linkedin.kafka.cruisecontrol.KafkaCruiseControl.clusterModel(KafkaCruiseControl.java:350)
cruise-control_1        | 	at com.linkedin.kafka.cruisecontrol.servlet.handler.async.runnable.LoadRunnable.clusterModel(LoadRunnable.java:111)
cruise-control_1        | 	... 10 more

Best
Jerome

Just for information, if another topic is created and if it does not have enough data, nothing is shown for the others too (same, error 500)

A (anonymized) screenshot would be helpful in this case. UI is supposed to show this error message inline. which end point is throwing this 5xx error ?

@optplx can you help with this ?

Hello @nareshv @jrevillard , #62 fixes this to display the full error message as bellow. Would that be ok for you?

For your second point @jrevillard , since the whole page relies on a single API call it is not in the scope to ignore the error and loop over the rest of the topics. This could probably be implemented using the topic parameter to chose which topics to display (see https://github.com/linkedin/cruise-control/wiki/REST-APIs#query-partition-resource-utilization)

image

Thanks @optplx, yes perfect.

Thanks @optplx and @jrevillard . Closing this ticket as PR is merged.