-
Notifications
You must be signed in to change notification settings - Fork 4k
Update HDInsight cmdlets to persist values passed in -Config param #107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Can one of the admins verify this patch? |
Hi @rickmsft, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution! TTYL, AZPRBOT; |
Do I need to sign the CLA even though I'm an FTE? (http://azure.github.io/guidelines.html#cla) |
@azuresdkci add to whitelist |
@rickmsft no, you don't need to sign the CLA |
@azuresdkci retest this please |
@@ -56,30 +56,26 @@ public AzureHDInsightConfig Config | |||
throw new ArgumentNullException("value", "The value for the configuration can not be null."); | |||
} | |||
|
|||
if (value.CoreConfiguration != null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are you removing all the null checks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation was copied from AddAzureHDInsightScriptActionCmdlet.cs. These values should reliably be non-null since the AzureHDInsightConfig constructor instantiates each member and the property setters are private.
Please shoot me an email at [email protected]. I handle PS on the HDI team. Thanks! |
Update HDInsight cmdlets to persist values passed in -Config param
When doing a pipelined create like:
The resulting cluster is created as a Hadoop cluster instead of HBase. It looks like this is the result of the cmdlet creating a new AzureHDInsightConfig in AddAzureHDInsightMetastoreCommand.cs but then neglecting to copy the ClusterType member in AddAzureHDInsightMetastoreCmdlet.cs
AddAzureHDInsightScriptActionCmdlet.cs is a more recently added cmdlet and has a comprehensive(currently) copy of the members of the passed-in Config parameter.
AddAzureHDInsightStorageCmdlet.cs and AddAzureHDInsightStorageCmdlet.cs had similar omissions.
This pull request copies the implementation from AddAzureHDInsightScriptActionCmdlet.cs to the three implementations that are missing fields. A better long-term solution might be to implement a copy constructor on the AzureHDInsightConfig class and just use that in each cmdlet implementation when you need to create a new Config that contains all of the fields of a passed-in Config. Let me know if you'd rather see that change and I can refactor.
This problem was originally reported through a support case, feel free to contact me (rickhall at microsoft.com) with any questions.