use of org.apache.hadoop.conf.Configuration in project hadoop by apache.
the class SSLFactory method readSSLConfiguration.
public static Configuration readSSLConfiguration(Configuration conf, Mode mode) {
Configuration sslConf = new Configuration(false);
sslConf.setBoolean(SSL_REQUIRE_CLIENT_CERT_KEY, conf.getBoolean(SSL_REQUIRE_CLIENT_CERT_KEY, SSL_REQUIRE_CLIENT_CERT_DEFAULT));
String sslConfResource;
if (mode == Mode.CLIENT) {
sslConfResource = conf.get(SSL_CLIENT_CONF_KEY, SSL_CLIENT_CONF_DEFAULT);
} else {
sslConfResource = conf.get(SSL_SERVER_CONF_KEY, SSL_SERVER_CONF_DEFAULT);
}
sslConf.addResource(sslConfResource);
return sslConf;
}
use of org.apache.hadoop.conf.Configuration in project hadoop by apache.
the class TraceAdmin method main.
public static void main(String[] argv) throws Exception {
TraceAdmin admin = new TraceAdmin();
admin.setConf(new Configuration());
System.exit(admin.run(argv));
}
use of org.apache.hadoop.conf.Configuration in project hadoop by apache.
the class CredentialShell method main.
/**
* Main program.
*
* @param args
* Command line arguments
* @throws Exception
*/
public static void main(String[] args) throws Exception {
int res = ToolRunner.run(new Configuration(), new CredentialShell(), args);
System.exit(res);
}
use of org.apache.hadoop.conf.Configuration in project hadoop by apache.
the class DefaultImpersonationProvider method getTestProvider.
public static synchronized DefaultImpersonationProvider getTestProvider() {
if (testProvider == null) {
testProvider = new DefaultImpersonationProvider();
testProvider.setConf(new Configuration());
testProvider.init(ProxyUsers.CONF_HADOOP_PROXYUSER);
}
return testProvider;
}
use of org.apache.hadoop.conf.Configuration in project flink by apache.
the class HadoopOutputFormatTest method testCloseWithNeedsTaskCommitFalse.
@Test
public void testCloseWithNeedsTaskCommitFalse() throws Exception {
RecordWriter<String, Long> recordWriter = Mockito.mock(DummyRecordWriter.class);
OutputCommitter outputCommitter = setupOutputCommitter(false);
HadoopOutputFormat<String, Long> hadoopOutputFormat = setupHadoopOutputFormat(new DummyOutputFormat(), Job.getInstance(), recordWriter, outputCommitter, new Configuration());
hadoopOutputFormat.close();
verify(outputCommitter, times(0)).commitTask(any(TaskAttemptContext.class));
verify(recordWriter, times(1)).close(any(TaskAttemptContext.class));
}
Aggregations