Skip to content

Conversation

@FangYongs
Copy link
Contributor

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.
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

.withDeprecatedKeys("recovery.zookeeper.path.checkpoints");

/** ZooKeeper root path (ZNode) for checkpoint counters. */
public static final ConfigOption<String> HA_ZOOKEEPER_CHECKPOINT_COUNTER_PATH =
Copy link
Contributor

Choose a reason for hiding this comment

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

please remove the HA_ prefix from all options.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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?

Copy link
Contributor

Choose a reason for hiding this comment

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

well isn't that great.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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

…EPER_QUORUM to position of zookeeper options
/** ACL options supported "creator" or "open" */
/**
* ACL options supported "creator" or "open".
* @deprecated in favor of {@link HighAvailabilityOptions#HA_ZOOKEEPER_CLIENT_ACL}.
Copy link
Contributor

Choose a reason for hiding this comment

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

remove HA_ prefix

/**
* 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}.
Copy link
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes I think so.


public static final ConfigOption<String> HA_ZOOKEEPER_NAMESPACE =
key("high-availability.zookeeper.path.namespace")
.noDefaultValue();
Copy link
Contributor

Choose a reason for hiding this comment

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

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

@Deprecated
public static final String HA_ZOOKEEPER_MAX_RETRY_ATTEMPTS = "high-availability.zookeeper.client.max-retry-attempts";

/** @deprecated in favor of {@link HighAvailabilityOptions#HA_ZOOKEEPER_CLIENT_ACL}. */
Copy link
Contributor

Choose a reason for hiding this comment

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

remove HA_ prefix

*
* @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
Copy link
Contributor

Choose a reason for hiding this comment

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

refer to the default value instead of the option


public static final ConfigOption<String> ZOOKEEPER_CLIENT_ACL =
key("high-availability.zookeeper.client.acl")
.noDefaultValue();
Copy link
Contributor

Choose a reason for hiding this comment

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

default should be "open"

*/
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);
Copy link
Contributor

Choose a reason for hiding this comment

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

null argument can be removed.

@FangYongs
Copy link
Contributor Author

@zentol Thank you for your suggestions. I have fixed them, thanks :)

*
* @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
Copy link
Contributor

Choose a reason for hiding this comment

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

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's nicer to me too, thanks

@zentol
Copy link
Contributor

zentol commented Jun 26, 2017

merging.

zentol pushed a commit to zentol/flink that referenced this pull request Jun 26, 2017
zentol pushed a commit to zentol/flink that referenced this pull request Jun 27, 2017
zentol pushed a commit to zentol/flink that referenced this pull request Jun 27, 2017
zentol pushed a commit to zentol/flink that referenced this pull request Jun 28, 2017
zentol pushed a commit to zentol/flink that referenced this pull request Jun 28, 2017
zentol pushed a commit to zentol/flink that referenced this pull request Jun 28, 2017
zentol pushed a commit to zentol/flink that referenced this pull request Jun 29, 2017
zentol pushed a commit to zentol/flink that referenced this pull request Jun 30, 2017
@asfgit asfgit closed this in f839018 Jul 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants