Package org.apache.hadoop.security.ssl

Examples of org.apache.hadoop.security.ssl.SSLFactory


    synchronized (Fetcher.class) {
      sslShuffle = job.getBoolean(MRConfig.SHUFFLE_SSL_ENABLED_KEY,
                                  MRConfig.SHUFFLE_SSL_ENABLED_DEFAULT);
      if (sslShuffle && sslFactory == null) {
        sslFactory = new SSLFactory(SSLFactory.Mode.CLIENT, job);
        try {
          sslFactory.init();
        } catch (Exception ex) {
          sslFactory.destroy();
          throw new RuntimeException(ex);
View Full Code Here


  private static String readOut(URL url) throws Exception {
    StringBuilder out = new StringBuilder();
    HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
    Configuration conf = new Configuration();
    conf.addResource(CONFIG_SITE_XML);
    SSLFactory sslf = new SSLFactory(SSLFactory.Mode.CLIENT, conf);
    sslf.init();
    conn.setSSLSocketFactory(sslf.createSSLSocketFactory());
    InputStream in = conn.getInputStream();
    byte[] buffer = new byte[64 * 1024];
    int len = in.read(buffer);
    while (len > 0) {
      out.append(new String(buffer, 0, len));
View Full Code Here

    public HttpPipelineFactory(Configuration conf) throws Exception {
      SHUFFLE = getShuffle(conf);
      if (conf.getBoolean(MRConfig.SHUFFLE_SSL_ENABLED_KEY,
                          MRConfig.SHUFFLE_SSL_ENABLED_DEFAULT)) {
        sslFactory = new SSLFactory(SSLFactory.Mode.SERVER, conf);
        sslFactory.init();
      }
    }
View Full Code Here

      if(sslEnabled) {
        //Create sslFactory if it is null or if it was destroyed earlier
        if (sslFactory == null || sslFactory.getKeystoresFactory()
            .getTrustManagers() == null) {
          LOG.info("Initializing SSL factory in HttpConnection");
          sslFactory = new SSLFactory(SSLFactory.Mode.CLIENT, conf);
          try {
            sslFactory.init();
          } catch (Exception ex) {
            sslFactory.destroy();
            sslFactory = null;
View Full Code Here

    this.adminsAcl = adminsAcl;
   
    if(connector == null) {
      listenerStartedExternally = false;
      if (HttpConfig.isSecure()) {
        sslFactory = new SSLFactory(SSLFactory.Mode.SERVER, conf);
        try {
          sslFactory.init();
        } catch (GeneralSecurityException ex) {
          throw new IOException(ex);
        }
View Full Code Here

    this.adminsAcl = adminsAcl;
   
    if(connector == null) {
      listenerStartedExternally = false;
      if (HttpConfig.isSecure()) {
        sslFactory = new SSLFactory(SSLFactory.Mode.SERVER, conf);
        try {
          sslFactory.init();
        } catch (GeneralSecurityException ex) {
          throw new IOException(ex);
        }
View Full Code Here

    synchronized (Fetcher.class) {
      sslShuffle = job.getBoolean(MRConfig.SHUFFLE_SSL_ENABLED_KEY,
                                  MRConfig.SHUFFLE_SSL_ENABLED_DEFAULT);
      if (sslShuffle && sslFactory == null) {
        sslFactory = new SSLFactory(SSLFactory.Mode.CLIENT, job);
        try {
          sslFactory.init();
        } catch (Exception ex) {
          sslFactory.destroy();
          throw new RuntimeException(ex);
View Full Code Here

    public HttpPipelineFactory(Configuration conf) throws Exception {
      SHUFFLE = getShuffle(conf);
      if (conf.getBoolean(MRConfig.SHUFFLE_SSL_ENABLED_KEY,
                          MRConfig.SHUFFLE_SSL_ENABLED_DEFAULT)) {
        sslFactory = new SSLFactory(SSLFactory.Mode.SERVER, conf);
        sslFactory.init();
      }
    }
View Full Code Here

        NetUtils.addStaticResolution(hosts[i - curDatanodesNum], "localhost");
      }
     
      SecureResources secureResources = null;
      if (UserGroupInformation.isSecurityEnabled()) {
        SSLFactory sslFactory = new SSLFactory(SSLFactory.Mode.SERVER, dnConf);
        try {
          secureResources = SecureDataNodeStarter.getSecureResources(sslFactory, dnConf);
        } catch (Exception ex) {
          ex.printStackTrace();
        }
View Full Code Here

        NetUtils.addStaticResolution(hosts[i - curDatanodesNum], "localhost");
      }

      SecureResources secureResources = null;
      if (UserGroupInformation.isSecurityEnabled()) {
        SSLFactory sslFactory = new SSLFactory(SSLFactory.Mode.SERVER, dnConf);
        try {
          secureResources = SecureDataNodeStarter.getSecureResources(sslFactory, dnConf);
        } catch (Exception ex) {
          ex.printStackTrace();
        }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.security.ssl.SSLFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.