org.apache.hadoop.mapred.FileOutputCommitter.getWorkPath()方法的使用及代码示例 您所在的位置:网站首页 导入hadoop包 org.apache.hadoop.mapred.FileOutputCommitter.getWorkPath()方法的使用及代码示例

org.apache.hadoop.mapred.FileOutputCommitter.getWorkPath()方法的使用及代码示例

2023-04-13 21:13| 来源: 网络整理| 查看: 265

本文整理了Java中org.apache.hadoop.mapred.FileOutputCommitter.getWorkPath()方法的一些代码示例,展示了FileOutputCommitter.getWorkPath()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。FileOutputCommitter.getWorkPath()方法的具体详情如下:包路径:org.apache.hadoop.mapred.FileOutputCommitter类名称:FileOutputCommitter方法名:getWorkPath

FileOutputCommitter.getWorkPath介绍

暂无

代码示例

代码示例来源:origin: org.apache.hadoop/hadoop-mapreduce-client-core

Path workPath = committer.getWorkPath(tContext, outDir);File wp = new File(workPath.toUri().getPath());File expectedFile = new File(wp, partFile);

代码示例来源:origin: com.facebook.hadoop/hadoop-core

/** * Helper function to create the task's temporary output directory and * return the path to the task's output file. * * @param conf job-configuration * @param name temporary task-output filename * @return path to the task's temporary output file * @throws IOException */public static Path getTaskOutputPath(JobConf conf, String name) throws IOException { // ${mapred.out.dir} Path outputPath = getOutputPath(conf); if (outputPath == null) { throw new IOException("Undefined job output-path"); } OutputCommitter committer = conf.getOutputCommitter(); Path workPath = outputPath; TaskAttemptContext cOntext= new TaskAttemptContext(conf, TaskAttemptID.forName(conf.get("mapred.task.id"))); if (committer instanceof FileOutputCommitter) { workPath = ((FileOutputCommitter)committer).getWorkPath(context, outputPath); }

// ${mapred.out.dir}/_temporary/_${taskid}/${name} return new Path(workPath, name);}

代码示例来源:origin: ch.cern.hadoop/hadoop-mapreduce-client-core

/** * Helper function to create the task's temporary output directory and * return the path to the task's output file. * * @param conf job-configuration * @param name temporary task-output filename * @return path to the task's temporary output file * @throws IOException */public static Path getTaskOutputPath(JobConf conf, String name) throws IOException { // ${mapred.out.dir} Path outputPath = getOutputPath(conf); if (outputPath == null) { throw new IOException("Undefined job output-path"); } OutputCommitter committer = conf.getOutputCommitter(); Path workPath = outputPath; TaskAttemptContext cOntext= new TaskAttemptContextImpl(conf, TaskAttemptID.forName(conf.get( JobContext.TASK_ATTEMPT_ID))); if (committer instanceof FileOutputCommitter) { workPath = ((FileOutputCommitter)committer).getWorkPath(context, outputPath); }

// ${mapred.out.dir}/_temporary/_${taskid}/${name} return new Path(workPath, name);}

代码示例来源:origin: io.hops/hadoop-mapreduce-client-core

/** * Helper function to create the task's temporary output directory and * return the path to the task's output file. * * @param conf job-configuration * @param name temporary task-output filename * @return path to the task's temporary output file * @throws IOException */public static Path getTaskOutputPath(JobConf conf, String name) throws IOException { // ${mapred.out.dir} Path outputPath = getOutputPath(conf); if (outputPath == null) { throw new IOException("Undefined job output-path"); } OutputCommitter committer = conf.getOutputCommitter(); Path workPath = outputPath; TaskAttemptContext cOntext= new TaskAttemptContextImpl(conf, TaskAttemptID.forName(conf.get( JobContext.TASK_ATTEMPT_ID))); if (committer instanceof FileOutputCommitter) { workPath = ((FileOutputCommitter)committer).getWorkPath(context, outputPath); }

// ${mapred.out.dir}/_temporary/_${taskid}/${name} return new Path(workPath, name);}

代码示例来源:origin: org.jvnet.hudson.hadoop/hadoop-core

/** * Helper function to create the task's temporary output directory and * return the path to the task's output file. * * @param conf job-configuration * @param name temporary task-output filename * @return path to the task's temporary output file * @throws IOException */public static Path getTaskOutputPath(JobConf conf, String name) throws IOException { // ${mapred.out.dir} Path outputPath = getOutputPath(conf); if (outputPath == null) { throw new IOException("Undefined job output-path"); } OutputCommitter committer = conf.getOutputCommitter(); Path workPath = outputPath; TaskAttemptContext cOntext= new TaskAttemptContext(conf, TaskAttemptID.forName(conf.get("mapred.task.id"))); if (committer instanceof FileOutputCommitter) { workPath = ((FileOutputCommitter)committer).getWorkPath(context, outputPath); }

// ${mapred.out.dir}/_temporary/_${taskid}/${name} return new Path(workPath, name);}

代码示例来源:origin: org.apache.hadoop/hadoop-mapred

/** * Helper function to create the task's temporary output directory and * return the path to the task's output file. * * @param conf job-configuration * @param name temporary task-output filename * @return path to the task's temporary output file * @throws IOException */public static Path getTaskOutputPath(JobConf conf, String name) throws IOException { // ${mapred.out.dir} Path outputPath = getOutputPath(conf); if (outputPath == null) { throw new IOException("Undefined job output-path"); } OutputCommitter committer = conf.getOutputCommitter(); Path workPath = outputPath; TaskAttemptContext cOntext= new TaskAttemptContextImpl(conf, TaskAttemptID.forName(conf.get( JobContext.TASK_ATTEMPT_ID))); if (committer instanceof FileOutputCommitter) { workPath = ((FileOutputCommitter)committer).getWorkPath(context, outputPath); }

// ${mapred.out.dir}/_temporary/_${taskid}/${name} return new Path(workPath, name);}

代码示例来源:origin: io.prestosql.hadoop/hadoop-apache

/** * Helper function to create the task's temporary output directory and * return the path to the task's output file. * * @param conf job-configuration * @param name temporary task-output filename * @return path to the task's temporary output file * @throws IOException */public static Path getTaskOutputPath(JobConf conf, String name) throws IOException { // ${mapred.out.dir} Path outputPath = getOutputPath(conf); if (outputPath == null) { throw new IOException("Undefined job output-path"); } OutputCommitter committer = conf.getOutputCommitter(); Path workPath = outputPath; TaskAttemptContext cOntext= new TaskAttemptContextImpl(conf, TaskAttemptID.forName(conf.get( JobContext.TASK_ATTEMPT_ID))); if (committer instanceof FileOutputCommitter) { workPath = ((FileOutputCommitter)committer).getWorkPath(context, outputPath); }

// ${mapred.out.dir}/_temporary/_${taskid}/${name} return new Path(workPath, name);}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-mapreduce-client-core

/** * Helper function to create the task's temporary output directory and * return the path to the task's output file. * * @param conf job-configuration * @param name temporary task-output filename * @return path to the task's temporary output file * @throws IOException */public static Path getTaskOutputPath(JobConf conf, String name) throws IOException { // ${mapred.out.dir} Path outputPath = getOutputPath(conf); if (outputPath == null) { throw new IOException("Undefined job output-path"); } OutputCommitter committer = conf.getOutputCommitter(); Path workPath = outputPath; TaskAttemptContext cOntext= new TaskAttemptContextImpl(conf, TaskAttemptID.forName(conf.get( JobContext.TASK_ATTEMPT_ID))); if (committer instanceof FileOutputCommitter) { workPath = ((FileOutputCommitter)committer).getWorkPath(context, outputPath); }

// ${mapred.out.dir}/_temporary/_${taskid}/${name} return new Path(workPath, name);}



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有