Skip to content

Fix multiple mount options not recognized#18026

Merged
alluxio-bot merged 2 commits intoAlluxio:mainfrom
dbw9580:fix/fuse-mount-options
Aug 22, 2023
Merged

Fix multiple mount options not recognized#18026
alluxio-bot merged 2 commits intoAlluxio:mainfrom
dbw9580:fix/fuse-mount-options

Conversation

@dbw9580
Copy link
Copy Markdown
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.

@dbw9580 dbw9580 requested a review from huanghua78 August 18, 2023 15:20
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
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

3 participants