Examples of MRInputLegacy


Examples of org.apache.tez.mapreduce.input.MRInputLegacy

  }

  @Override
  void run() throws IOException{

    MRInputLegacy in = TezProcessor.getMRInput(inputs);
    KeyValueReader reader = in.getReader();

    //process records until done
    while(reader.next()){
      //ignore the key for maps -  reader.getCurrentKey();
      Object value = reader.getCurrentValue();
View Full Code Here

Examples of org.apache.tez.mapreduce.input.MRInputLegacy

    return connectOps;
  }

  private MRInputLegacy getMRInput(Map<String, LogicalInput> inputs) throws Exception {
    // there should be only one MRInput
    MRInputLegacy theMRInput = null;
    l4j.info("The input names are: " + Arrays.toString(inputs.keySet().toArray()));
    for (Entry<String, LogicalInput> inp : inputs.entrySet()) {
      if (inp.getValue() instanceof MRInputLegacy) {
        if (theMRInput != null) {
          throw new IllegalArgumentException("Only one MRInput is expected");
        }
        // a better logic would be to find the alias
        theMRInput = (MRInputLegacy) inp.getValue();
      } else if (inp.getValue() instanceof MultiMRInput) {
        multiMRInputMap.put(inp.getKey(), (MultiMRInput) inp.getValue());
      }
    }
    if (theMRInput != null) {
      theMRInput.init();
    } else {
      String alias = mapWork.getAliasToWork().keySet().iterator().next();
      if (inputs.get(alias) instanceof MultiMRInput) {
        mainWorkMultiMRInput = (MultiMRInput) inputs.get(alias);
      } else {
View Full Code Here

Examples of org.apache.tez.mapreduce.input.MRInputLegacy

    return true; //give me more
  }

  private MRInputLegacy getMRInput(Map<String, LogicalInput> inputs) throws Exception {
    // there should be only one MRInput
    MRInputLegacy theMRInput = null;
    LOG.info("VDK: the inputs are: " + inputs);
    for (Entry<String, LogicalInput> inp : inputs.entrySet()) {
      if (inp.getValue() instanceof MRInputLegacy) {
        if (theMRInput != null) {
          throw new IllegalArgumentException("Only one MRInput is expected");
        }
        // a better logic would be to find the alias
        theMRInput = (MRInputLegacy) inp.getValue();
      } else {
        throw new IOException("Expecting only one input of type MRInputLegacy. Found type: "
            + inp.getClass().getCanonicalName());
      }
    }
    theMRInput.init();

    return theMRInput;
  }
View Full Code Here

Examples of org.apache.tez.mapreduce.input.MRInputLegacy

     
      LOG.info("Running task: " + processorContext.getUniqueIdentifier());
     
      if (isMap) {
        rproc = new MapRecordProcessor();
        MRInputLegacy mrInput = getMRInput(inputs);
        try {
          mrInput.init();
        } catch (IOException e) {
          throw new RuntimeException("Failed while initializing MRInput", e);
        }
      } else {
        rproc = new ReduceRecordProcessor();
View Full Code Here

Examples of org.apache.tez.mapreduce.input.MRInputLegacy

    }
  }

  static  MRInputLegacy getMRInput(Map<String, LogicalInput> inputs) {
    //there should be only one MRInput
    MRInputLegacy theMRInput = null;
    for(LogicalInput inp : inputs.values()){
      if(inp instanceof MRInputLegacy){
        if(theMRInput != null){
          throw new IllegalArgumentException("Only one MRInput is expected");
        }
View Full Code Here

Examples of org.apache.tez.mapreduce.input.MRInputLegacy

      Map<String, LogicalInput> inputs, Map<String, LogicalOutput> outputs) throws Exception {
    perfLogger.PerfLogBegin(CLASS_NAME, PerfLogger.TEZ_INIT_OPERATORS);
    super.init(jconf, processorContext, mrReporter, inputs, outputs);

    //Update JobConf using MRInput, info like filename comes via this
    MRInputLegacy mrInput = TezProcessor.getMRInput(inputs);
    Configuration updatedConf = mrInput.getConfigUpdates();
    if (updatedConf != null) {
      for (Entry<String, String> entry : updatedConf) {
        jconf.set(entry.getKey(), entry.getValue());
      }
    }
View Full Code Here

Examples of org.apache.tez.mapreduce.input.MRInputLegacy

  }

  @Override
  void run() throws IOException{

    MRInputLegacy in = TezProcessor.getMRInput(inputs);
    KeyValueReader reader = in.getReader();

    //process records until done
    while(reader.next()){
      //ignore the key for maps -  reader.getCurrentKey();
      Object value = reader.getCurrentValue();
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.