Package org.apache.hadoop.conf

Examples of org.apache.hadoop.conf.Configuration.addResource()


        Path confPath = new Path("file:///"
                + System.getProperty("oozie.action.conf.xml"));

        LOG.info(confPath + " found conf ? "
                + confPath.getFileSystem(conf).exists(confPath));
        conf.addResource(confPath);

        String falconFeedStorageType = cmd.getOptionValue("falconFeedStorageType").trim();
        Storage.TYPE feedStorageType = Storage.TYPE.valueOf(falconFeedStorageType);

        DistCp distCp = (feedStorageType == Storage.TYPE.FILESYSTEM)
View Full Code Here


        String classpathFile = "hadoop-" + jobTrackerSpec + ".xml";
        URL validate = conf.getResource(classpathFile);
        if (validate == null) {
          throw new RuntimeException(classpathFile + " not found on CLASSPATH");
        }
        conf.addResource(classpathFile);
      }
    }
    return conf;
  }
View Full Code Here

    this.infoServer = new HttpServer("datanode", infoHost, tmpInfoPort,
        tmpInfoPort == 0, conf);
    InetSocketAddress secInfoSocAddr = NetUtils.createSocketAddr(
        conf.get("dfs.datanode.https.address", infoHost + ":" + 0));
    Configuration sslConf = new Configuration(conf);
    sslConf.addResource(conf.get("https.keystore.info.rsrc", "sslinfo.xml"));
    String keyloc = sslConf.get("https.keystore.location");
    if (null != keyloc) {
      this.infoServer.addSslListener(secInfoSocAddr, keyloc,
          sslConf.get("https.keystore.password", ""),
          sslConf.get("https.keystore.keypassword", ""));
View Full Code Here

        String classpathFile = "hadoop-" + jobTrackerSpec + ".xml";
        URL validate = conf.getResource(classpathFile);
        if (validate == null) {
          throw new RuntimeException(classpathFile + " not found on CLASSPATH");
        }
        conf.addResource(classpathFile);
      }
    }
    return conf;
  }
View Full Code Here

  @Override
  public Configuration loadConfFile() throws IOException {
    Path confPath = getConfFile();
    FileContext fc = FileContext.getFileContext(confPath.toUri(), conf);
    Configuration jobConf = new Configuration(false);
    jobConf.addResource(fc.open(confPath), confPath.toString());
    return jobConf;
  }
}
View Full Code Here

      return cachedInstance = new MockInstance(instance);
    if (siteFile != null) {
      AccumuloConfiguration config = new AccumuloConfiguration() {
        Configuration xml = new Configuration();
        {
          xml.addResource(new Path(siteFile));
        }
       
        @Override
        public Iterator<Entry<String,String>> iterator() {
          TreeMap<String,String> map = new TreeMap<String,String>();
View Full Code Here

   */
  public static Configuration initConfResources() {
    String flumebaseConfFile = new File(getAppConfDir(), "flumebase-site.xml").toString();
    LOG.debug("Initializing configuration from " + flumebaseConfFile);
    Configuration conf = new Configuration();
    conf.addResource(new Path(flumebaseConfFile));
    return conf;
  }
}
View Full Code Here

  }

  /** Set up SSL resources */
  private static void setupSsl(Configuration conf) {
    Configuration sslConf = new Configuration(false);
    sslConf.addResource(conf.get("dfs.https.client.keystore.resource",
        "ssl-client.xml"));
    System.setProperty("javax.net.ssl.trustStore", sslConf.get(
        "ssl.client.truststore.location", ""));
    System.setProperty("javax.net.ssl.trustStorePassword", sslConf.get(
        "ssl.client.truststore.password", ""));
View Full Code Here

        String classpathFile = "hadoop-" + jobTrackerSpec + ".xml";
        URL validate = conf.getResource(classpathFile);
        if (validate == null) {
          throw new RuntimeException(classpathFile + " not found on CLASSPATH");
        }
        conf.addResource(classpathFile);
      }
    }
    return conf;
  }
View Full Code Here

          RunningJob job = jc.getJob(status.getJobID());
          if (job.getJobName().equals(LogSort.getJobName())) {
            log.info("found a running " + job.getJobName());
            Configuration jobConfig = new Configuration(false);
            log.info("fetching configuration from " + job.getJobFile());
            jobConfig.addResource(TraceFileSystem.wrap(FileUtil.getFileSystem(conf, ServerConfiguration.getSiteConfiguration())).open(
                new Path(job.getJobFile())));
            if (HdfsZooInstance.getInstance().getInstanceID().equals(jobConfig.get(LogSort.INSTANCE_ID_PROPERTY))) {
              log.info("Killing job " + job.getID().toString());
            }
          }
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.