It forces to set ip/host/port in the service.
Per the title of this jira, that is the goal. Every token producer is required to use the same service field format to comply with the format needed by the token's selector. Currently every token producer has a copy-n-paste chunk selector's code to construct the service format. If the selector and the producer get out of sync, there's a big problem.
If we later decide to store something else in the service for example, uri with scheme, we will have to change it again.
Please elaborate? This appears as a non-sequitur since token producers that choose to use a URI (someday), for instance, will require a change in either case.
Here is the evolution from the original code of:
token.setService(new Text(addr.getAddress().getHostAddress() + ":" + addr.getPort()));
selector.selectToken(new Text(addr.getAddress().getHostAddress() + ":" + addr.getPort()), tokens);
I think is your suggestion? It's incrementally better, but continues to require a copy-n-paste in each token producer, and every token producer continues to have intimate knowledge of the service format.
The patch applies another layer of abstraction. The format is privatized to the token, instead of publicly diffused over all the tokens in hadoop.
Do you believe this a persuasive case for the patch?