-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HADOOP-16649. hadoop_add_param function : change regexp test by iterative equality test #2385
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
…tive equality test on each value.
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
Just to save everyone a lot of time and suffering: This approach will break a lot of things in very unexpected ways (doing a search on everywhere hadoop_add_params is called should make this clear). hadoop_add_param was specifically built for partial matches because the HADOOP_OPTS command line can't really do exact matches and this was a quick way to prevent duplicate options. The unit test failure in hadoop_finalize_hadoop_heap was intended to provide a hint that "yar they be dragons here." I should have written better tests, but given it took like 2 years just to get most of this code in over the total @#$@#$ that was in hadoop 2.x ... When I wrote the code originally, we didn't have a need for exact matches anywhere (HADOOP_OPTIONAL_TOOLS wasn't written yet). It was written and committed to 3.x. Then the HADOOP_OPTIONAL_TOOLS code was written but that would be the only place where an exact match would be useful and we didn't have any sooo... I just re-used hadoop_add_param with the (clearly faulty) assumption that people would test their code on Hadoop 3.x. But since the azure team didn't bother to test with hadoop 3.x until it was too late... At this point, I was getting tired of the Hadoop politics and bailed, leaving this furball hanging around. Anyway, the real fix for this is to convert HADOOP_OPTIONAL_TOOLS to an array and then do an exact match, looping over the array. I think there is code to do that now. Might need some new helper code to do comma-delimited -> array but that shouldn't be hard. |
|
Hi The new code keeps the privious pattern matching test (sorry for the misleading title) : it will accept a new param only if it is not found using the previous pattern testing and not found using an equality testing (to address the hadoop-azure hadoop-azure-datalake) I also added a specific test for the pattern matching : @test "hadoop_add_param (HADOOP-16649 c )" { |
|
Sad to see no evolution of this PR since 1 month. |
|
🎊 +1 overall
This message was automatically generated. |
The bug HADOOP-16649 is due to a regexp test : hadoop-azure is detected as already present when hadoop-azure-datalake is present.
This PR contains an update for hadoop_add_param function to address the problem, and the corresponding bats test.