{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/17661","repository_url":"https://api.github.com/repos/elastic/elasticsearch","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/17661/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/17661/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/17661/events","html_url":"https://github.com/elastic/elasticsearch/pull/17661","id":147536443,"number":17661,"title":"Make AllocationCommands NamedWriteables","user":{"login":"nik9000","id":215970,"avatar_url":"https://avatars.githubusercontent.com/u/215970?v=3","gravatar_id":"","url":"https://api.github.com/users/nik9000","html_url":"https://github.com/nik9000","followers_url":"https://api.github.com/users/nik9000/followers","following_url":"https://api.github.com/users/nik9000/following{/other_user}","gists_url":"https://api.github.com/users/nik9000/gists{/gist_id}","starred_url":"https://api.github.com/users/nik9000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nik9000/subscriptions","organizations_url":"https://api.github.com/users/nik9000/orgs","repos_url":"https://api.github.com/users/nik9000/repos","events_url":"https://api.github.com/users/nik9000/events{/privacy}","received_events_url":"https://api.github.com/users/nik9000/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Internal","name":":Internal","color":"009800"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/enhancement","name":"enhancement","color":"4a4ea8"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/review","name":"review","color":"0052cc"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/v5.0.0","name":"v5.0.0","color":"dddddd"}],"state":"open","locked":false,"assignee":{"login":"ywelsch","id":3718355,"avatar_url":"https://avatars.githubusercontent.com/u/3718355?v=3","gravatar_id":"","url":"https://api.github.com/users/ywelsch","html_url":"https://github.com/ywelsch","followers_url":"https://api.github.com/users/ywelsch/followers","following_url":"https://api.github.com/users/ywelsch/following{/other_user}","gists_url":"https://api.github.com/users/ywelsch/gists{/gist_id}","starred_url":"https://api.github.com/users/ywelsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ywelsch/subscriptions","organizations_url":"https://api.github.com/users/ywelsch/orgs","repos_url":"https://api.github.com/users/ywelsch/repos","events_url":"https://api.github.com/users/ywelsch/events{/privacy}","received_events_url":"https://api.github.com/users/ywelsch/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-04-11T19:54:31Z","updated_at":"2016-04-11T19:58:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/17661","html_url":"https://github.com/elastic/elasticsearch/pull/17661","diff_url":"https://github.com/elastic/elasticsearch/pull/17661.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/17661.patch"},"body":"The cluster reroute API had a copy of NamedWriteableRegistry's behavior\r\ninside it in the form of AllocationCommands#registerFactory and\r\nAllocationCommands#lookupFactorySafe. There isn't a reason to duplicate\r\nthat effort. So this replaces all of AllocationCommand#Factory with\r\nquery-like registration in NetworkModule."},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/208530537","html_url":"https://github.com/elastic/elasticsearch/pull/17661#issuecomment-208530537","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/17661","id":208530537,"user":{"login":"nik9000","id":215970,"avatar_url":"https://avatars.githubusercontent.com/u/215970?v=3","gravatar_id":"","url":"https://api.github.com/users/nik9000","html_url":"https://github.com/nik9000","followers_url":"https://api.github.com/users/nik9000/followers","following_url":"https://api.github.com/users/nik9000/following{/other_user}","gists_url":"https://api.github.com/users/nik9000/gists{/gist_id}","starred_url":"https://api.github.com/users/nik9000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nik9000/subscriptions","organizations_url":"https://api.github.com/users/nik9000/orgs","repos_url":"https://api.github.com/users/nik9000/repos","events_url":"https://api.github.com/users/nik9000/events{/privacy}","received_events_url":"https://api.github.com/users/nik9000/received_events","type":"User","site_admin":false},"created_at":"2016-04-11T19:58:23Z","updated_at":"2016-04-11T19:58:23Z","body":"@ywelsch is this a thing you can review? It makes the allocation commands use the NamedWriteable infrastructure that we have for queries and other similar things rather than it's own thing. It removes the whole Factory interface in favor of the (now standard) Writeable.Reader interface and an AllocationCommand.Parser interface for the xcontent parsing.\r\n\r\n@cbuescher this is an interesting detour/side effect of my PROTOTYPE hunt. In this case these didn't have explicit prototypes but they implemented StreamableReader which is a red flag for me."}}