i3wangyi commented on a change in pull request #359: Dynamically change the
processor thread name when consuming event
URL: https://github.com/apache/helix/pull/359#discussion_r308470742
##########
File path:
helix-core/src/main/java/org/apache/helix/controller/GenericHelixController.java
##########
@@ -1152,20 +1151,31 @@ private boolean
updateControllerState(NotificationContext changeContext, PauseSi
ClusterEventProcessor(BaseControllerDataProvider cache,
ClusterEventBlockingQueue eventBlockingQueue, String processorName) {
- super("HelixController-pipeline-" + processorName);
_cache = cache;
_eventBlockingQueue = eventBlockingQueue;
_processorName = processorName;
}
+ private String getThreadName(String eventId) {
+ String threadName = "HelixController-pipeline-" + _processorName;
+ if (!eventId.isEmpty()) {
+ threadName += "(" + eventId + ")";
Review comment:
It's a tiny difference and got easy fixed.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services