zjffdu commented on issue #8144: [FLINK-12159]. Enable YarnMiniCluster 
integration test under non-secure mode
URL: https://github.com/apache/flink/pull/8144#issuecomment-483704149
 
 
   @tillrohrmann  I agree with you that test and production should use the same 
code path. 
   Yarn would try to find `yarn-site.xml` under classpath, so for current 
flink's unit test, we have to add `yarn-site.xml` explicitly.  
   
   AFAIK, we have to do 2 things to make test code and production use the same 
code path:
   1. Make sure flink client can connect to Yarn RM. For this, I can think of 2 
approaches:
      a. Instead of running flink job via api, we could launch flink job in 
separated process via `flink run` and set `YARN_CONF_DIR` when using `flink 
run` script.
      b. After starting YarnMiniCluster, copy `yarn-site.xml` to 
`flink-yarn-tests/target/test-classes` so that flink client can load 
`yarn-site.xml`.
   
   2. Make sure JM can connect to Yarn RM.  I am afraid this maybe a bug of 
`YarnMiniCluster` that its NM didn't put `yarn-site.xml` under its container's 
CLASSPATH (Or maybe this is not a bug of `YarnMiniCluster`, because when 
starting NM, there's no `yarn-site.xml`, it is generated after RM/NM is 
started, this is different from real yarn cluster). So the only approach for us 
is we always ship `yarn-site.xml` to JM.
   
   

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to