Package org.apache.crunch

Examples of org.apache.crunch.CrunchRuntimeException


   
    try {
      TableMapReduceUtil.addDependencyJars(job);
      FileOutputFormat.setOutputPath(job, outputPath);
    } catch (IOException e) {
      throw new CrunchRuntimeException(e);
    }

    if (null == name) {
      job.setOutputFormatClass(TableOutputFormat.class);
      job.setOutputKeyClass(ImmutableBytesWritable.class);
View Full Code Here


        // Hacking this for Hadoop1 and Hadoop2
        getConfiguration().set("mapreduce.job.cache.local.files", sparkFiles);
        getConfiguration().set("mapred.cache.localFiles", sparkFiles);
      }
    } catch (IOException e) {
      throw new CrunchRuntimeException(e);
    }
  }
View Full Code Here

      try {
        Job job = new Job(ctxt.getConfiguration());
        ptype.configureShuffle(job, options);
        cmp = ReflectionUtils.newInstance(options.getGroupingComparatorClass(), job.getConfiguration());
      } catch (IOException e) {
        throw new CrunchRuntimeException("Error configuring grouping comparator", e);
      }
    }
    return cmp;
  }
View Full Code Here

        ptype.initialize(runtimeContext.getConfiguration());
        Job job = new Job(runtimeContext.getConfiguration());
        ptype.configureShuffle(job, GroupingOptions.builder().partitionerClass(partitionerClass).build());
        partitioner = ReflectionUtils.newInstance(partitionerClass, job.getConfiguration());
      } catch (IOException e) {
        throw new CrunchRuntimeException("Error configuring partitioner", e);
      }
    }
    return partitioner;
  }
View Full Code Here

  @Override
  public R map(T input) {
    try {
      return call(input);
    } catch (Exception e) {
      throw new CrunchRuntimeException(e);
    }
  }
View Full Code Here

  public Pair<K, V> map(T input) {
    try {
      Tuple2<K, V> t = call(input);
      return t == null ? null : Pair.of(t._1(), t._2());
    } catch (Exception e) {
      throw new CrunchRuntimeException(e);
    }
  }
View Full Code Here

  @Override
  public R map(Pair<K, V> input) {
    try {
      return call(input.first(), input.second());
    } catch (Exception e) {
      throw new CrunchRuntimeException(e);
    }
  }
View Full Code Here

    try {
      for (R r : call(input.first(), input.second())) {
        emitter.emit(r);
      }
    } catch (Exception e) {
      throw new CrunchRuntimeException(e);
    }
  }
View Full Code Here

    try {
      for (Tuple2<K, V> kv : call(input)) {
        emitter.emit(Pair.of(kv._1(), kv._2()));
      }
    } catch (Exception e) {
      throw new CrunchRuntimeException(e);
    }
  }
View Full Code Here

    try {
      for (R r : call(input)) {
        emitter.emit(r);
      }
    } catch (Exception e) {
      throw new CrunchRuntimeException(e);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.crunch.CrunchRuntimeException

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.