Example usage for org.apache.hadoop.mapreduce MRConfig SHUFFLE_SSL_ENABLED_KEY

List of usage examples for org.apache.hadoop.mapreduce MRConfig SHUFFLE_SSL_ENABLED_KEY

Introduction

In this page you can find the example usage for org.apache.hadoop.mapreduce MRConfig SHUFFLE_SSL_ENABLED_KEY.

Prototype

String SHUFFLE_SSL_ENABLED_KEY

To view the source code for org.apache.hadoop.mapreduce MRConfig SHUFFLE_SSL_ENABLED_KEY.

Click Source Link

Usage

From source file:org.apache.tez.test.TestSecureShuffle.java

License:Apache License

@Before
public void setupTezCluster() throws Exception {
    if (enableSSLInCluster) {
        // Enable SSL debugging
        System.setProperty("javax.net.debug", "all");
        setupKeyStores();/*from w w w .j  ava 2  s  .  co m*/
    }
    conf.setBoolean(MRConfig.SHUFFLE_SSL_ENABLED_KEY, enableSSLInCluster);

    // 3 seconds should be good enough in local machine
    conf.setInt(TezRuntimeConfiguration.TEZ_RUNTIME_SHUFFLE_CONNECT_TIMEOUT, 3 * 1000);
    conf.setInt(TezRuntimeConfiguration.TEZ_RUNTIME_SHUFFLE_READ_TIMEOUT, 3 * 1000);
    //set to low value so that it can detect failures quickly
    conf.setInt(TezRuntimeConfiguration.TEZ_RUNTIME_SHUFFLE_FETCH_FAILURES_LIMIT, 2);

    miniTezCluster = new MiniTezCluster(
            TestSecureShuffle.class.getName() + "-" + (enableSSLInCluster ? "withssl" : "withoutssl"), 1, 1, 1);

    miniTezCluster.init(conf);
    miniTezCluster.start();
    createSampleFile(inputLoc);
}