{"action":"created","comment":{"url":"https://api.github.com/repos/caskdata/cdap/pulls/comments/80317039","id":80317039,"diff_hunk":"@@ -178,20 +180,23 @@ private EndpointStrategy discoverService(CacheKey key)\n   private EndpointStrategy discoverDefaultService(CacheKey key)\n     throws UnsupportedEncodingException, ExecutionException {\n     // Try only path routing\n-    String lookupService = genLookupName(key.getService(), DEFAULT_SERVICE_NAME, key.getFirstPathPart());\n-    return discover(lookupService);\n+    String lookupService = genLookupName(key.getRouteDestination().getServiceName(),\n+                                         DEFAULT_SERVICE_NAME, key.getFirstPathPart());\n+    return discover(new RouteDestination(lookupService));\n   }\n \n-  private EndpointStrategy discover(String discoverName) throws ExecutionException {\n-    LOG.debug(\"Looking up service name {}\", discoverName);\n+  private EndpointStrategy discover(RouteDestination routeDestination) throws ExecutionException {\n+    LOG.debug(\"Looking up service name {}\", routeDestination);\n     // If its a user service, then use DistributionEndpoint Strategy\n-    ServiceDiscovered serviceDiscovered = discoveryServiceClient.discover(discoverName);\n+    String serviceName = routeDestination.getServiceName();\n+    ServiceDiscovered serviceDiscovered = discoveryServiceClient.discover(serviceName);\n \n-    EndpointStrategy endpointStrategy = ServiceDiscoverable.isServiceDiscoverable(discoverName) ?\n-      new DistributionEndpointStrategy(serviceDiscovered, routeStore, ServiceDiscoverable.getId(discoverName)) :\n+    EndpointStrategy endpointStrategy = ServiceDiscoverable.isServiceDiscoverable(serviceName) ?\n+      new DistributionEndpointStrategy(serviceDiscovered, routeStore, ServiceDiscoverable.getId(serviceName),","path":"cdap-gateway/src/main/java/co/cask/cdap/gateway/router/RouterServiceLookup.java","position":87,"original_position":87,"commit_id":"46633c5535c928f41d0a9bc5a42e66a05544d116","original_commit_id":"ad5ee90e9d93450c4c3916d32e311d3f197b4536","user":{"login":"poornachandra","id":3181212,"avatar_url":"https://avatars.githubusercontent.com/u/3181212?v=3","gravatar_id":"","url":"https://api.github.com/users/poornachandra","html_url":"https://github.com/poornachandra","followers_url":"https://api.github.com/users/poornachandra/followers","following_url":"https://api.github.com/users/poornachandra/following{/other_user}","gists_url":"https://api.github.com/users/poornachandra/gists{/gist_id}","starred_url":"https://api.github.com/users/poornachandra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poornachandra/subscriptions","organizations_url":"https://api.github.com/users/poornachandra/orgs","repos_url":"https://api.github.com/users/poornachandra/repos","events_url":"https://api.github.com/users/poornachandra/events{/privacy}","received_events_url":"https://api.github.com/users/poornachandra/received_events","type":"User","site_admin":false},"body":"I see. Let's call it `UserServiceEndpointStrategy`, and also call `payloadFilter` as `version` then.","created_at":"2016-09-23T20:03:33Z","updated_at":"2016-09-23T20:03:33Z","html_url":"https://github.com/caskdata/cdap/pull/6779#discussion_r80317039","pull_request_url":"https://api.github.com/repos/caskdata/cdap/pulls/6779","_links":{"self":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/comments/80317039"},"html":{"href":"https://github.com/caskdata/cdap/pull/6779#discussion_r80317039"},"pull_request":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/6779"}}},"pull_request":{"url":"https://api.github.com/repos/caskdata/cdap/pulls/6779","id":86284851,"html_url":"https://github.com/caskdata/cdap/pull/6779","diff_url":"https://github.com/caskdata/cdap/pull/6779.diff","patch_url":"https://github.com/caskdata/cdap/pull/6779.patch","issue_url":"https://api.github.com/repos/caskdata/cdap/issues/6779","number":6779,"state":"open","locked":false,"title":"CDAP-7305 Deterministic routing in distributed mode","user":{"login":"gokulavasan","id":558459,"avatar_url":"https://avatars.githubusercontent.com/u/558459?v=3","gravatar_id":"","url":"https://api.github.com/users/gokulavasan","html_url":"https://github.com/gokulavasan","followers_url":"https://api.github.com/users/gokulavasan/followers","following_url":"https://api.github.com/users/gokulavasan/following{/other_user}","gists_url":"https://api.github.com/users/gokulavasan/gists{/gist_id}","starred_url":"https://api.github.com/users/gokulavasan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gokulavasan/subscriptions","organizations_url":"https://api.github.com/users/gokulavasan/orgs","repos_url":"https://api.github.com/users/gokulavasan/repos","events_url":"https://api.github.com/users/gokulavasan/events{/privacy}","received_events_url":"https://api.github.com/users/gokulavasan/received_events","type":"User","site_admin":false},"body":"JIRA : https://issues.cask.co/browse/CDAP-7305\r\n\r\nBuild : http://builds.cask.co/browse/CDAP-RUT181","created_at":"2016-09-22T06:28:56Z","updated_at":"2016-09-23T20:03:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6c20a2eac152c82c0a04ba02eb55ccee1effea53","assignee":{"login":"poornachandra","id":3181212,"avatar_url":"https://avatars.githubusercontent.com/u/3181212?v=3","gravatar_id":"","url":"https://api.github.com/users/poornachandra","html_url":"https://github.com/poornachandra","followers_url":"https://api.github.com/users/poornachandra/followers","following_url":"https://api.github.com/users/poornachandra/following{/other_user}","gists_url":"https://api.github.com/users/poornachandra/gists{/gist_id}","starred_url":"https://api.github.com/users/poornachandra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poornachandra/subscriptions","organizations_url":"https://api.github.com/users/poornachandra/orgs","repos_url":"https://api.github.com/users/poornachandra/repos","events_url":"https://api.github.com/users/poornachandra/events{/privacy}","received_events_url":"https://api.github.com/users/poornachandra/received_events","type":"User","site_admin":false},"assignees":[{"login":"poornachandra","id":3181212,"avatar_url":"https://avatars.githubusercontent.com/u/3181212?v=3","gravatar_id":"","url":"https://api.github.com/users/poornachandra","html_url":"https://github.com/poornachandra","followers_url":"https://api.github.com/users/poornachandra/followers","following_url":"https://api.github.com/users/poornachandra/following{/other_user}","gists_url":"https://api.github.com/users/poornachandra/gists{/gist_id}","starred_url":"https://api.github.com/users/poornachandra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poornachandra/subscriptions","organizations_url":"https://api.github.com/users/poornachandra/orgs","repos_url":"https://api.github.com/users/poornachandra/repos","events_url":"https://api.github.com/users/poornachandra/events{/privacy}","received_events_url":"https://api.github.com/users/poornachandra/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/caskdata/cdap/pulls/6779/commits","review_comments_url":"https://api.github.com/repos/caskdata/cdap/pulls/6779/comments","review_comment_url":"https://api.github.com/repos/caskdata/cdap/pulls/comments{/number}","comments_url":"https://api.github.com/repos/caskdata/cdap/issues/6779/comments","statuses_url":"https://api.github.com/repos/caskdata/cdap/statuses/46633c5535c928f41d0a9bc5a42e66a05544d116","head":{"label":"caskdata:fix/cdap-7305","ref":"fix/cdap-7305","sha":"46633c5535c928f41d0a9bc5a42e66a05544d116","user":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=3","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"repo":{"id":22542759,"name":"cdap","full_name":"caskdata/cdap","owner":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=3","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/caskdata/cdap","description":"Cask Data Application Platform (CDAP)","fork":false,"url":"https://api.github.com/repos/caskdata/cdap","forks_url":"https://api.github.com/repos/caskdata/cdap/forks","keys_url":"https://api.github.com/repos/caskdata/cdap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caskdata/cdap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caskdata/cdap/teams","hooks_url":"https://api.github.com/repos/caskdata/cdap/hooks","issue_events_url":"https://api.github.com/repos/caskdata/cdap/issues/events{/number}","events_url":"https://api.github.com/repos/caskdata/cdap/events","assignees_url":"https://api.github.com/repos/caskdata/cdap/assignees{/user}","branches_url":"https://api.github.com/repos/caskdata/cdap/branches{/branch}","tags_url":"https://api.github.com/repos/caskdata/cdap/tags","blobs_url":"https://api.github.com/repos/caskdata/cdap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caskdata/cdap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caskdata/cdap/git/refs{/sha}","trees_url":"https://api.github.com/repos/caskdata/cdap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caskdata/cdap/statuses/{sha}","languages_url":"https://api.github.com/repos/caskdata/cdap/languages","stargazers_url":"https://api.github.com/repos/caskdata/cdap/stargazers","contributors_url":"https://api.github.com/repos/caskdata/cdap/contributors","subscribers_url":"https://api.github.com/repos/caskdata/cdap/subscribers","subscription_url":"https://api.github.com/repos/caskdata/cdap/subscription","commits_url":"https://api.github.com/repos/caskdata/cdap/commits{/sha}","git_commits_url":"https://api.github.com/repos/caskdata/cdap/git/commits{/sha}","comments_url":"https://api.github.com/repos/caskdata/cdap/comments{/number}","issue_comment_url":"https://api.github.com/repos/caskdata/cdap/issues/comments{/number}","contents_url":"https://api.github.com/repos/caskdata/cdap/contents/{+path}","compare_url":"https://api.github.com/repos/caskdata/cdap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caskdata/cdap/merges","archive_url":"https://api.github.com/repos/caskdata/cdap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caskdata/cdap/downloads","issues_url":"https://api.github.com/repos/caskdata/cdap/issues{/number}","pulls_url":"https://api.github.com/repos/caskdata/cdap/pulls{/number}","milestones_url":"https://api.github.com/repos/caskdata/cdap/milestones{/number}","notifications_url":"https://api.github.com/repos/caskdata/cdap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caskdata/cdap/labels{/name}","releases_url":"https://api.github.com/repos/caskdata/cdap/releases{/id}","deployments_url":"https://api.github.com/repos/caskdata/cdap/deployments","created_at":"2014-08-02T09:00:10Z","updated_at":"2016-09-19T08:39:40Z","pushed_at":"2016-09-23T19:55:49Z","git_url":"git://github.com/caskdata/cdap.git","ssh_url":"git@github.com:caskdata/cdap.git","clone_url":"https://github.com/caskdata/cdap.git","svn_url":"https://github.com/caskdata/cdap","homepage":"http://cdap.io","size":651889,"stargazers_count":137,"watchers_count":137,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":54,"mirror_url":null,"open_issues_count":10,"forks":54,"open_issues":10,"watchers":137,"default_branch":"develop"}},"base":{"label":"caskdata:release/3.6","ref":"release/3.6","sha":"63c177894c7278f26bf413c0bd2784973b8d1869","user":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=3","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"repo":{"id":22542759,"name":"cdap","full_name":"caskdata/cdap","owner":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=3","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/caskdata/cdap","description":"Cask Data Application Platform (CDAP)","fork":false,"url":"https://api.github.com/repos/caskdata/cdap","forks_url":"https://api.github.com/repos/caskdata/cdap/forks","keys_url":"https://api.github.com/repos/caskdata/cdap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caskdata/cdap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caskdata/cdap/teams","hooks_url":"https://api.github.com/repos/caskdata/cdap/hooks","issue_events_url":"https://api.github.com/repos/caskdata/cdap/issues/events{/number}","events_url":"https://api.github.com/repos/caskdata/cdap/events","assignees_url":"https://api.github.com/repos/caskdata/cdap/assignees{/user}","branches_url":"https://api.github.com/repos/caskdata/cdap/branches{/branch}","tags_url":"https://api.github.com/repos/caskdata/cdap/tags","blobs_url":"https://api.github.com/repos/caskdata/cdap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caskdata/cdap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caskdata/cdap/git/refs{/sha}","trees_url":"https://api.github.com/repos/caskdata/cdap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caskdata/cdap/statuses/{sha}","languages_url":"https://api.github.com/repos/caskdata/cdap/languages","stargazers_url":"https://api.github.com/repos/caskdata/cdap/stargazers","contributors_url":"https://api.github.com/repos/caskdata/cdap/contributors","subscribers_url":"https://api.github.com/repos/caskdata/cdap/subscribers","subscription_url":"https://api.github.com/repos/caskdata/cdap/subscription","commits_url":"https://api.github.com/repos/caskdata/cdap/commits{/sha}","git_commits_url":"https://api.github.com/repos/caskdata/cdap/git/commits{/sha}","comments_url":"https://api.github.com/repos/caskdata/cdap/comments{/number}","issue_comment_url":"https://api.github.com/repos/caskdata/cdap/issues/comments{/number}","contents_url":"https://api.github.com/repos/caskdata/cdap/contents/{+path}","compare_url":"https://api.github.com/repos/caskdata/cdap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caskdata/cdap/merges","archive_url":"https://api.github.com/repos/caskdata/cdap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caskdata/cdap/downloads","issues_url":"https://api.github.com/repos/caskdata/cdap/issues{/number}","pulls_url":"https://api.github.com/repos/caskdata/cdap/pulls{/number}","milestones_url":"https://api.github.com/repos/caskdata/cdap/milestones{/number}","notifications_url":"https://api.github.com/repos/caskdata/cdap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caskdata/cdap/labels{/name}","releases_url":"https://api.github.com/repos/caskdata/cdap/releases{/id}","deployments_url":"https://api.github.com/repos/caskdata/cdap/deployments","created_at":"2014-08-02T09:00:10Z","updated_at":"2016-09-19T08:39:40Z","pushed_at":"2016-09-23T19:55:49Z","git_url":"git://github.com/caskdata/cdap.git","ssh_url":"git@github.com:caskdata/cdap.git","clone_url":"https://github.com/caskdata/cdap.git","svn_url":"https://github.com/caskdata/cdap","homepage":"http://cdap.io","size":651889,"stargazers_count":137,"watchers_count":137,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":54,"mirror_url":null,"open_issues_count":10,"forks":54,"open_issues":10,"watchers":137,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/6779"},"html":{"href":"https://github.com/caskdata/cdap/pull/6779"},"issue":{"href":"https://api.github.com/repos/caskdata/cdap/issues/6779"},"comments":{"href":"https://api.github.com/repos/caskdata/cdap/issues/6779/comments"},"review_comments":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/6779/comments"},"review_comment":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/caskdata/cdap/pulls/6779/commits"},"statuses":{"href":"https://api.github.com/repos/caskdata/cdap/statuses/46633c5535c928f41d0a9bc5a42e66a05544d116"}}}}
{"actor":{"display_login":"poornachandra"}}