aljoscha commented on a change in pull request #7702:
[FLINK-11088][Security][YARN] Allow YARN to discover pre-installed keytab files
URL: https://github.com/apache/flink/pull/7702#discussion_r390328418
##########
File path:
flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java
##########
@@ -887,20 +887,28 @@ private ApplicationReport startAppMaster(
}
}
- // setup security tokens
Path remotePathKeytab = null;
+ String localizedKeytabPath = null;
String keytab =
configuration.getString(SecurityOptions.KERBEROS_LOGIN_KEYTAB);
if (keytab != null) {
- LOG.info("Adding keytab {} to the AM container local
resource bucket", keytab);
- remotePathKeytab = setupSingleLocalResource(
- Utils.KEYTAB_FILE_NAME,
+ boolean requireLocalizedKeytab =
flinkConfiguration.getBoolean(YarnConfigOptions.SHIP_LOCAL_KEYTAB);
+ localizedKeytabPath =
flinkConfiguration.getString(YarnConfigOptions.LOCALIZED_KEYTAB_PATH);
+ if (requireLocalizedKeytab) {
Review comment:
I think this can be moved to the outer if, i.e. `keytab != null &&
requireLocalizedKeytab`
----------------------------------------------------------------
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