{"action":"created","comment":{"url":"https://api.github.com/repos/atomix/atomix/pulls/comments/224648090","pull_request_review_id":164070045,"id":224648090,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNDY0ODA5MA==","diff_hunk":"@@ -0,0 +1,172 @@\n+/*\n+ * Copyright 2018-present Open Networking Foundation\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package io.atomix.cluster.discovery;\n+\n+import com.google.common.base.Splitter;\n+import com.google.common.collect.ImmutableSet;\n+import com.google.common.collect.Maps;\n+import com.google.common.collect.Sets;\n+import io.atomix.cluster.BootstrapService;\n+import io.atomix.cluster.Node;\n+import io.atomix.cluster.NodeId;\n+import io.atomix.utils.event.AbstractListenerManager;\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+\n+import javax.naming.NamingEnumeration;\n+import javax.naming.NamingException;\n+import javax.naming.directory.DirContext;\n+import javax.naming.directory.InitialDirContext;\n+import java.util.Hashtable;\n+import java.util.Map;\n+import java.util.Set;\n+import java.util.concurrent.CompletableFuture;\n+import java.util.concurrent.Executors;\n+import java.util.concurrent.ScheduledExecutorService;\n+import java.util.concurrent.TimeUnit;\n+\n+import static com.google.common.base.Preconditions.checkNotNull;\n+import static io.atomix.utils.concurrent.Threads.namedThreads;\n+\n+/**\n+ * Cluster membership provider that uses DNS SRV lookups.\n+ */\n+public class DnsDiscoveryProvider\n+    extends AbstractListenerManager<NodeDiscoveryEvent, NodeDiscoveryEventListener>\n+    implements NodeDiscoveryProvider {\n+\n+  public static final Type TYPE = new Type();\n+\n+  /**\n+   * Creates a new bootstrap provider builder.\n+   *\n+   * @return a new bootstrap provider builder\n+   */\n+  public static BootstrapDiscoveryBuilder builder() {\n+    return new BootstrapDiscoveryBuilder();","path":"cluster/src/main/java/io/atomix/cluster/discovery/DnsDiscoveryProvider.java","position":59,"original_position":59,"commit_id":"37c0543e06ed08b8c2a545d9c026336b016bb677","original_commit_id":"37c0543e06ed08b8c2a545d9c026336b016bb677","user":{"login":"kuujo","id":823318,"node_id":"MDQ6VXNlcjgyMzMxOA==","avatar_url":"https://avatars3.githubusercontent.com/u/823318?v=4","gravatar_id":"","url":"https://api.github.com/users/kuujo","html_url":"https://github.com/kuujo","followers_url":"https://api.github.com/users/kuujo/followers","following_url":"https://api.github.com/users/kuujo/following{/other_user}","gists_url":"https://api.github.com/users/kuujo/gists{/gist_id}","starred_url":"https://api.github.com/users/kuujo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuujo/subscriptions","organizations_url":"https://api.github.com/users/kuujo/orgs","repos_url":"https://api.github.com/users/kuujo/repos","events_url":"https://api.github.com/users/kuujo/events{/privacy}","received_events_url":"https://api.github.com/users/kuujo/received_events","type":"User","site_admin":false},"body":"Returning the wrong provider","created_at":"2018-10-12T01:17:48Z","updated_at":"2018-10-12T01:17:48Z","html_url":"https://github.com/atomix/atomix/pull/872#discussion_r224648090","pull_request_url":"https://api.github.com/repos/atomix/atomix/pulls/872","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/atomix/atomix/pulls/comments/224648090"},"html":{"href":"https://github.com/atomix/atomix/pull/872#discussion_r224648090"},"pull_request":{"href":"https://api.github.com/repos/atomix/atomix/pulls/872"}}},"pull_request":{"url":"https://api.github.com/repos/atomix/atomix/pulls/872","id":220855078,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIwODU1MDc4","html_url":"https://github.com/atomix/atomix/pull/872","diff_url":"https://github.com/atomix/atomix/pull/872.diff","patch_url":"https://github.com/atomix/atomix/pull/872.patch","issue_url":"https://api.github.com/repos/atomix/atomix/issues/872","number":872,"state":"open","locked":false,"title":"DNS/SRV discovery provider","user":{"login":"kuujo","id":823318,"node_id":"MDQ6VXNlcjgyMzMxOA==","avatar_url":"https://avatars3.githubusercontent.com/u/823318?v=4","gravatar_id":"","url":"https://api.github.com/users/kuujo","html_url":"https://github.com/kuujo","followers_url":"https://api.github.com/users/kuujo/followers","following_url":"https://api.github.com/users/kuujo/following{/other_user}","gists_url":"https://api.github.com/users/kuujo/gists{/gist_id}","starred_url":"https://api.github.com/users/kuujo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuujo/subscriptions","organizations_url":"https://api.github.com/users/kuujo/orgs","repos_url":"https://api.github.com/users/kuujo/repos","events_url":"https://api.github.com/users/kuujo/events{/privacy}","received_events_url":"https://api.github.com/users/kuujo/received_events","type":"User","site_admin":false},"body":"This PR introduces a `NodeDiscoveryProvider` for DNS using SRV records. This provider can be used in Kubernetes to discover the host/port of Atomix nodes.\r\n\r\nThis is a work in progress. Need to merge earlier PRs and test in k8s before this can be reviewed and merged.","created_at":"2018-10-06T00:52:33Z","updated_at":"2018-10-12T01:17:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"00fdfb9ad691717e44d434d77a0566ba68557348","assignee":{"login":"kuujo","id":823318,"node_id":"MDQ6VXNlcjgyMzMxOA==","avatar_url":"https://avatars3.githubusercontent.com/u/823318?v=4","gravatar_id":"","url":"https://api.github.com/users/kuujo","html_url":"https://github.com/kuujo","followers_url":"https://api.github.com/users/kuujo/followers","following_url":"https://api.github.com/users/kuujo/following{/other_user}","gists_url":"https://api.github.com/users/kuujo/gists{/gist_id}","starred_url":"https://api.github.com/users/kuujo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuujo/subscriptions","organizations_url":"https://api.github.com/users/kuujo/orgs","repos_url":"https://api.github.com/users/kuujo/repos","events_url":"https://api.github.com/users/kuujo/events{/privacy}","received_events_url":"https://api.github.com/users/kuujo/received_events","type":"User","site_admin":false},"assignees":[{"login":"kuujo","id":823318,"node_id":"MDQ6VXNlcjgyMzMxOA==","avatar_url":"https://avatars3.githubusercontent.com/u/823318?v=4","gravatar_id":"","url":"https://api.github.com/users/kuujo","html_url":"https://github.com/kuujo","followers_url":"https://api.github.com/users/kuujo/followers","following_url":"https://api.github.com/users/kuujo/following{/other_user}","gists_url":"https://api.github.com/users/kuujo/gists{/gist_id}","starred_url":"https://api.github.com/users/kuujo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuujo/subscriptions","organizations_url":"https://api.github.com/users/kuujo/orgs","repos_url":"https://api.github.com/users/kuujo/repos","events_url":"https://api.github.com/users/kuujo/events{/privacy}","received_events_url":"https://api.github.com/users/kuujo/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"johnou","id":323497,"node_id":"MDQ6VXNlcjMyMzQ5Nw==","avatar_url":"https://avatars2.githubusercontent.com/u/323497?v=4","gravatar_id":"","url":"https://api.github.com/users/johnou","html_url":"https://github.com/johnou","followers_url":"https://api.github.com/users/johnou/followers","following_url":"https://api.github.com/users/johnou/following{/other_user}","gists_url":"https://api.github.com/users/johnou/gists{/gist_id}","starred_url":"https://api.github.com/users/johnou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnou/subscriptions","organizations_url":"https://api.github.com/users/johnou/orgs","repos_url":"https://api.github.com/users/johnou/repos","events_url":"https://api.github.com/users/johnou/events{/privacy}","received_events_url":"https://api.github.com/users/johnou/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/atomix/atomix/milestones/3","html_url":"https://github.com/atomix/atomix/milestone/3","labels_url":"https://api.github.com/repos/atomix/atomix/milestones/3/labels","id":3595103,"node_id":"MDk6TWlsZXN0b25lMzU5NTEwMw==","number":3,"title":"3.1.0","description":"","creator":{"login":"kuujo","id":823318,"node_id":"MDQ6VXNlcjgyMzMxOA==","avatar_url":"https://avatars3.githubusercontent.com/u/823318?v=4","gravatar_id":"","url":"https://api.github.com/users/kuujo","html_url":"https://github.com/kuujo","followers_url":"https://api.github.com/users/kuujo/followers","following_url":"https://api.github.com/users/kuujo/following{/other_user}","gists_url":"https://api.github.com/users/kuujo/gists{/gist_id}","starred_url":"https://api.github.com/users/kuujo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuujo/subscriptions","organizations_url":"https://api.github.com/users/kuujo/orgs","repos_url":"https://api.github.com/users/kuujo/repos","events_url":"https://api.github.com/users/kuujo/events{/privacy}","received_events_url":"https://api.github.com/users/kuujo/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":4,"state":"open","created_at":"2018-08-23T23:09:17Z","updated_at":"2018-10-12T01:17:12Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/atomix/atomix/pulls/872/commits","review_comments_url":"https://api.github.com/repos/atomix/atomix/pulls/872/comments","review_comment_url":"https://api.github.com/repos/atomix/atomix/pulls/comments{/number}","comments_url":"https://api.github.com/repos/atomix/atomix/issues/872/comments","statuses_url":"https://api.github.com/repos/atomix/atomix/statuses/37c0543e06ed08b8c2a545d9c026336b016bb677","head":{"label":"atomix:dns-provider","ref":"dns-provider","sha":"37c0543e06ed08b8c2a545d9c026336b016bb677","user":{"login":"atomix","id":14324067,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MzI0MDY3","avatar_url":"https://avatars3.githubusercontent.com/u/14324067?v=4","gravatar_id":"","url":"https://api.github.com/users/atomix","html_url":"https://github.com/atomix","followers_url":"https://api.github.com/users/atomix/followers","following_url":"https://api.github.com/users/atomix/following{/other_user}","gists_url":"https://api.github.com/users/atomix/gists{/gist_id}","starred_url":"https://api.github.com/users/atomix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atomix/subscriptions","organizations_url":"https://api.github.com/users/atomix/orgs","repos_url":"https://api.github.com/users/atomix/repos","events_url":"https://api.github.com/users/atomix/events{/privacy}","received_events_url":"https://api.github.com/users/atomix/received_events","type":"Organization","site_admin":false},"repo":{"id":16294920,"node_id":"MDEwOlJlcG9zaXRvcnkxNjI5NDkyMA==","name":"atomix","full_name":"atomix/atomix","private":false,"owner":{"login":"atomix","id":14324067,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MzI0MDY3","avatar_url":"https://avatars3.githubusercontent.com/u/14324067?v=4","gravatar_id":"","url":"https://api.github.com/users/atomix","html_url":"https://github.com/atomix","followers_url":"https://api.github.com/users/atomix/followers","following_url":"https://api.github.com/users/atomix/following{/other_user}","gists_url":"https://api.github.com/users/atomix/gists{/gist_id}","starred_url":"https://api.github.com/users/atomix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atomix/subscriptions","organizations_url":"https://api.github.com/users/atomix/orgs","repos_url":"https://api.github.com/users/atomix/repos","events_url":"https://api.github.com/users/atomix/events{/privacy}","received_events_url":"https://api.github.com/users/atomix/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/atomix/atomix","description":"A reactive Java framework for building fault-tolerant distributed systems","fork":false,"url":"https://api.github.com/repos/atomix/atomix","forks_url":"https://api.github.com/repos/atomix/atomix/forks","keys_url":"https://api.github.com/repos/atomix/atomix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atomix/atomix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atomix/atomix/teams","hooks_url":"https://api.github.com/repos/atomix/atomix/hooks","issue_events_url":"https://api.github.com/repos/atomix/atomix/issues/events{/number}","events_url":"https://api.github.com/repos/atomix/atomix/events","assignees_url":"https://api.github.com/repos/atomix/atomix/assignees{/user}","branches_url":"https://api.github.com/repos/atomix/atomix/branches{/branch}","tags_url":"https://api.github.com/repos/atomix/atomix/tags","blobs_url":"https://api.github.com/repos/atomix/atomix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atomix/atomix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atomix/atomix/git/refs{/sha}","trees_url":"https://api.github.com/repos/atomix/atomix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atomix/atomix/statuses/{sha}","languages_url":"https://api.github.com/repos/atomix/atomix/languages","stargazers_url":"https://api.github.com/repos/atomix/atomix/stargazers","contributors_url":"https://api.github.com/repos/atomix/atomix/contributors","subscribers_url":"https://api.github.com/repos/atomix/atomix/subscribers","subscription_url":"https://api.github.com/repos/atomix/atomix/subscription","commits_url":"https://api.github.com/repos/atomix/atomix/commits{/sha}","git_commits_url":"https://api.github.com/repos/atomix/atomix/git/commits{/sha}","comments_url":"https://api.github.com/repos/atomix/atomix/comments{/number}","issue_comment_url":"https://api.github.com/repos/atomix/atomix/issues/comments{/number}","contents_url":"https://api.github.com/repos/atomix/atomix/contents/{+path}","compare_url":"https://api.github.com/repos/atomix/atomix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atomix/atomix/merges","archive_url":"https://api.github.com/repos/atomix/atomix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atomix/atomix/downloads","issues_url":"https://api.github.com/repos/atomix/atomix/issues{/number}","pulls_url":"https://api.github.com/repos/atomix/atomix/pulls{/number}","milestones_url":"https://api.github.com/repos/atomix/atomix/milestones{/number}","notifications_url":"https://api.github.com/repos/atomix/atomix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atomix/atomix/labels{/name}","releases_url":"https://api.github.com/repos/atomix/atomix/releases{/id}","deployments_url":"https://api.github.com/repos/atomix/atomix/deployments","created_at":"2014-01-27T22:20:47Z","updated_at":"2018-10-12T01:03:57Z","pushed_at":"2018-10-12T01:17:14Z","git_url":"git://github.com/atomix/atomix.git","ssh_url":"git@github.com:atomix/atomix.git","clone_url":"https://github.com/atomix/atomix.git","svn_url":"https://github.com/atomix/atomix","homepage":"https://atomix.io","size":17338,"stargazers_count":1402,"watchers_count":1402,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":233,"mirror_url":null,"archived":false,"open_issues_count":27,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":233,"open_issues":27,"watchers":1402,"default_branch":"master"}},"base":{"label":"atomix:3.1","ref":"3.1","sha":"0a0112e3aa5d59d8178998ba9a32acc3ff2e3c71","user":{"login":"atomix","id":14324067,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MzI0MDY3","avatar_url":"https://avatars3.githubusercontent.com/u/14324067?v=4","gravatar_id":"","url":"https://api.github.com/users/atomix","html_url":"https://github.com/atomix","followers_url":"https://api.github.com/users/atomix/followers","following_url":"https://api.github.com/users/atomix/following{/other_user}","gists_url":"https://api.github.com/users/atomix/gists{/gist_id}","starred_url":"https://api.github.com/users/atomix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atomix/subscriptions","organizations_url":"https://api.github.com/users/atomix/orgs","repos_url":"https://api.github.com/users/atomix/repos","events_url":"https://api.github.com/users/atomix/events{/privacy}","received_events_url":"https://api.github.com/users/atomix/received_events","type":"Organization","site_admin":false},"repo":{"id":16294920,"node_id":"MDEwOlJlcG9zaXRvcnkxNjI5NDkyMA==","name":"atomix","full_name":"atomix/atomix","private":false,"owner":{"login":"atomix","id":14324067,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MzI0MDY3","avatar_url":"https://avatars3.githubusercontent.com/u/14324067?v=4","gravatar_id":"","url":"https://api.github.com/users/atomix","html_url":"https://github.com/atomix","followers_url":"https://api.github.com/users/atomix/followers","following_url":"https://api.github.com/users/atomix/following{/other_user}","gists_url":"https://api.github.com/users/atomix/gists{/gist_id}","starred_url":"https://api.github.com/users/atomix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atomix/subscriptions","organizations_url":"https://api.github.com/users/atomix/orgs","repos_url":"https://api.github.com/users/atomix/repos","events_url":"https://api.github.com/users/atomix/events{/privacy}","received_events_url":"https://api.github.com/users/atomix/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/atomix/atomix","description":"A reactive Java framework for building fault-tolerant distributed systems","fork":false,"url":"https://api.github.com/repos/atomix/atomix","forks_url":"https://api.github.com/repos/atomix/atomix/forks","keys_url":"https://api.github.com/repos/atomix/atomix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atomix/atomix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atomix/atomix/teams","hooks_url":"https://api.github.com/repos/atomix/atomix/hooks","issue_events_url":"https://api.github.com/repos/atomix/atomix/issues/events{/number}","events_url":"https://api.github.com/repos/atomix/atomix/events","assignees_url":"https://api.github.com/repos/atomix/atomix/assignees{/user}","branches_url":"https://api.github.com/repos/atomix/atomix/branches{/branch}","tags_url":"https://api.github.com/repos/atomix/atomix/tags","blobs_url":"https://api.github.com/repos/atomix/atomix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atomix/atomix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atomix/atomix/git/refs{/sha}","trees_url":"https://api.github.com/repos/atomix/atomix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atomix/atomix/statuses/{sha}","languages_url":"https://api.github.com/repos/atomix/atomix/languages","stargazers_url":"https://api.github.com/repos/atomix/atomix/stargazers","contributors_url":"https://api.github.com/repos/atomix/atomix/contributors","subscribers_url":"https://api.github.com/repos/atomix/atomix/subscribers","subscription_url":"https://api.github.com/repos/atomix/atomix/subscription","commits_url":"https://api.github.com/repos/atomix/atomix/commits{/sha}","git_commits_url":"https://api.github.com/repos/atomix/atomix/git/commits{/sha}","comments_url":"https://api.github.com/repos/atomix/atomix/comments{/number}","issue_comment_url":"https://api.github.com/repos/atomix/atomix/issues/comments{/number}","contents_url":"https://api.github.com/repos/atomix/atomix/contents/{+path}","compare_url":"https://api.github.com/repos/atomix/atomix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atomix/atomix/merges","archive_url":"https://api.github.com/repos/atomix/atomix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atomix/atomix/downloads","issues_url":"https://api.github.com/repos/atomix/atomix/issues{/number}","pulls_url":"https://api.github.com/repos/atomix/atomix/pulls{/number}","milestones_url":"https://api.github.com/repos/atomix/atomix/milestones{/number}","notifications_url":"https://api.github.com/repos/atomix/atomix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atomix/atomix/labels{/name}","releases_url":"https://api.github.com/repos/atomix/atomix/releases{/id}","deployments_url":"https://api.github.com/repos/atomix/atomix/deployments","created_at":"2014-01-27T22:20:47Z","updated_at":"2018-10-12T01:03:57Z","pushed_at":"2018-10-12T01:17:14Z","git_url":"git://github.com/atomix/atomix.git","ssh_url":"git@github.com:atomix/atomix.git","clone_url":"https://github.com/atomix/atomix.git","svn_url":"https://github.com/atomix/atomix","homepage":"https://atomix.io","size":17338,"stargazers_count":1402,"watchers_count":1402,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":233,"mirror_url":null,"archived":false,"open_issues_count":27,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":233,"open_issues":27,"watchers":1402,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/atomix/atomix/pulls/872"},"html":{"href":"https://github.com/atomix/atomix/pull/872"},"issue":{"href":"https://api.github.com/repos/atomix/atomix/issues/872"},"comments":{"href":"https://api.github.com/repos/atomix/atomix/issues/872/comments"},"review_comments":{"href":"https://api.github.com/repos/atomix/atomix/pulls/872/comments"},"review_comment":{"href":"https://api.github.com/repos/atomix/atomix/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/atomix/atomix/pulls/872/commits"},"statuses":{"href":"https://api.github.com/repos/atomix/atomix/statuses/37c0543e06ed08b8c2a545d9c026336b016bb677"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"kuujo"}}