Package org.apache.hadoop.security.ssl

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


    Configuration conf = new Configuration();
   
    // Stash command-line arguments for regular datanode
    args = context.getArguments();
   
    sslFactory = new SSLFactory(SSLFactory.Mode.SERVER, conf);
    resources = getSecureResources(sslFactory, conf);
  }
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

    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

        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.