protected static Configuration createConfiguration(Map<String, String> configOptions) {

		Configuration configuration = new Configuration();
		setConfigurationProperty(configOptions, configuration, CommonConfigurationKeys.FS_DEFAULT_NAME_KEY);
		setConfigurationProperty(configOptions, configuration, YarnConfiguration.RM_HOSTNAME);
		setConfigurationProperty(configOptions, configuration, YarnConfiguration.RM_ADDRESS);
		setConfigurationProperty(configOptions, configuration, YarnConfiguration.RM_SCHEDULER_ADDRESS);
		setConfigurationProperty(configOptions, configuration, YarnConfiguration.YARN_APPLICATION_CLASSPATH);
		setConfigurationProperty(configOptions, configuration, "mapreduce.framework.name");
		if (StringUtils.hasText(configOptions.get("mapreduce.jobhistory.address"))) {
			setConfigurationProperty(configOptions, configuration, "mapreduce.jobhistory.address");
		}
		if (configOptions.containsKey(SECURITY_AUTH_METHOD) && "kerberos".equals(configOptions.get(SECURITY_AUTH_METHOD))) {
			configuration.setBoolean("hadoop.security.authorization", true);
			configuration.set("hadoop.security.authentication", configOptions.get(SECURITY_AUTH_METHOD));
			configuration.set("dfs.namenode.kerberos.principal", configOptions.get(SECURITY_NAMENODE_PRINCIPAL));
			configuration.set("yarn.resourcemanager.principal", configOptions.get(SECURITY_RM_MANAGER_PRINCIPAL));
			if (StringUtils.hasText(configOptions.get(SECURITY_MAPREDUCE_JOBHISTORY_PRINCIPAL))) {
				configuration.set("mapreduce.jobhistory.principal", configOptions.get(SECURITY_MAPREDUCE_JOBHISTORY_PRINCIPAL));
			}
			String userKeytab = configOptions.get(SECURITY_USER_KEYTAB);
			String userPrincipal = configOptions.get(SECURITY_USER_PRINCIPAL);
			UserGroupInformation.setConfiguration(configuration);
			if (StringUtils.hasText(userKeytab)) {
				configuration.set(ConfigurationFactoryBean.USERKEYTAB, userKeytab.trim());
			}
			if (StringUtils.hasText(userPrincipal)) {
				configuration.set(ConfigurationFactoryBean.USERPRINCIPAL, userPrincipal.trim());
			}
			if (StringUtils.hasText(userKeytab) && StringUtils.hasText(userPrincipal)) {
				try {
					SecurityUtil.login(configuration, ConfigurationFactoryBean.USERKEYTAB, ConfigurationFactoryBean.USERPRINCIPAL);
				} catch (Exception e) {
					logger.warn("Cannot login using keytab " + userKeytab + " and principal " + userPrincipal, e);
				}
			}
		}

		for (Entry<String, String> entry : configOptions.entrySet()) {
			String key = entry.getKey();
			if (key.startsWith(SPRING_HADOOP_CONFIG_PREFIX + ".")) {
				String prop = key.substring(SPRING_HADOOP_CONFIG_PREFIX.length() + 1);
				String value = entry.getValue();
				logger.info("Setting configuration property: " + prop + "=" + value);
				configuration.set(prop, value);
			}
		}
		return configuration;
	}
Class for running Sqoop tool.

@since 1.1
@author Thomas Risberg
extensions/spring-xd-extension-sqoop/src/main/java/org/springframework/xd/sqoop/SqoopRunner.java