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

Fix multiple mount options not recognized #18026

Merged
merged 2 commits into from
Aug 22, 2023

Conversation

dbw9580
Copy link
Contributor

@dbw9580 dbw9580 commented Aug 18, 2023

What changes are proposed in this pull request?

Fix multiple mount options specified by -o not recognized by Alluxio Fuse.
The -o option can be specified multiple times, and each time it can take a comma separated list of key=value mount options.

Why are the changes needed?

Fuse mounting with bin/alluxio-fuse mount hdfs://10.10.1.2:9000/ /work/alluxio_fuse -o kernel_cache -o attr_timeout=6000 -o entry_timeout=6000 errors with

Exception in thread "main" com.beust.jcommander.ParameterException: "-o": couldn't convert "kernel_cache,attr_timeout=6000,entry_timeout=6000" to a `key=value` pair because contains more than 1 `=`
	at alluxio.fuse.options.MountCliOptions$KvPairsConverter.convert(MountCliOptions.java:74)
	at alluxio.fuse.options.MountCliOptions$KvPairsConverter.convert(MountCliOptions.java:50)
	at com.beust.jcommander.JCommander.convertValue(JCommander.java:1333)
	at com.beust.jcommander.ParameterDescription.addValue(ParameterDescription.java:249)

The bash scripts concatenates the multiple occurrences of -o into a comma-separated list and passes it to the Java program. The PR does the other way around, preserving them and splitting the kv pair list in a -o option into multiple options.

Does this PR introduce any user facing changes?

No.

Copy link
Contributor

@huanghua78 huanghua78 left a comment

Choose a reason for hiding this comment

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

Looks good.

@huanghua78
Copy link
Contributor

I have verified it works.

@dbw9580 dbw9580 added the type-bug This issue is about a bug label Aug 22, 2023
@dbw9580
Copy link
Contributor Author

dbw9580 commented Aug 22, 2023

alluxio-bot, merge this please

@alluxio-bot alluxio-bot merged commit 0cb89b7 into Alluxio:main Aug 22, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug This issue is about a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants