Ejemplo n.º 1
0
 @Override
 public int build(Path src, Path dest, Configuration conf) throws IOException {
   super.setConf(conf);
   return run(
       new String[] {
         "-" + DocnoMapping.BuilderUtils.COLLECTION_OPTION + "=" + src.toString(),
         "-" + DocnoMapping.BuilderUtils.MAPPING_OPTION + "=" + dest.toString()
       });
 }
Ejemplo n.º 2
0
 public void setConf(Configuration conf) {
   super.setConf(conf);
   if (conf == null) return;
   if (conf.getBoolean("segment.merger.filter", false)) filters = new URLFilters(conf);
   sliceSize = conf.getLong("segment.merger.slice", -1);
   if ((sliceSize > 0) && (LOG.isInfoEnabled())) {
     LOG.info("Slice size: " + sliceSize + " URLs.");
   }
 }
Ejemplo n.º 3
0
  @Override
  public void setConf(Configuration conf) {
    super.setConf(conf);
    if (conf == null) {
      // Configured gets passed null before real conf. Why? I don't know.
      return;
    }
    serverHostname = conf.get(REST_API_CLUSTER_MANAGER_HOSTNAME, DEFAULT_SERVER_HOSTNAME);
    serverUsername = conf.get(REST_API_CLUSTER_MANAGER_USERNAME, DEFAULT_SERVER_USERNAME);
    serverPassword = conf.get(REST_API_CLUSTER_MANAGER_PASSWORD, DEFAULT_SERVER_PASSWORD);
    clusterName = conf.get(REST_API_CLUSTER_MANAGER_CLUSTER_NAME, DEFAULT_CLUSTER_NAME);

    // Add filter to Client instance to enable server authentication.
    client.addFilter(new HTTPBasicAuthFilter(serverUsername, serverPassword));
  }
 @Override
 public void setConf(Configuration conf) {
   super.setConf(conf);
   if (conf == null) return;
   int oldDefaultInterval = conf.getInt("db.default.fetch.interval", 0);
   defaultInterval = conf.getInt("db.fetch.interval.default", 0);
   if (oldDefaultInterval > 0 && defaultInterval == 0)
     defaultInterval = oldDefaultInterval * SECONDS_PER_DAY;
   int oldMaxInterval = conf.getInt("db.max.fetch.interval", 0);
   maxInterval = conf.getInt("db.fetch.interval.max", 0);
   if (oldMaxInterval > 0 && maxInterval == 0)
     maxInterval = oldMaxInterval * FetchSchedule.SECONDS_PER_DAY;
   LOG.info("defaultInterval=" + defaultInterval);
   LOG.info("maxInterval=" + maxInterval);
 }
Ejemplo n.º 5
0
 public RebuildAll(Conf conf, Configuration hadoopConf) {
   conf_ = conf;
   super.setConf(hadoopConf);
 }
Ejemplo n.º 6
0
 @Override
 public void setConf(Configuration conf) {
   super.setConf(conf);
   TEST_UTIL = new HBaseTestingUtility(conf);
 }