Examples of CombineHiveInputSplit


Examples of org.apache.hadoop.hive.ql.io.CombineHiveInputFormat.CombineHiveInputSplit

 
  public CombineHiveRecordReader(InputSplit split, Configuration conf,
                                 Reporter reporter, Integer partition)
    throws IOException {
    JobConf job = (JobConf)conf;
    CombineHiveInputSplit hsplit = new CombineHiveInputSplit(job, (InputSplitShim)split);
    String inputFormatClassName = hsplit.inputFormatClassName();
    Class inputFormatClass = null;
    try {
      inputFormatClass = Class.forName(inputFormatClassName);
    } catch (ClassNotFoundException e) {
      throw new IOException ("CombineHiveRecordReader: class not found " + inputFormatClassName);
    }
    InputFormat inputFormat = CombineHiveInputFormat.getInputFormatFromCache(inputFormatClass, job);
   
    // create a split for the given partition
    FileSplit fsplit = new FileSplit(hsplit.getPaths()[partition],
                                     hsplit.getStartOffsets()[partition],
                                     hsplit.getLengths()[partition],
                                     hsplit.getLocations());
   
    this.recordReader = inputFormat.getRecordReader(fsplit, job, reporter);
  }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.io.CombineHiveInputFormat.CombineHiveInputSplit

    extends HiveContextAwareRecordReader<K, V> {

  public CombineHiveRecordReader(InputSplit split, Configuration conf,
      Reporter reporter, Integer partition) throws IOException {
    super((JobConf)conf);
    CombineHiveInputSplit hsplit = new CombineHiveInputSplit(jobConf,
        (InputSplitShim) split);
    String inputFormatClassName = hsplit.inputFormatClassName();
    Class inputFormatClass = null;
    try {
      inputFormatClass = Class.forName(inputFormatClassName);
    } catch (ClassNotFoundException e) {
      throw new IOException("CombineHiveRecordReader: class not found "
          + inputFormatClassName);
    }
    InputFormat inputFormat = HiveInputFormat.getInputFormatFromCache(
        inputFormatClass, jobConf);

    // create a split for the given partition
    FileSplit fsplit = new FileSplit(hsplit.getPaths()[partition], hsplit
        .getStartOffsets()[partition], hsplit.getLengths()[partition], hsplit
        .getLocations());

    this.setRecordReader(inputFormat.getRecordReader(fsplit, jobConf, reporter));

    this.initIOContext(fsplit, jobConf, inputFormatClass, this.recordReader);
View Full Code Here

Examples of org.apache.hadoop.hive.ql.io.CombineHiveInputFormat.CombineHiveInputSplit

    extends HiveContextAwareRecordReader<K, V> {

  public CombineHiveRecordReader(InputSplit split, Configuration conf,
      Reporter reporter, Integer partition) throws IOException {
    super((JobConf)conf);
    CombineHiveInputSplit hsplit = new CombineHiveInputSplit(jobConf,
        (InputSplitShim) split);
    String inputFormatClassName = hsplit.inputFormatClassName();
    Class inputFormatClass = null;
    try {
      inputFormatClass = Class.forName(inputFormatClassName);
    } catch (ClassNotFoundException e) {
      throw new IOException("CombineHiveRecordReader: class not found "
          + inputFormatClassName);
    }
    InputFormat inputFormat = HiveInputFormat.getInputFormatFromCache(
        inputFormatClass, jobConf);

    // create a split for the given partition
    FileSplit fsplit = new FileSplit(hsplit.getPaths()[partition], hsplit
        .getStartOffsets()[partition], hsplit.getLengths()[partition], hsplit
        .getLocations());

    this.setRecordReader(inputFormat.getRecordReader(fsplit, jobConf, reporter));

    this.initIOContext(fsplit, jobConf, inputFormatClass, this.recordReader);
View Full Code Here

Examples of org.apache.hadoop.hive.ql.io.CombineHiveInputFormat.CombineHiveInputSplit

  private final RecordReader recordReader;

  public CombineHiveRecordReader(InputSplit split, Configuration conf,
      Reporter reporter, Integer partition) throws IOException {
    JobConf job = (JobConf) conf;
    CombineHiveInputSplit hsplit = new CombineHiveInputSplit(job,
        (InputSplitShim) split);
    String inputFormatClassName = hsplit.inputFormatClassName();
    Class inputFormatClass = null;
    try {
      inputFormatClass = Class.forName(inputFormatClassName);
    } catch (ClassNotFoundException e) {
      throw new IOException("CombineHiveRecordReader: class not found "
          + inputFormatClassName);
    }
    InputFormat inputFormat = HiveInputFormat.getInputFormatFromCache(
        inputFormatClass, job);

    // create a split for the given partition
    FileSplit fsplit = new FileSplit(hsplit.getPaths()[partition], hsplit
        .getStartOffsets()[partition], hsplit.getLengths()[partition], hsplit
        .getLocations());

    this.recordReader = inputFormat.getRecordReader(fsplit, job, reporter);
    this.initIOContext(fsplit, job, inputFormatClass, this.recordReader);
  }
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.