Package org.apache.hadoop.hive.ql.exec

Examples of org.apache.hadoop.hive.ql.exec.ObjectCache


    } catch (Exception e) {
      l4j.info("cannot get classpath: " + e.getMessage());
    }
    jc = job;

    ObjectCache cache = ObjectCacheFactory.getCache(jc);
    ReduceWork gWork = (ReduceWork) cache.retrieve(PLAN_KEY);
    if (gWork == null) {
      gWork = Utilities.getReduceWork(job);
      cache.cache(PLAN_KEY, gWork);
    } else {
      Utilities.setReduceWork(job, gWork);
    }

    reducer = gWork.getReducer();
View Full Code Here


      l4j.info("cannot get classpath: " + e.getMessage());
    }

    setDone(false);

    ObjectCache cache = ObjectCacheFactory.getCache(job);

    try {
      jc = job;
      execContext.setJc(jc);
      // create map and fetch operators
      MapWork mrwork = (MapWork) cache.retrieve(PLAN_KEY);
      if (mrwork == null) {
        mrwork = Utilities.getMapWork(job);
        cache.cache(PLAN_KEY, mrwork);
      } else {
        Utilities.setMapWork(job, mrwork);
      }
      if (mrwork.getVectorMode()) {
        mo = new VectorMapOperator();
View Full Code Here

  }

  private ObjectCache cache;

  public static TezCacheAccess createInstance(Configuration conf) {
    ObjectCache cache = ObjectCacheFactory.getCache(conf);
    return new TezCacheAccess(cache);
  }
View Full Code Here

  void init(JobConf jconf, TezProcessorContext processorContext, MRTaskReporter mrReporter,
      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);

    ObjectCache cache = ObjectCacheFactory.getCache(jconf);

    rowObjectInspector = new ObjectInspector[Byte.MAX_VALUE];
    ObjectInspector[] valueObjectInspector = new ObjectInspector[Byte.MAX_VALUE];
    ObjectInspector keyObjectInspector;

    redWork = (ReduceWork) cache.retrieve(REDUCE_PLAN_KEY);
    if (redWork == null) {
      redWork = Utilities.getReduceWork(jconf);
      cache.cache(REDUCE_PLAN_KEY, redWork);
    } else {
      Utilities.setReduceWork(jconf, redWork);
    }

    reducer = redWork.getReducer();
View Full Code Here

      l4j.info("Starting Output: " + outputEntry.getKey());
      outputEntry.getValue().start();
      ((TezKVOutputCollector) outMap.get(outputEntry.getKey())).initialize();
    }

    ObjectCache cache = ObjectCacheFactory.getCache(jconf);
    try {

      execContext.setJc(jconf);
      // create map and fetch operators
      mapWork = (MapWork) cache.retrieve(MAP_PLAN_KEY);
      if (mapWork == null) {
        mapWork = Utilities.getMapWork(jconf);
        cache.cache(MAP_PLAN_KEY, mapWork);
        l4j.info("Plan: "+mapWork);
        for (String s: mapWork.getAliases()) {
          l4j.info("Alias: "+s);
        }
      } else {
View Full Code Here

  List<MapWork> mergeWorkList = null;
  private static Map<Integer, DummyStoreOperator> connectOps =
      new TreeMap<Integer, DummyStoreOperator>();

  public MapRecordProcessor(JobConf jconf) throws Exception {
    ObjectCache cache = ObjectCacheFactory.getCache(jconf);
    execContext = new ExecMapperContext(jconf);
    execContext.setJc(jconf);
    // create map and fetch operators
    mapWork = (MapWork) cache.retrieve(MAP_PLAN_KEY);
    if (mapWork == null) {
      mapWork = Utilities.getMapWork(jconf);
      cache.cache(MAP_PLAN_KEY, mapWork);
      l4j.debug("Plan: " + mapWork);
      for (String s: mapWork.getAliases()) {
        l4j.debug("Alias: " + s);
      }
    } else {
      Utilities.setMapWork(jconf, mapWork);
    }

    String prefixes = jconf.get(DagUtils.TEZ_MERGE_WORK_FILE_PREFIXES);
    if (prefixes != null) {
      mergeWorkList = new ArrayList<MapWork>();
      for (String prefix : prefixes.split(",")) {
        MapWork mergeMapWork = (MapWork) cache.retrieve(prefix);
        if (mergeMapWork != null) {
          l4j.info("Found merge work in cache");
          foundCachedMergeWork = true;
          mergeWorkList.add(mergeMapWork);
          continue;
        }
        if (foundCachedMergeWork) {
          throw new Exception(
              "Should find all work in cache else operator pipeline will be in non-deterministic state");
        }

        if ((prefix != null) && (prefix.isEmpty() == false)) {
          mergeMapWork = (MapWork) Utilities.getMergeWork(jconf, prefix);
          mergeWorkList.add(mergeMapWork);
          cache.cache(prefix, mergeMapWork);
        }
      }
    }
  }
View Full Code Here

  void init(JobConf jconf, ProcessorContext processorContext, MRTaskReporter mrReporter,
      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);

    ObjectCache cache = ObjectCacheFactory.getCache(jconf);

    redWork = (ReduceWork) cache.retrieve(REDUCE_PLAN_KEY);
    if (redWork == null) {
      redWork = Utilities.getReduceWork(jconf);
      cache.cache(REDUCE_PLAN_KEY, redWork);
    } else {
      Utilities.setReduceWork(jconf, redWork);
    }

    reducer = redWork.getReducer();
View Full Code Here

        LOG.info("cannot get classpath: " + e.getMessage());
      }
    }
    jc = job;

    ObjectCache cache = ObjectCacheFactory.getCache(jc);
    ReduceWork gWork = (ReduceWork) cache.retrieve(PLAN_KEY);
    if (gWork == null) {
      gWork = Utilities.getReduceWork(job);
      cache.cache(PLAN_KEY, gWork);
    } else {
      Utilities.setReduceWork(job, gWork);
    }

    reducer = gWork.getReducer();
View Full Code Here

      l4j.info("cannot get classpath: " + e.getMessage());
    }

    setDone(false);

    ObjectCache cache = ObjectCacheFactory.getCache(job);

    try {
      jc = job;
      execContext.setJc(jc);
      // create map and fetch operators
      MapWork mrwork = (MapWork) cache.retrieve(PLAN_KEY);
      if (mrwork == null) {
        mrwork = Utilities.getMapWork(job);
        cache.cache(PLAN_KEY, mrwork);
      } else {
        Utilities.setMapWork(job, mrwork);
      }
      if (mrwork.getVectorMode()) {
        mo = new VectorMapOperator();
View Full Code Here

  private boolean abort;

  @Override
  public void configure(JobConf job) {
    jc = job;
    ObjectCache cache = ObjectCacheFactory.getCache(job);
    MapWork mapWork = (MapWork) cache.retrieve(PLAN_KEY);

    // if map work is found in object cache then return it else retrieve the
    // plan from filesystem and cache it
    if (mapWork == null) {
      mapWork = Utilities.getMapWork(job);
      cache.cache(PLAN_KEY, mapWork);
    } else {
      Utilities.setMapWork(job, mapWork);
    }

    try {
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hive.ql.exec.ObjectCache

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.