[Ambari 23549] Blueprint configuration processor updates for HDFS NameNode Federation#985
Conversation
| clusterConfig.setProperty(HADOOP_ENV_CONFIG_TYPE_NAME, HDFS_HA_INITIAL_CLUSTER_ID_PROPERTY_NAME, clusterName); | ||
| } else { | ||
| LOG.warn("Cluster name could not obtained, this may indicate a deployment or configuration error."); | ||
| } |
There was a problem hiding this comment.
Shouldn't missing cluster name mean an exception or are there valid cases when cluster name could be missing?
There was a problem hiding this comment.
That's a good question. I've checked the usages of the getClusterName() method throughout the server code, and some cases treat this as an exception case, and some just proceed assuming that the name is always non-null.
I don't think there are any valid cases when the cluster name would be missing, so I'll update this code to throw an exception in the event that a null cluster name is found.
There was a problem hiding this comment.
Updated the patch to include more error-checking in this area, and added a unit test to verify that the expected exception is thrown in the event that getClusterName() returns null.
|
Refer to this link for build results (access rights to CI server needed): |
|
@rnettleton When merging this, please make sure to select "Squash and merge" from the dropdown. |
benyoka
left a comment
There was a problem hiding this comment.
LGTM, one minor question
|
Refer to this link for build results (access rights to CI server needed): |
What changes were proposed in this pull request?
The Blueprint configuration processor was updated to account for HDFS NameNode Federation deployments. The following changes were introduced:
The "hadoop-env/dfs_ha_initial_cluster_id" property will now be set automatically by the Blueprint configuration processor to be the cluster's name, unless this setting was already customized by the user.
In addition to setting the cluster ID, this change should also implement some minor configuration conveniences that will make Blueprint creation for Federated clusters simpler:
Unit tests were updated to validate this change.
How was this patch tested?
Ran the ambari-server unit test suite (passed).
Deployed a 4-node HDFS NameNode Federation cluster using a Blueprint, and verified that the HDFS services are all started as expected, and that the hdfs-site configuration includes the expected configuration values.
Please review Ambari Contributing Guide before opening a pull request.