You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

Discussion threadhttps://lists.apache.org/thread/gv0ro4jsq4o206wg5gz9z5cww15qkvb9
Vote threadTBA
JIRA

Unable to render Jira issues macro, execution error.

Release-

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

Motivation

In a YARN environment, the current handling of classpath configuration using the yarn.provided.lib.dirs property has shown limitations. The yarn.ship-files property is utilized to add specific files to the classpath by including their parent directories. This approach is particularly useful when certain resources, such as hive-site.xml, need to be accessible to the application. However, there's an issue when the application employs Thread.currentThread().getContextClassLoader().getResource("hive-site.xml") to load hive-site.xml, as the parent directory of the resource is not included within Flink's classpath. This limitation prevents the application from effectively accessing the required configuration files.

To address this limitation, this is a proposal to extend the existing approach. The intention is to also incorporate the parent directory of files specified in yarn.provided.lib.dirs to the classpath. This extension will enable the inclusion of the necessary resources in these directories within the application's classpath, thereby providing access to the required configuration files.

Public Interfaces

There will not be any programing interface change. However, the behavior of yarn.provided.lib.dirs will change to also include the parent directory of each file in the class path.

Proposed Changes

The proposed change involves enhancing the classpath configuration mechanism when using the yarn.provided.lib.dirs property. Specifically, the current method of utilizing yarn.ship-files to add specific files' parent directories to the classpath will be extended. This extension will encompass the inclusion of the parent directory of files designated in yarn.provided.lib.dirs as well. This improvement aims to fix the issue where resources required for application configuration are inaccessible due to their parent directories not being included in Flink's classpath.

Compatibility, Deprecation, and Migration Plan

  • No impact on the existing users.
  • The proposed change is not introducing new parameters to the configuration file.
  • No special migration tools required.
  • There is an enhancement to the existing behavior.

Test Plan

  • Unit Test: New unit tests will be introduced to ensure proper inclusion of the parent directories of files specified in yarn.provided.lib.dirs to the classpath. 
  • Manual Test: Add following configuration to flink-conf.yaml and submit Flink job. 

    yarn.provided.lib.dirs: hdfs:///user/testuser/flinkTest/mapreduce/;hdfs:///user/testuser/flinkTest/lib/;hdfs:///user/testuser/flinkTest/plugins/;hdfs:///user/testuser/flinkTest/opt/;hdfs:///user/testuser/resources/;

Rejected Alternatives

No other ways to accomplish the same.

  • No labels