flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mxm <...@git.apache.org>
Subject [GitHub] flink pull request #2275: FLINK-3929 Support for Kerberos Authentication wit...
Date Mon, 19 Sep 2016 12:26:59 GMT
Github user mxm commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2275#discussion_r79355618
  
    --- Diff: flink-yarn/src/main/java/org/apache/flink/yarn/cli/FlinkYarnSessionCli.java
---
    @@ -460,9 +463,27 @@ public static void runInteractiveCli(YarnClusterClient yarnCluster,
boolean read
     		}
     	}
     
    -	public static void main(String[] args) {
    -		FlinkYarnSessionCli cli = new FlinkYarnSessionCli("", ""); // no prefix for the YARN
session
    -		System.exit(cli.run(args));
    +	public static void main(final String[] args) {
    +		final FlinkYarnSessionCli cli = new FlinkYarnSessionCli("", "", true); // no prefix
for the YARN session
    +
    +		String confDirPath = CliFrontend.getConfigurationDirectoryFromEnv();
    +		GlobalConfiguration.loadConfiguration(confDirPath);
    +		Configuration flinkConfiguration = GlobalConfiguration.loadConfiguration();
    +		flinkConfiguration.setString(ConfigConstants.FLINK_BASE_DIR_PATH_KEY, confDirPath);
    +		try {
    +			SecurityContext.install(new SecurityContext.SecurityConfiguration().setFlinkConfiguration(flinkConfiguration));
    +			int retCode = SecurityContext.getInstalled().runSecured(new SecurityContext.FlinkSecuredRunner<Integer>()
{
    +				@Override
    +				public Integer run() {
    +					return cli.run(args);
    +				}
    +			});
    +			System.exit(retCode);
    +		} catch(Exception e) {
    +			e.printStackTrace();
    +			LOG.error("Exception Occured. Reason: {}", e);
    --- End diff --
    
    The signature is `error(String msg, Throwable t)`. You can remove the "Reason: {}".


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message