wangyang0918 commented on a change in pull request #8303: [FLINK-12343] 
[flink-yarn] add file replication config for yarn configuration
URL: https://github.com/apache/flink/pull/8303#discussion_r300904382
 
 

 ##########
 File path: 
flink-yarn-tests/src/test/java/org/apache/flink/yarn/YarnTestBase.java
 ##########
 @@ -648,6 +700,29 @@ private static void start(YarnConfiguration conf, String 
principal, String keyta
 
                        File targetTestClassesFolder = new 
File("target/test-classes");
                        writeYarnSiteConfigXML(conf, targetTestClassesFolder);
+
+                       LOG.info("Starting up MiniDFSCluster");
+                       if (miniDFSCluster == null) {
+
+                               Configuration hdfsConfiguration = new 
Configuration();
+                               
hdfsConfiguration.set(MiniDFSCluster.HDFS_MINIDFS_BASEDIR, 
tmpHDFS.getRoot().getAbsolutePath());
+                               
populateHDFSSecureConfigurations(hdfsConfiguration, principal, keytab);
+                               MiniDFSCluster.Builder builder = new 
MiniDFSCluster.Builder(hdfsConfiguration);
+
+                               int port = NAME_NODE_START_PORT;
 
 Review comment:
   I do not think we need to check the available port. MiniDFSCluster will use 
a random port to start namenode, and we just use `hdfsCluster.getURI()` to get 
the schema. Then set `fs.defaultFS` in hadoop configuration.

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