wangyang0918 commented on a change in pull request #10193: [FLINK-13938][yarn] 
Use pre-uploaded flink binary to accelerate flink submission
URL: https://github.com/apache/flink/pull/10193#discussion_r350602085
 
 

 ##########
 File path: flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNITCase.java
 ##########
 @@ -129,11 +150,20 @@ private void 
deployPerjob(YarnConfigOptions.UserJarInclusion userJarInclusion) t
                                assertThat(jobResult, is(notNullValue()));
                                
assertThat(jobResult.getSerializedThrowable().isPresent(), is(false));
 
+                               checkStagingDirectory(preUploadedFlinkBinary == 
null, applicationId);
+
                                
waitApplicationFinishedElseKillIt(applicationId, yarnAppTerminateTimeout, 
yarnClusterDescriptor);
                        }
                }
        }
 
+       private void checkStagingDirectory(boolean shouldExist, ApplicationId 
appId) throws IOException {
+               final FileSystem fs = FileSystem.get(YARN_CONFIGURATION);
+               final Path stagingDirectory = new Path(fs.getHomeDirectory(), 
".flink/" + appId.toString());
+               // If pre-uploaded flink is set correctly, the lib directory 
will not be uploaded to staging directory.
+               assertEquals(shouldExist, fs.exists(new Path(stagingDirectory, 
flinkLibFolder.getName())));
 
 Review comment:
   Nice suggestion. I will move the message to `assertEquals`.

----------------------------------------------------------------
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