Skip to content

Conversation

@link3280
Copy link
Contributor

What is the purpose of the change

Currently, Flink client uses the raw default Hadoop filesystem to upload local files, and this could be problematic when using a non-default filesystem for HA or checkpointing in delegation tokens scenarios. The jobmanager only has the delegation tokens for the default FS, so it gets authentication errors when trying to connect a non-default filesystem.

So I propose to make the default FS consistent with the Flink filesystem property fs.default-scheme (if it's set) on the client side (AbstractYarnClusterDescriptor), to avoid this problem and also make the client behavior more configurable.

Brief change log

  • Replace the fs.defaultFS property in the yarn configuration with the initiated Flink filesystem's default scheme if it's not local.

Verifying this change

This change added tests and can be verified as follows:

  • Set the default fs in core.xml to a non-exist fs, and set the fs.default-scheme property to a valid one in flink-conf.yaml, then run the WordCount example to see if it works well. There would be errors while the client tries to upload the files to the remote system if things go wrong.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): no
  • The serializers: no
  • The runtime per-record code paths (performance sensitive): no
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: no
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? not applicable

@link3280
Copy link
Contributor Author

I'd like to add some tests, but it seems that it's hard to expose the state of YARN containers in a UT, and writing an IT for this should be unworthy. I might need some suggestions on this. Thanks!

@link3280
Copy link
Contributor Author

@StefanRRichter would you please have a look at this PR? Should be a quick one. Thanks!

@link3280
Copy link
Contributor Author

link3280 commented Dec 7, 2018

This may break [FLINK-6376] for the application probably will not apply for the HDFS delegation that YARN uses for log aggregation, hence close this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants