[GitHub] flink pull request #4123: [FLINK-6498] Migrate Zookeeper configuration optio...

2017-07-01 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/flink/pull/4123


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #4123: [FLINK-6498] Migrate Zookeeper configuration optio...

2017-06-21 Thread zjureel
Github user zjureel commented on a diff in the pull request:

https://github.com/apache/flink/pull/4123#discussion_r123424835
  
--- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java 
---
@@ -370,11 +370,11 @@ public static String generateZookeeperPath(String 
root, String namespace) {
 * Return the configured {@link ZkClientACLMode}.
 *
 * @param config The config to parse
-* @return Configured ACL mode or {@link 
HighAvailabilityOptions#ZOOKEEPER_CLIENT_ACL} if not
+* @return Configured ACL mode or "open" if not
--- End diff --

It's nicer to me too, thanks


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #4123: [FLINK-6498] Migrate Zookeeper configuration optio...

2017-06-21 Thread zentol
Github user zentol commented on a diff in the pull request:

https://github.com/apache/flink/pull/4123#discussion_r123271284
  
--- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java 
---
@@ -370,11 +370,11 @@ public static String generateZookeeperPath(String 
root, String namespace) {
 * Return the configured {@link ZkClientACLMode}.
 *
 * @param config The config to parse
-* @return Configured ACL mode or {@link 
HighAvailabilityOptions#ZOOKEEPER_CLIENT_ACL} if not
+* @return Configured ACL mode or "open" if not
--- End diff --

This may become outdated; it's better to do something like "or the default 
defined by {@link HighAvailabilityOptions#ZOOKEEPER_CLIENT_ACL}"


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #4123: [FLINK-6498] Migrate Zookeeper configuration optio...

2017-06-20 Thread tillrohrmann
Github user tillrohrmann commented on a diff in the pull request:

https://github.com/apache/flink/pull/4123#discussion_r123148352
  
--- Diff: 
flink-core/src/main/java/org/apache/flink/configuration/ConfigConstants.java ---
@@ -922,65 +922,111 @@
 
// --- ZooKeeper 
--
 
-   /** ZooKeeper servers. */
+   /**
+* ZooKeeper servers.
+* @deprecated in favor of {@link 
HighAvailabilityOptions#HA_ZOOKEEPER_QUORUM}.
+*/
@PublicEvolving
+   @Deprecated
public static final String HA_ZOOKEEPER_QUORUM_KEY = 
"high-availability.zookeeper.quorum";
 
/**
 * File system state backend base path for recoverable state handles. 
Recovery state is written
 * to this path and the file state handles are persisted for recovery.
+* @deprecated in favor of {@link 
HighAvailabilityOptions#HA_STORAGE_PATH}.
--- End diff --

Yes I think so.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #4123: [FLINK-6498] Migrate Zookeeper configuration optio...

2017-06-19 Thread zentol
Github user zentol commented on a diff in the pull request:

https://github.com/apache/flink/pull/4123#discussion_r122680550
  
--- Diff: 
flink-core/src/main/java/org/apache/flink/configuration/ConfigConstants.java ---
@@ -1594,51 +1640,103 @@
 
// --- ZooKeeper 
--
 
+   /** @deprecated in favor of {@link 
HighAvailabilityOptions#HA_ZOOKEEPER_ROOT}. */
+   @Deprecated
public static final String DEFAULT_ZOOKEEPER_DIR_KEY = "/flink";
 
+   /** @deprecated in favor of {@link 
HighAvailabilityOptions#HA_ZOOKEEPER_NAMESPACE}. */
+   @Deprecated
public static final String DEFAULT_ZOOKEEPER_NAMESPACE_KEY = "/default";
 
+   /** @deprecated in favor of {@link 
HighAvailabilityOptions#HA_ZOOKEEPER_LATCH_PATH}. */
+   @Deprecated
public static final String DEFAULT_ZOOKEEPER_LATCH_PATH = 
"/leaderlatch";
 
+   /** @deprecated in favor of {@link 
HighAvailabilityOptions#HA_ZOOKEEPER_LEADER_PATH}. */
+   @Deprecated
public static final String DEFAULT_ZOOKEEPER_LEADER_PATH = "/leader";
 
+   /** @deprecated in favor of {@link 
HighAvailabilityOptions#HA_ZOOKEEPER_JOBGRAPHS_PATH}. */
+   @Deprecated
public static final String DEFAULT_ZOOKEEPER_JOBGRAPHS_PATH = 
"/jobgraphs";
 
+   /** @deprecated in favor of {@link 
HighAvailabilityOptions#HA_ZOOKEEPER_CHECKPOINTS_PATH}. */
+   @Deprecated
public static final String DEFAULT_ZOOKEEPER_CHECKPOINTS_PATH = 
"/checkpoints";
 
+   /** @deprecated in favor of {@link 
HighAvailabilityOptions#HA_ZOOKEEPER_CHECKPOINT_COUNTER_PATH} */
+   @Deprecated
public static final String DEFAULT_ZOOKEEPER_CHECKPOINT_COUNTER_PATH = 
"/checkpoint-counter";
 
+   /** @deprecated in favor of {@link 
HighAvailabilityOptions#HA_ZOOKEEPER_MESOS_WORKERS_PATH}. */
+   @Deprecated
public static final String DEFAULT_ZOOKEEPER_MESOS_WORKERS_PATH = 
"/mesos-workers";
 
+   /** @deprecated in favor of {@link 
HighAvailabilityOptions#ZOOKEEPER_SESSION_TIMEOUT}. */
+   @Deprecated
public static final int DEFAULT_ZOOKEEPER_SESSION_TIMEOUT = 6;
 
+   /** @deprecated in favor of {@link 
HighAvailabilityOptions#ZOOKEEPER_CONNECTION_TIMEOUT}. */
+   @Deprecated
public static final int DEFAULT_ZOOKEEPER_CONNECTION_TIMEOUT = 15000;
 
+   /** @deprecated in favor of {@link 
HighAvailabilityOptions#ZOOKEEPER_RETRY_WAIT}. */
+   @Deprecated
public static final int DEFAULT_ZOOKEEPER_RETRY_WAIT = 5000;
 
+   /** @deprecated in favor of {@link 
HighAvailabilityOptions#ZOOKEEPER_MAX_RETRY_ATTEMPTS}. */
+   @Deprecated
public static final int DEFAULT_ZOOKEEPER_MAX_RETRY_ATTEMPTS = 3;
 
// - Defaults for required ZooKeeper configuration keys 
---
 
-   /** ZooKeeper default client port. */
+   /**
+* ZooKeeper default client port.
+* @deprecated in favor of {@code 
FlinkZookeeperQuorumPeer#DEFAULT_ZOOKEEPER_CLIENT_PORT}.
+*/
+   @Deprecated
public static final int DEFAULT_ZOOKEEPER_CLIENT_PORT = 2181;
 
-   /** ZooKeeper default init limit. */
+   /**
+* ZooKeeper default init limit.
+* @deprecated in favor of {@code 
FlinkZookeeperQuorumPeer#DEFAULT_ZOOKEEPER_INIT_LIMIT}.
+*/
+   @Deprecated
public static final int DEFAULT_ZOOKEEPER_INIT_LIMIT = 10;
 
-   /** ZooKeeper default sync limit. */
+   /**
+* ZooKeeper default sync limit.
+* @deprecated in favor of {@code 
FlinkZookeeperQuorumPeer#DEFAULT_ZOOKEEPER_SYNC_LIMIT}.
+*/
+   @Deprecated
public static final int DEFAULT_ZOOKEEPER_SYNC_LIMIT = 5;
 
-   /** ZooKeeper default peer port. */
+   /**
+* ZooKeeper default peer port.
+* @deprecated in favor of {@code 
FlinkZookeeperQuorumPeer#DEFAULT_ZOOKEEPER_PEER_PORT}.
+*/
+   @Deprecated
public static final int DEFAULT_ZOOKEEPER_PEER_PORT = 2888;
 
-   /** ZooKeeper default leader port. */
+   /**
+* ZooKeeper default leader port.
+* @deprecated in favor of {@code 
FlinkZookeeperQuorumPeer#DEFAULT_ZOOKEEPER_LEADER_PORT}.
+*/
+   @Deprecated
public static final int DEFAULT_ZOOKEEPER_LEADER_PORT = 3888;
 
-   /** Defaults for ZK client security **/
+   /**
+* Defaults for ZK client security.
+* @deprecated in favor of {@link 
SecurityOptions#ZOOKEEPER_SASL_DISABLE}.
+*/
+   @Deprecated
public static final boolean DEFAULT_ZOOKEEPER_SASL_DISABLE = true;
 
-   /** ACL options supported "creator" or "open" */
+   /**
+* ACL options supported "creator" or "open".
+* @deprecated in favor of {@link 
HighAvailabilityOptions#HA_ZOOKEEPER_CLIENT_ACL}.
--- End diff --

   

[GitHub] flink pull request #4123: [FLINK-6498] Migrate Zookeeper configuration optio...

2017-06-19 Thread zentol
Github user zentol commented on a diff in the pull request:

https://github.com/apache/flink/pull/4123#discussion_r122682661
  
--- Diff: 
flink-core/src/main/java/org/apache/flink/configuration/ConfigConstants.java ---
@@ -922,65 +922,111 @@
 
// --- ZooKeeper 
--
 
-   /** ZooKeeper servers. */
+   /**
+* ZooKeeper servers.
+* @deprecated in favor of {@link 
HighAvailabilityOptions#HA_ZOOKEEPER_QUORUM}.
+*/
@PublicEvolving
+   @Deprecated
public static final String HA_ZOOKEEPER_QUORUM_KEY = 
"high-availability.zookeeper.quorum";
 
/**
 * File system state backend base path for recoverable state handles. 
Recovery state is written
 * to this path and the file state handles are persisted for recovery.
+* @deprecated in favor of {@link 
HighAvailabilityOptions#HA_STORAGE_PATH}.
 */
@PublicEvolving
+   @Deprecated
public static final String HA_ZOOKEEPER_STORAGE_PATH = 
"high-availability.zookeeper.storageDir";
 
-   /** ZooKeeper root path. */
+   /**
+* ZooKeeper root path.
+* @deprecated in favor of {@link 
HighAvailabilityOptions#HA_ZOOKEEPER_ROOT}.
+*/
@PublicEvolving
+   @Deprecated
public static final String HA_ZOOKEEPER_DIR_KEY = 
"high-availability.zookeeper.path.root";
 
+   /** @deprecated in favor of {@link 
HighAvailabilityOptions#HA_ZOOKEEPER_NAMESPACE}. */
@PublicEvolving
+   @Deprecated
public static final String HA_ZOOKEEPER_NAMESPACE_KEY = 
"high-availability.zookeeper.path.namespace";
 
+   /** @deprecated in favor of {@link 
HighAvailabilityOptions#HA_ZOOKEEPER_LATCH_PATH}. */
@PublicEvolving
+   @Deprecated
public static final String HA_ZOOKEEPER_LATCH_PATH = 
"high-availability.zookeeper.path.latch";
 
-   /** ZooKeeper root path (ZNode) for job graphs. */
+   /**
+* ZooKeeper root path (ZNode) for job graphs.
+* @deprecated in favor of {@link 
HighAvailabilityOptions#HA_ZOOKEEPER_JOBGRAPHS_PATH}.
+*/
@PublicEvolving
+   @Deprecated
public static final String HA_ZOOKEEPER_JOBGRAPHS_PATH = 
"high-availability.zookeeper.path.jobgraphs";
 
+   /** @deprecated in favor of {@link 
HighAvailabilityOptions#HA_ZOOKEEPER_LEADER_PATH}. */
@PublicEvolving
+   @Deprecated
public static final String HA_ZOOKEEPER_LEADER_PATH = 
"high-availability.zookeeper.path.leader";
 
-   /** ZooKeeper root path (ZNode) for completed checkpoints. */
+   /**
+* ZooKeeper root path (ZNode) for completed checkpoints.
+* @deprecated in favor of {@link 
HighAvailabilityOptions#HA_ZOOKEEPER_CHECKPOINTS_PATH}.
+*/
@PublicEvolving
+   @Deprecated
public static final String HA_ZOOKEEPER_CHECKPOINTS_PATH = 
"high-availability.zookeeper.path.checkpoints";
 
-   /** ZooKeeper root path (ZNode) for checkpoint counters. */
+   /**
+* ZooKeeper root path (ZNode) for checkpoint counters.
+* @deprecated in favor of {@link 
HighAvailabilityOptions#HA_ZOOKEEPER_CHECKPOINT_COUNTER_PATH}.
+*/
@PublicEvolving
+   @Deprecated
public static final String HA_ZOOKEEPER_CHECKPOINT_COUNTER_PATH = 
"high-availability.zookeeper.path.checkpoint-counter";
 
-   /** ZooKeeper root path (ZNode) for Mesos workers. */
+   /**
+* ZooKeeper root path (ZNode) for Mesos workers.
+* @deprecated in favor of {@link 
HighAvailabilityOptions#HA_ZOOKEEPER_MESOS_WORKERS_PATH}.
+*/
@PublicEvolving
+   @Deprecated
public static final String HA_ZOOKEEPER_MESOS_WORKERS_PATH = 
"high-availability.zookeeper.path.mesos-workers";
 
+   /** @deprecated in favor of {@link 
HighAvailabilityOptions#ZOOKEEPER_SESSION_TIMEOUT}. */
@PublicEvolving
+   @Deprecated
public static final String HA_ZOOKEEPER_SESSION_TIMEOUT = 
"high-availability.zookeeper.client.session-timeout";
 
+   /** @deprecated in favor of {@link 
HighAvailabilityOptions#ZOOKEEPER_CONNECTION_TIMEOUT}. */
@PublicEvolving
+   @Deprecated
public static final String HA_ZOOKEEPER_CONNECTION_TIMEOUT = 
"high-availability.zookeeper.client.connection-timeout";
 
+   /** @deprecated in favor of {@link 
HighAvailabilityOptions#ZOOKEEPER_RETRY_WAIT} */
@PublicEvolving
+   @Deprecated
public static final String HA_ZOOKEEPER_RETRY_WAIT = 
"high-availability.zookeeper.client.retry-wait";
 
+   /** @deprecated in favor of {@link 
HighAvailabilityOptions#ZOOKEEPER_MAX_RETRY_ATTEMPTS}. */
@PublicEvolving
+   @Deprecated
public static final String HA_ZOOKEEPER_MAX_RETRY_ATTEMPTS = 
"high-availability.zookeeper.client.max-retry-attempts";
 
+   /** 

[GitHub] flink pull request #4123: [FLINK-6498] Migrate Zookeeper configuration optio...

2017-06-19 Thread zentol
Github user zentol commented on a diff in the pull request:

https://github.com/apache/flink/pull/4123#discussion_r122683760
  
--- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java 
---
@@ -391,11 +370,11 @@ public static String generateZookeeperPath(String 
root, String namespace) {
 * Return the configured {@link ZkClientACLMode}.
 *
 * @param config The config to parse
-* @return Configured ACL mode or {@link 
ConfigConstants#DEFAULT_HA_ZOOKEEPER_CLIENT_ACL} if not
+* @return Configured ACL mode or {@link 
HighAvailabilityOptions#ZOOKEEPER_CLIENT_ACL} if not
--- End diff --

refer to the default value instead of the option


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #4123: [FLINK-6498] Migrate Zookeeper configuration optio...

2017-06-19 Thread zentol
Github user zentol commented on a diff in the pull request:

https://github.com/apache/flink/pull/4123#discussion_r122683792
  
--- Diff: 
flink-core/src/main/java/org/apache/flink/configuration/HighAvailabilityOptions.java
 ---
@@ -128,6 +167,10 @@
key("high-availability.zookeeper.path.running-registry")
.defaultValue("/running_job_registry/");
 
+   public static final ConfigOption ZOOKEEPER_CLIENT_ACL =
+   key("high-availability.zookeeper.client.acl")
+   .noDefaultValue();
--- End diff --

default should be "open"


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #4123: [FLINK-6498] Migrate Zookeeper configuration optio...

2017-06-19 Thread zentol
Github user zentol commented on a diff in the pull request:

https://github.com/apache/flink/pull/4123#discussion_r122681364
  
--- Diff: 
flink-core/src/main/java/org/apache/flink/configuration/HighAvailabilityOptions.java
 ---
@@ -93,13 +85,60 @@
// 

 
/**
+* The ZooKeeper quorum to use, when running Flink in a 
high-availability mode with ZooKeeper.
+*/
+   public static final ConfigOption HA_ZOOKEEPER_QUORUM =
+   key("high-availability.zookeeper.quorum")
+   .noDefaultValue()
+   .withDeprecatedKeys("recovery.zookeeper.quorum");
+
+   /**
 * The root path under which Flink stores its entries in ZooKeeper
 */
public static final ConfigOption HA_ZOOKEEPER_ROOT =
key("high-availability.zookeeper.path.root")
.defaultValue("/flink")
.withDeprecatedKeys("recovery.zookeeper.path.root");
 
+   public static final ConfigOption HA_ZOOKEEPER_NAMESPACE =
+   key("high-availability.zookeeper.path.namespace")
+   .noDefaultValue();
--- End diff --

missing deprecated key `"recovery.zookeeper.path.namespace"`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #4123: [FLINK-6498] Migrate Zookeeper configuration optio...

2017-06-19 Thread zentol
Github user zentol commented on a diff in the pull request:

https://github.com/apache/flink/pull/4123#discussion_r122681182
  
--- Diff: 
flink-core/src/main/java/org/apache/flink/configuration/ConfigConstants.java ---
@@ -922,65 +922,111 @@
 
// --- ZooKeeper 
--
 
-   /** ZooKeeper servers. */
+   /**
+* ZooKeeper servers.
+* @deprecated in favor of {@link 
HighAvailabilityOptions#HA_ZOOKEEPER_QUORUM}.
+*/
@PublicEvolving
+   @Deprecated
public static final String HA_ZOOKEEPER_QUORUM_KEY = 
"high-availability.zookeeper.quorum";
 
/**
 * File system state backend base path for recoverable state handles. 
Recovery state is written
 * to this path and the file state handles are persisted for recovery.
+* @deprecated in favor of {@link 
HighAvailabilityOptions#HA_STORAGE_PATH}.
--- End diff --

I'm not sure about this one. @tillrohrmann are 
`high-availability.storageDir` and `high-availability.zookeeper.storageDir` 
equivalent?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #4123: [FLINK-6498] Migrate Zookeeper configuration optio...

2017-06-19 Thread zentol
Github user zentol commented on a diff in the pull request:

https://github.com/apache/flink/pull/4123#discussion_r122684018
  
--- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/util/ZooKeeperUtils.java 
---
@@ -391,11 +370,11 @@ public static String generateZookeeperPath(String 
root, String namespace) {
 * Return the configured {@link ZkClientACLMode}.
 *
 * @param config The config to parse
-* @return Configured ACL mode or {@link 
ConfigConstants#DEFAULT_HA_ZOOKEEPER_CLIENT_ACL} if not
+* @return Configured ACL mode or {@link 
HighAvailabilityOptions#ZOOKEEPER_CLIENT_ACL} if not
 * configured.
 */
public static ZkClientACLMode fromConfig(Configuration config) {
-   String aclMode = 
config.getString(ConfigConstants.HA_ZOOKEEPER_CLIENT_ACL, null);
+   String aclMode = 
config.getString(HighAvailabilityOptions.ZOOKEEPER_CLIENT_ACL, null);
--- End diff --

`null` argument can be removed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #4123: [FLINK-6498] Migrate Zookeeper configuration optio...

2017-06-14 Thread zjureel
Github user zjureel commented on a diff in the pull request:

https://github.com/apache/flink/pull/4123#discussion_r122110338
  
--- Diff: 
flink-core/src/main/java/org/apache/flink/configuration/HighAvailabilityOptions.java
 ---
@@ -100,6 +100,45 @@
.defaultValue("/flink")
.withDeprecatedKeys("recovery.zookeeper.path.root");
 
+   public static final ConfigOption HA_ZOOKEEPER_NAMESPACE =
+   key("high-availability.zookeeper.path.namespace")
+   .noDefaultValue();
+
+   public static final ConfigOption HA_ZOOKEEPER_LATCH_PATH =
+   key("high-availability.zookeeper.path.latch")
+   .defaultValue("/leaderlatch")
+   .withDeprecatedKeys("recovery.zookeeper.path.latch");
+
+   /** ZooKeeper root path (ZNode) for job graphs. */
+   public static final ConfigOption HA_ZOOKEEPER_JOBGRAPHS_PATH =
+   key("high-availability.zookeeper.path.jobgraphs")
+   .defaultValue("/jobgraphs")
+   
.withDeprecatedKeys("recovery.zookeeper.path.jobgraphs");
+
+   public static final ConfigOption HA_ZOOKEEPER_LEADER_PATH =
+   key("high-availability.zookeeper.path.leader")
+   .defaultValue("/leader")
+   .withDeprecatedKeys("recovery.zookeeper.path.leader");
+
+   /** ZooKeeper root path (ZNode) for completed checkpoints. */
+   public static final ConfigOption HA_ZOOKEEPER_CHECKPOINTS_PATH =
+   key("high-availability.zookeeper.path.checkpoints")
+   .defaultValue("/checkpoints")
+   
.withDeprecatedKeys("recovery.zookeeper.path.checkpoints");
+
+   /** ZooKeeper root path (ZNode) for checkpoint counters. */
+   public static final ConfigOption 
HA_ZOOKEEPER_CHECKPOINT_COUNTER_PATH =
--- End diff --

It's nice, and I have fixed it. Thanks :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #4123: [FLINK-6498] Migrate Zookeeper configuration optio...

2017-06-14 Thread zentol
Github user zentol commented on a diff in the pull request:

https://github.com/apache/flink/pull/4123#discussion_r121910223
  
--- Diff: 
flink-core/src/main/java/org/apache/flink/configuration/HighAvailabilityOptions.java
 ---
@@ -100,6 +100,45 @@
.defaultValue("/flink")
.withDeprecatedKeys("recovery.zookeeper.path.root");
 
+   public static final ConfigOption HA_ZOOKEEPER_NAMESPACE =
+   key("high-availability.zookeeper.path.namespace")
+   .noDefaultValue();
+
+   public static final ConfigOption HA_ZOOKEEPER_LATCH_PATH =
+   key("high-availability.zookeeper.path.latch")
+   .defaultValue("/leaderlatch")
+   .withDeprecatedKeys("recovery.zookeeper.path.latch");
+
+   /** ZooKeeper root path (ZNode) for job graphs. */
+   public static final ConfigOption HA_ZOOKEEPER_JOBGRAPHS_PATH =
+   key("high-availability.zookeeper.path.jobgraphs")
+   .defaultValue("/jobgraphs")
+   
.withDeprecatedKeys("recovery.zookeeper.path.jobgraphs");
+
+   public static final ConfigOption HA_ZOOKEEPER_LEADER_PATH =
+   key("high-availability.zookeeper.path.leader")
+   .defaultValue("/leader")
+   .withDeprecatedKeys("recovery.zookeeper.path.leader");
+
+   /** ZooKeeper root path (ZNode) for completed checkpoints. */
+   public static final ConfigOption HA_ZOOKEEPER_CHECKPOINTS_PATH =
+   key("high-availability.zookeeper.path.checkpoints")
+   .defaultValue("/checkpoints")
+   
.withDeprecatedKeys("recovery.zookeeper.path.checkpoints");
+
+   /** ZooKeeper root path (ZNode) for checkpoint counters. */
+   public static final ConfigOption 
HA_ZOOKEEPER_CHECKPOINT_COUNTER_PATH =
--- End diff --

well isn't that great.

OK, keep the prefix for the HA options, but remove it for 
`ZOOKEEPER_CLIENT_ACL`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #4123: [FLINK-6498] Migrate Zookeeper configuration optio...

2017-06-14 Thread zjureel
Github user zjureel commented on a diff in the pull request:

https://github.com/apache/flink/pull/4123#discussion_r121906966
  
--- Diff: 
flink-core/src/main/java/org/apache/flink/configuration/HighAvailabilityOptions.java
 ---
@@ -100,6 +100,45 @@
.defaultValue("/flink")
.withDeprecatedKeys("recovery.zookeeper.path.root");
 
+   public static final ConfigOption HA_ZOOKEEPER_NAMESPACE =
+   key("high-availability.zookeeper.path.namespace")
+   .noDefaultValue();
+
+   public static final ConfigOption HA_ZOOKEEPER_LATCH_PATH =
+   key("high-availability.zookeeper.path.latch")
+   .defaultValue("/leaderlatch")
+   .withDeprecatedKeys("recovery.zookeeper.path.latch");
+
+   /** ZooKeeper root path (ZNode) for job graphs. */
+   public static final ConfigOption HA_ZOOKEEPER_JOBGRAPHS_PATH =
+   key("high-availability.zookeeper.path.jobgraphs")
+   .defaultValue("/jobgraphs")
+   
.withDeprecatedKeys("recovery.zookeeper.path.jobgraphs");
+
+   public static final ConfigOption HA_ZOOKEEPER_LEADER_PATH =
+   key("high-availability.zookeeper.path.leader")
+   .defaultValue("/leader")
+   .withDeprecatedKeys("recovery.zookeeper.path.leader");
+
+   /** ZooKeeper root path (ZNode) for completed checkpoints. */
+   public static final ConfigOption HA_ZOOKEEPER_CHECKPOINTS_PATH =
+   key("high-availability.zookeeper.path.checkpoints")
+   .defaultValue("/checkpoints")
+   
.withDeprecatedKeys("recovery.zookeeper.path.checkpoints");
+
+   /** ZooKeeper root path (ZNode) for checkpoint counters. */
+   public static final ConfigOption 
HA_ZOOKEEPER_CHECKPOINT_COUNTER_PATH =
--- End diff --

Thank you for your reply. In addition to the zookeeper options, there're 
some other options such as `HA_STORAGE_PATH`, `HA_JOB_MANAGER_PORT_RANGE`. I 
think the `HA_` prefix of them should be removed, otherwise the style may not 
be consistent. What do you think?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #4123: [FLINK-6498] Migrate Zookeeper configuration optio...

2017-06-14 Thread zentol
Github user zentol commented on a diff in the pull request:

https://github.com/apache/flink/pull/4123#discussion_r121904870
  
--- Diff: 
flink-core/src/main/java/org/apache/flink/configuration/HighAvailabilityOptions.java
 ---
@@ -100,6 +100,45 @@
.defaultValue("/flink")
.withDeprecatedKeys("recovery.zookeeper.path.root");
 
+   public static final ConfigOption HA_ZOOKEEPER_NAMESPACE =
+   key("high-availability.zookeeper.path.namespace")
+   .noDefaultValue();
+
+   public static final ConfigOption HA_ZOOKEEPER_LATCH_PATH =
+   key("high-availability.zookeeper.path.latch")
+   .defaultValue("/leaderlatch")
+   .withDeprecatedKeys("recovery.zookeeper.path.latch");
+
+   /** ZooKeeper root path (ZNode) for job graphs. */
+   public static final ConfigOption HA_ZOOKEEPER_JOBGRAPHS_PATH =
+   key("high-availability.zookeeper.path.jobgraphs")
+   .defaultValue("/jobgraphs")
+   
.withDeprecatedKeys("recovery.zookeeper.path.jobgraphs");
+
+   public static final ConfigOption HA_ZOOKEEPER_LEADER_PATH =
+   key("high-availability.zookeeper.path.leader")
+   .defaultValue("/leader")
+   .withDeprecatedKeys("recovery.zookeeper.path.leader");
+
+   /** ZooKeeper root path (ZNode) for completed checkpoints. */
+   public static final ConfigOption HA_ZOOKEEPER_CHECKPOINTS_PATH =
+   key("high-availability.zookeeper.path.checkpoints")
+   .defaultValue("/checkpoints")
+   
.withDeprecatedKeys("recovery.zookeeper.path.checkpoints");
+
+   /** ZooKeeper root path (ZNode) for checkpoint counters. */
+   public static final ConfigOption 
HA_ZOOKEEPER_CHECKPOINT_COUNTER_PATH =
--- End diff --

please remove the `HA_` prefix from all options.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] flink pull request #4123: [FLINK-6498] Migrate Zookeeper configuration optio...

2017-06-14 Thread zjureel
GitHub user zjureel opened a pull request:

https://github.com/apache/flink/pull/4123

[FLINK-6498] Migrate Zookeeper configuration options

Thanks for contributing to Apache Flink. Before you open your pull request, 
please take the following check list into consideration.
If your changes take all of the items into account, feel free to open your 
pull request. For more information and/or questions please refer to the [How To 
Contribute guide](http://flink.apache.org/how-to-contribute.html).
In addition to going through the list, please provide a meaningful 
description of your changes.

- [ ] General
  - The pull request references the related JIRA issue ("[FLINK-XXX] Jira 
title text")
  - The pull request addresses only one issue
  - Each commit in the PR has a meaningful commit message (including the 
JIRA id)

- [ ] Documentation
  - Documentation has been added for new functionality
  - Old documentation affected by the pull request has been updated
  - JavaDoc for public methods has been added

- [ ] Tests & Build
  - Functionality added by the pull request is covered by tests
  - `mvn clean verify` has been executed successfully locally or a Travis 
build has passed


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/zjureel/flink FLINK-6498

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/flink/pull/4123.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #4123


commit 51851b054d9db5a67f7492e74f5b2475eb397ae6
Author: zjureel 
Date:   2017-06-14T09:38:25Z

[FLINK-6498] Migrate Zookeeper configuration options




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---