Package org.apache.hadoop.hdfs

Examples of org.apache.hadoop.hdfs.HdfsConfiguration.addResource()


      // but will retain directories specified in hdfs-site.xml
      // When importing image from a checkpoint, the name-node can
      // start with empty set of storage directories.
      Configuration cE = new HdfsConfiguration(false);
      cE.addResource("core-default.xml");
      cE.addResource("core-site.xml");
      cE.addResource("hdfs-default.xml");
      Collection<String> dirNames2 = cE.getTrimmedStringCollection(propertyName);
      dirNames.removeAll(dirNames2);
      if(dirNames.isEmpty())
        LOG.warn("!!! WARNING !!!" +
View Full Code Here


      // When importing image from a checkpoint, the name-node can
      // start with empty set of storage directories.
      Configuration cE = new HdfsConfiguration(false);
      cE.addResource("core-default.xml");
      cE.addResource("core-site.xml");
      cE.addResource("hdfs-default.xml");
      Collection<String> dirNames2 = cE.getTrimmedStringCollection(propertyName);
      dirNames.removeAll(dirNames2);
      if(dirNames.isEmpty())
        LOG.warn("!!! WARNING !!!" +
          "\n\tThe NameNode currently runs without persistent storage." +
View Full Code Here

            InetSocketAddress secInfoSocAddr = NetUtils.createSocketAddr(conf
                .get(DFSConfigKeys.DFS_NAMENODE_HTTPS_ADDRESS_KEY,
                    DFSConfigKeys.DFS_NAMENODE_HTTPS_ADDRESS_DEFAULT));
            Configuration sslConf = new HdfsConfiguration(false);
            if (certSSL) {
              sslConf.addResource(conf.get(
                  "dfs.https.server.keystore.resource", "ssl-server.xml"));
            }
            httpServer.addSslListener(secInfoSocAddr, sslConf, needClientAuth,
                useKrb);
            // assume same ssl port for all datanodes
View Full Code Here

      boolean needClientAuth = conf.getBoolean(DFS_CLIENT_HTTPS_NEED_AUTH_KEY,
                                               DFS_CLIENT_HTTPS_NEED_AUTH_DEFAULT);
      InetSocketAddress secInfoSocAddr = NetUtils.createSocketAddr(conf.get(
          "dfs.datanode.https.address", infoHost + ":" + 0));
      Configuration sslConf = new HdfsConfiguration(false);
      sslConf.addResource(conf.get("dfs.https.server.keystore.resource",
          "ssl-server.xml"));
      this.infoServer.addSslListener(secInfoSocAddr, sslConf, needClientAuth);
      if(LOG.isDebugEnabled()) {
        LOG.debug("Datanode listening for SSL on " + secInfoSocAddr);
      }
View Full Code Here

          + UtilityOption.GET.getName() + " <hostname> <#port> <path> ] | ["
          + UtilityOption.CHECKCERTS.getName() + " <hostname> <#port> ]");
      System.exit(0);
    }
    Configuration conf = new HdfsConfiguration(false);
    conf.addResource("ssl-client.xml");
    conf.addResource("hdfsproxy-default.xml");

    if (UtilityOption.RELOAD.getName().equalsIgnoreCase(args[0])) {
      // reload user-certs.xml and user-permissions.xml files
      sendCommand(conf, "/reloadPermFiles");
View Full Code Here

          + UtilityOption.CHECKCERTS.getName() + " <hostname> <#port> ]");
      System.exit(0);
    }
    Configuration conf = new HdfsConfiguration(false);
    conf.addResource("ssl-client.xml");
    conf.addResource("hdfsproxy-default.xml");

    if (UtilityOption.RELOAD.getName().equalsIgnoreCase(args[0])) {
      // reload user-certs.xml and user-permissions.xml files
      sendCommand(conf, "/reloadPermFiles");
    } else if (UtilityOption.CHECKCERTS.getName().equalsIgnoreCase(args[0])) {
View Full Code Here

  /** {@inheritDoc} */
  public void init(FilterConfig filterConfig) throws ServletException {
    ServletContext context = filterConfig.getServletContext();
    Configuration conf = new HdfsConfiguration(false);
    conf.addResource("hdfsproxy-default.xml");
    conf.addResource("ssl-server.xml");
    conf.addResource("hdfsproxy-site.xml");
    String nn = conf.get("hdfsproxy.dfs.namenode.address");
    if (nn == null) {
      throw new ServletException("Proxy source cluster name node address not speficied");
View Full Code Here

  /** {@inheritDoc} */
  public void init(FilterConfig filterConfig) throws ServletException {
    ServletContext context = filterConfig.getServletContext();
    Configuration conf = new HdfsConfiguration(false);
    conf.addResource("hdfsproxy-default.xml");
    conf.addResource("ssl-server.xml");
    conf.addResource("hdfsproxy-site.xml");
    String nn = conf.get("hdfsproxy.dfs.namenode.address");
    if (nn == null) {
      throw new ServletException("Proxy source cluster name node address not speficied");
    }
View Full Code Here

  public void init(FilterConfig filterConfig) throws ServletException {
    ServletContext context = filterConfig.getServletContext();
    Configuration conf = new HdfsConfiguration(false);
    conf.addResource("hdfsproxy-default.xml");
    conf.addResource("ssl-server.xml");
    conf.addResource("hdfsproxy-site.xml");
    String nn = conf.get("hdfsproxy.dfs.namenode.address");
    if (nn == null) {
      throw new ServletException("Proxy source cluster name node address not speficied");
    }
    InetSocketAddress nAddr = NetUtils.createSocketAddr(nn);
View Full Code Here

    if (conf.getResource(permLoc) == null) {
      LOG.warn("HdfsProxy user permissions file not found");
      return null;
    }
    Configuration permConf = new HdfsConfiguration(false);
    permConf.addResource(permLoc);
    Map<String, Set<Path>> map = new HashMap<String, Set<Path>>();
    for (Map.Entry<String, String> e : permConf) {
      String k = e.getKey();
      String v = e.getValue();
      if (k != null && k.length() != 0 && v != null && v.length() != 0) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.