[FLINK-29797][flink-yarn] Fix fs.default-scheme will accidentally cau… #24733
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…se temporary flinkConfigFile treated as remote file. also fix [FLINK-33424]
What is the purpose of the change
If user set fs.default-scheme to hdfs://namenode or s3://any, it will cause /tmp/flink-confxxxx FileNotFoundException.
Fix FLINK-29797
also fix FLINK-33424
Brief change log
It is obvious that FileSystem will create a DistributedFileSystem while fs.default-scheme NOT set to file://.
It is obvious that temporary flink-conf.yaml or config.yaml file are created as LocalResource during submission to yarn.
Before change
There is no big diffierence between "job.graph" and flink conf file for registerSingleLocalResource except that
tmpJobGraphFile.toURI()
andtmpConfigurationFile.getAbsolutePath()
After change
tmpConfigurationFile.toURI()
will return correct path withfile://
scheme, soregisterSingleLocalResource
will not treate it as remote files.Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: ( no)Documentation