Skip to content
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

HBASE-27352 - Quoted string argument with spaces passed from command line are propagated wrongly to the underlying java class #4754

Merged
merged 1 commit into from
Sep 13, 2022

Conversation

ujjawal4046
Copy link
Contributor

@ujjawal4046 ujjawal4046 commented Aug 31, 2022

It is due to the fact that read -r -a CMD_ARGS <<< "$@" in the hbase script would split command line args after expansion of $@ array (i.e. "$@") . Instead a straightforward array copy can be used.

@ujjawal4046
Copy link
Contributor Author

@ndimiduk Can you take a look whenever you get a chance, thanks

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 22s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
_ Patch Compile Tests _
_ Other Tests _
1m 33s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4754/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #4754
Optional Tests
uname Linux e32c90d8a943 5.4.0-109-generic #123-Ubuntu SMP Fri Apr 8 09:10:54 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 10d85f3
Max. process+thread count 43 (vs. ulimit of 30000)
modules C: . U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4754/1/console
versions git=2.17.1 maven=3.6.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 35s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
_ Patch Compile Tests _
_ Other Tests _
2m 40s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4754/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR #4754
Optional Tests
uname Linux 105f3147dc7c 5.4.0-1081-aws #88~18.04.1-Ubuntu SMP Thu Jun 23 16:29:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 10d85f3
Max. process+thread count 29 (vs. ulimit of 30000)
modules C: . U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4754/1/console
versions git=2.17.1 maven=3.6.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 9s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 shelldocs 0m 0s Shelldocs was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+1 💚 spotless 0m 48s branch has no errors when running spotless:check.
_ Patch Compile Tests _
+1 💚 shellcheck 0m 1s There were no new shellcheck issues.
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 spotless 0m 38s patch has no errors when running spotless:check.
_ Other Tests _
+1 💚 asflicense 0m 14s The patch does not generate ASF License warnings.
4m 6s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4754/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #4754
Optional Tests dupname asflicense spotless shellcheck shelldocs
uname Linux b18668201c91 5.4.0-122-generic #138-Ubuntu SMP Wed Jun 22 15:00:31 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / 10d85f3
Max. process+thread count 33 (vs. ulimit of 30000)
modules C: . U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4754/1/console
versions git=2.17.1 maven=3.6.3 shellcheck=0.4.6
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@ndimiduk
Copy link
Member

Looks alright to me @ujjawal4046 . I looked back through the history on the original PR and don't see a reason why I used read instead of a simpler construct... You did some testing after this change?

@ujjawal4046
Copy link
Contributor Author

I looked back through the history on the original PR and don't see a reason why I used read instead of a simpler construct... You did some testing after this change?

Yes, I had tested it manually after doing this change to ensure command line args are passed as it is from script to the underlying java class (for e.g. Import job). @ndimiduk Can you merge this if it looks okay ?

@ndimiduk
Copy link
Member

I can, no problem. One small question before I do -- would you like to update the identity on your commit? Right now, it's [email protected].

…line are propagated wrongly to the underlying java class
@ujjawal4046
Copy link
Contributor Author

@ndimiduk Sorry, looks like my work ID got attached. Have updated it.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 26s Docker mode activated.
-0 ⚠️ yetus 0m 2s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
_ Patch Compile Tests _
_ Other Tests _
1m 13s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4754/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #4754
Optional Tests
uname Linux c52e4cabde9a 5.4.0-109-generic #123-Ubuntu SMP Fri Apr 8 09:10:54 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / f3f88ff
Max. process+thread count 44 (vs. ulimit of 30000)
modules C: . U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4754/2/console
versions git=2.17.1 maven=3.6.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 0m 40s Docker mode activated.
-0 ⚠️ yetus 0m 3s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck
_ Prechecks _
_ master Compile Tests _
_ Patch Compile Tests _
_ Other Tests _
1m 29s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4754/2/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile
GITHUB PR #4754
Optional Tests
uname Linux 74027e703588 5.4.0-1081-aws #88~18.04.1-Ubuntu SMP Thu Jun 23 16:29:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / f3f88ff
Max. process+thread count 33 (vs. ulimit of 30000)
modules C: . U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4754/2/console
versions git=2.17.1 maven=3.6.3
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

@ndimiduk ndimiduk merged commit b3a0489 into apache:master Sep 13, 2022
@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Comment
+0 🆗 reexec 1m 8s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 shelldocs 0m 0s Shelldocs was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
_ master Compile Tests _
+1 💚 spotless 0m 42s branch has no errors when running spotless:check.
_ Patch Compile Tests _
+1 💚 shellcheck 0m 1s There were no new shellcheck issues.
+1 💚 whitespace 0m 0s The patch has no whitespace issues.
+1 💚 spotless 0m 35s patch has no errors when running spotless:check.
_ Other Tests _
+1 💚 asflicense 0m 11s The patch does not generate ASF License warnings.
3m 27s
Subsystem Report/Notes
Docker ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4754/2/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #4754
Optional Tests dupname asflicense spotless shellcheck shelldocs
uname Linux 6980442e98d5 5.4.0-122-generic #138-Ubuntu SMP Wed Jun 22 15:00:31 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision master / f3f88ff
Max. process+thread count 34 (vs. ulimit of 30000)
modules C: . U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4754/2/console
versions git=2.17.1 maven=3.6.3 shellcheck=0.4.6
Powered by Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

ndimiduk pushed a commit to ndimiduk/hbase that referenced this pull request Sep 13, 2022
…line are propagated wrongly to the underlying java class (apache#4754)

Signed-off-by: Nick Dimiduk <[email protected]>
ndimiduk pushed a commit to ndimiduk/hbase that referenced this pull request Sep 13, 2022
…line are propagated wrongly to the underlying java class (apache#4754)

Signed-off-by: Nick Dimiduk <[email protected]>
ndimiduk pushed a commit that referenced this pull request Sep 13, 2022
…line are propagated wrongly to the underlying java class (#4754)

Signed-off-by: Nick Dimiduk <[email protected]>
ndimiduk pushed a commit that referenced this pull request Sep 13, 2022
…line are propagated wrongly to the underlying java class (#4754)

Signed-off-by: Nick Dimiduk <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants