[ https://issues.apache.org/jira/browse/FLINK-8562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16408457#comment-16408457 ]
ASF GitHub Bot commented on FLINK-8562: --------------------------------------- Github user suez1224 commented on a diff in the pull request: https://github.com/apache/flink/pull/5416#discussion_r176209172 --- Diff: flink-yarn-tests/src/test/java/org/apache/flink/yarn/YarnTestBase.java --- @@ -465,27 +514,23 @@ private static void start(YarnConfiguration conf, String principal, String keyta File flinkConfDirPath = findFile(flinkDistRootDir, new ContainsName(new String[]{"flink-conf.yaml"})); Assert.assertNotNull(flinkConfDirPath); + org.apache.flink.configuration.Configuration flinkCfg = + new org.apache.flink.configuration.Configuration(); if (!StringUtils.isBlank(principal) && !StringUtils.isBlank(keytab)) { + //copy conf dir to test temporary workspace location tempConfPathForSecureRun = tmp.newFolder("conf"); String confDirPath = flinkConfDirPath.getParentFile().getAbsolutePath(); FileUtils.copyDirectory(new File(confDirPath), tempConfPathForSecureRun); - try (FileWriter fw = new FileWriter(new File(tempConfPathForSecureRun, "flink-conf.yaml"), true); - BufferedWriter bw = new BufferedWriter(fw); - PrintWriter out = new PrintWriter(bw)) { - - LOG.info("writing keytab: " + keytab + " and principal: " + principal + " to config file"); - out.println(""); - out.println("#Security Configurations Auto Populated "); - out.println(SecurityOptions.KERBEROS_LOGIN_KEYTAB.key() + ": " + keytab); - out.println(SecurityOptions.KERBEROS_LOGIN_PRINCIPAL.key() + ": " + principal); - out.println(""); - } catch (IOException e) { - throw new RuntimeException("Exception occured while trying to append the security configurations.", e); - } + flinkCfg.setString(SecurityOptions.KERBEROS_LOGIN_KEYTAB.key(), keytab); + flinkCfg.setString(SecurityOptions.KERBEROS_LOGIN_PRINCIPAL.key(), principal); + flinkCfg.setString(CoreOptions.MODE.key(), OLD_MODE); --- End diff -- flinkConfiguration is instance variable and the method here is static. > Fix YARNSessionFIFOSecuredITCase > -------------------------------- > > Key: FLINK-8562 > URL: https://issues.apache.org/jira/browse/FLINK-8562 > Project: Flink > Issue Type: Bug > Components: Security > Affects Versions: 1.5.0, 1.6.0 > Reporter: Shuyi Chen > Assignee: Shuyi Chen > Priority: Blocker > Fix For: 1.5.0 > > > Currently, YARNSessionFIFOSecuredITCase will not fail even if the current > Flink YARN Kerberos integration is failing in production. Please see > FLINK-8275. -- This message was sent by Atlassian JIRA (v7.6.3#76005)