Package org.apache.hadoop.tools

Examples of org.apache.hadoop.tools.HadoopArchives$HArchivesConvertingMapper


  @Override
  public int createHadoopArchive(Configuration conf, Path sourceDir, Path destDir,
      String archiveName) throws Exception {

    HadoopArchives har = new HadoopArchives(conf);
    List<String> args = new ArrayList<String>();

    if (conf.get("hive.archive.har.parentdir.settable") == null) {
      throw new RuntimeException("hive.archive.har.parentdir.settable is not set");
    }
View Full Code Here


  }

  @Test
  public void testGetTokensForUriWithoutAuth() throws IOException {
    FileSystem fs = dfsCluster.getFileSystem();
    HadoopArchives har = new HadoopArchives(jConf);
    Path archivePath = new Path(fs.getHomeDirectory(), "tmp");
    String[] args = new String[6];
    args[0] = "-archiveName";
    args[1] = "foo1.har";
    args[2] = "-p";
View Full Code Here

 
  // test archives with a -p option
  public void testRelativeArchives() throws Exception {
    fs.delete(archivePath, true);
    Configuration conf = mapred.createJobConf();
    HadoopArchives har = new HadoopArchives(conf);

    {
      String[] args = new String[6];
      args[0] = "-archiveName";
      args[1] = "foo1.har";
View Full Code Here

  }
  public void testArchivesWithMapred() throws Exception {
    fs.delete(archivePath, true);
    Configuration conf = mapred.createJobConf();
    HadoopArchives har = new HadoopArchives(conf);
    String[] args = new String[4];
    //check for destination not specfied
    args[0] = "-archiveName";
    args[1] = "foo.har";
View Full Code Here

      this.namenode = namenode;
      this.jobConf = jobConf;
    }
    protected void execute(final String cmd) throws Exception {
//      JobConf job=new JobConf(conf);
      HadoopArchives archive = new HadoopArchives(jobConf);
      String[] args = getCommandAsArgs(cmd, "NAMENODE", namenode);
      ToolRunner.run(archive, args);
    }
View Full Code Here

    Path root = new Path("/");
    Path qualifiedPath = dest.getPath().makeQualified(destFs);
    String harFileDst = qualifiedPath.getName() + HAR_SUFFIX;
    String harFileSrc = qualifiedPath.getName() + "-" +
                                rand.nextLong() + "-" + HAR_SUFFIX;
    HadoopArchives har = new HadoopArchives(conf);
    String[] args = new String[6];
    args[0] = "-archiveName";
    args[1] = harFileSrc;
    args[2] = "-p";
    args[3] = root.makeQualified(destFs).toString();
View Full Code Here

      }
//      for (FileStatus ds : fs.globStatus(new Path(dir, "*"))){
//        LOG.info("src : "+ds.getPath().toUri().toString());
//      }

      final HadoopArchives har = new HadoopArchives(newConf);
      int rc = ToolRunner.run(har, args);
      if (rc!= 0){
        throw new Exception("Har returned error code "+rc);
      }

View Full Code Here

      }
//      for (FileStatus ds : fs.globStatus(new Path(dir, "*"))){
//        LOG.info("src : "+ds.getPath().toUri().toString());
//      }

      final HadoopArchives har = new HadoopArchives(newConf);
      int rc = ToolRunner.run(har, args);
      if (rc != 0) {
        throw new Exception("Har returned error code " + rc);
      }

View Full Code Here

      }
//      for (FileStatus ds : fs.globStatus(new Path(dir, "*"))){
//        LOG.info("src : "+ds.getPath().toUri().toString());
//      }

      final HadoopArchives har = new HadoopArchives(newConf);
      int rc = ToolRunner.run(har, args);
      if (rc != 0) {
        throw new Exception("Har returned error code " + rc);
      }

View Full Code Here

  @Override
  public int createHadoopArchive(Configuration conf, Path sourceDir, Path destDir,
      String archiveName) throws Exception {

    HadoopArchives har = new HadoopArchives(conf);
    List<String> args = new ArrayList<String>();

    args.add("-archiveName");
    args.add(archiveName);
    args.add(sourceDir.toString());
View Full Code Here

TOP

Related Classes of org.apache.hadoop.tools.HadoopArchives$HArchivesConvertingMapper

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.