Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions zookeeper-docs/src/main/resources/markdown/zookeeperAdmin.md
Original file line number Diff line number Diff line change
Expand Up @@ -1315,6 +1315,14 @@ of servers -- that is, when deploying clusters of servers.
leader election. If you want to test multiple servers on a single machine, then
different ports can be used for each server.

* *hostProvider.dnsSrvRefreshIntervalMs* :
(Java system property: **zookeeper.hostProvider.dnsSrvRefreshIntervalMs**)
**New in 3.10.0:**
The refresh interval in milliseconds for DNS SRV record lookups when using DnsSrvHostProvider.
This property controls how frequently the DNS SRV records are queried to update the server list.
A value of 0 disables periodic refresh.

The default value is 60000 (60 seconds).

<a name="id_multi_address"></a>
Since ZooKeeper 3.6.0 it is possible to specify **multiple addresses** for each
Expand Down
5 changes: 5 additions & 0 deletions zookeeper-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@
<artifactId>commons-io</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>dnsjava</groupId>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't there standard Java API for this which is not third party?

<artifactId>dnsjava</artifactId>
<version>3.5.1</version>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package org.apache.zookeeper.client;

import org.apache.yetus.audience.InterfaceAudience;

/**
* Represents the type of connection resolution used by ZooKeeper clients.
* This is an internal enum used for connection string and provider validation.
*/
@InterfaceAudience.Private
public enum ConnectionType {
/**
* DNS SRV record-based service discovery.
*/
DNS_SRV("DNS SRV"),

/**
* Traditional host:port static server list.
*/
HOST_PORT("Host:Port");

private final String name;

ConnectionType(String name) {
this.name = name;
}

/**
* Returns the name for this connection type.
* @return the name
*/
public String getName() {
return name;
}
}
Loading