tillrohrmann commented on a change in pull request #8144: [FLINK-12159]. Enable 
YarnMiniCluster integration test under non-secure mode
URL: https://github.com/apache/flink/pull/8144#discussion_r275823733
 
 

 ##########
 File path: 
flink-yarn/src/main/java/org/apache/flink/yarn/cli/FlinkYarnSessionCli.java
 ##########
 @@ -449,7 +449,14 @@ public void addGeneralOptions(Options baseOptions) {
        @Override
        public AbstractYarnClusterDescriptor 
createClusterDescriptor(CommandLine commandLine) throws FlinkException {
                final Configuration effectiveConfiguration = 
applyCommandLineOptionsToConfiguration(commandLine);
-
+               // for unit tests only
+               if (System.getenv("IN_TESTS") != null) {
 
 Review comment:
   Instead of leaking the `IN_TESTS` hack out of the 
`AbstractYarnClusterDescriptor`, it would be better if the production and test 
code used the same code path. So for example, the `YarnTestBase` should setup 
the environment in such a way that the normal `FlinkYarnSessionCli` code finds 
the testing `YarnConfiguration`. That way, we would not have to insert special 
environment variables which signal that we are in a test.
   
   An idea could be to modify the HADOOP_HOME env variable which is used when 
loading the Hadoop configuration. Maybe there is some other ENV variable which 
is respected by the YarnConfiguration which one could configure.
   
   I think this would be a better solution to the problem. WDYT?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to