Examples of RowContainer


Examples of org.apache.hadoop.hive.ql.exec.persistence.RowContainer

    int bucketSize = HiveConf.getIntVar(hconf,
        HiveConf.ConfVars.HIVEMAPJOINBUCKETCACHESIZE);
    byte storePos = (byte) 0;
    for (Byte alias : order) {
      RowContainer rc = JoinUtil.getRowContainer(hconf,
          rowContainerStandardObjectInspectors.get(storePos),
          alias, bucketSize,spillTableDesc, conf,noOuterJoin);
      nextGroupStorage[storePos] = rc;
      RowContainer candidateRC = JoinUtil.getRowContainer(hconf,
          rowContainerStandardObjectInspectors.get((byte)storePos),
          alias,bucketSize,spillTableDesc, conf,noOuterJoin);
      candidateStorage[alias] = candidateRC;
      storePos++;
    }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.persistence.RowContainer

   * this happens either when the input file of the big table is changed or in
   * closeop. It needs to fetch all the left data from the small tables and try
   * to join them.
   */
  private void joinFinalLeftData() throws HiveException {
    RowContainer bigTblRowContainer = this.candidateStorage[this.posBigTable];

    boolean allFetchOpDone = allFetchOpDone();
    // if all left data in small tables are less than and equal to the left data
    // in big table, let's them catch up
    while (bigTblRowContainer != null && bigTblRowContainer.size() > 0
        && !allFetchOpDone) {
      joinOneGroup();
      bigTblRowContainer = this.candidateStorage[this.posBigTable];
      allFetchOpDone = allFetchOpDone();
    }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.persistence.RowContainer

   * this happens either when the input file of the big table is changed or in
   * closeop. It needs to fetch all the left data from the small tables and try
   * to join them.
   */
  private void joinFinalLeftData() throws HiveException {
    RowContainer bigTblRowContainer = this.candidateStorage[this.posBigTable];

    boolean allFetchDone = allFetchDone();
    // if all left data in small tables are less than and equal to the left data
    // in big table, let's them catch up
    while (bigTblRowContainer != null && bigTblRowContainer.size() > 0
        && !allFetchDone) {
      joinOneGroup();
      bigTblRowContainer = this.candidateStorage[this.posBigTable];
      allFetchDone = allFetchDone();
    }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.persistence.RowContainer

        new HashMapWrapper<MapJoinObjectKey, MapJoinObjectValue>(cacheSize);
     
      mapJoinTables.put(Byte.valueOf((byte)pos), hashTable);
    }
   
    storage.put((byte)posBigTable, new RowContainer());
   
    mapJoinRowsKey = HiveConf.getIntVar(hconf, HiveConf.ConfVars.HIVEMAPJOINROWSIZE);
   
    List<? extends StructField> structFields = ((StructObjectInspector)outputObjInspector).getAllStructFieldRefs();
    if (conf.getOutputColumnNames().size() < structFields.size()) {
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.persistence.RowContainer

         

        HashMapWrapper<MapJoinObjectKey, MapJoinObjectValue> hashTable =  mapJoinTables.get(alias);
        MapJoinObjectKey keyMap = new MapJoinObjectKey(metadataKeyTag, key);
        MapJoinObjectValue o = hashTable.get(keyMap);
        RowContainer res = null;

        boolean needNewKey = true;
        if (o == null) {
          int bucketSize = HiveConf.getIntVar(hconf, HiveConf.ConfVars.HIVEMAPJOINBUCKETCACHESIZE);
          res = new RowContainer(bucketSize);
          res.add(value);
        } else {
          res = o.getObj();
          res.add(value);
          // If key already exists, HashMapWrapper.get() guarantees it is already in main memory HashMap
          // cache. So just replacing the object value should update the HashMapWrapper. This will save
          // the cost of constructing the new key/object and deleting old one and inserting the new one.
          if ( hashTable.cacheSize() > 0) {
            o.setObj(res);
            needNewKey = false;
          }
        }
       
       
        if (metadataValueTag[tag] == -1) {
          metadataValueTag[tag] = nextVal++;
         
          tableDesc valueTableDesc = conf.getValueTblDescs().get(tag);
          SerDe valueSerDe = (SerDe)ReflectionUtils.newInstance(valueTableDesc.getDeserializerClass(), null);
          valueSerDe.initialize(null, valueTableDesc.getProperties());
         
          mapMetadata.put(Integer.valueOf(metadataValueTag[tag]),
                          new MapJoinObjectCtx(
                                ObjectInspectorUtils.getStandardObjectInspector(valueSerDe.getObjectInspector(),
                                  ObjectInspectorCopyOption.WRITABLE),
                                valueSerDe, valueTableDesc, hconf));
        }
       
        // Construct externalizable objects for key and value
        if ( needNewKey ) {
          MapJoinObjectKey keyObj = new MapJoinObjectKey(metadataKeyTag, key);
          MapJoinObjectValue valueObj = new MapJoinObjectValue(metadataValueTag[tag], res);
          valueObj.setConf(hconf);
         
          // This may potentially increase the size of the hashmap on the mapper
          if (res.size() > mapJoinRowsKey) {
            if ( res.size() % 100 == 0 ) {
              LOG.warn("Number of values for a given key " + keyObj + " are " + res.size());
              LOG.warn("used memory " + Runtime.getRuntime().totalMemory());
            }
          }
          hashTable.put(keyObj, valueObj);
        }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.persistence.RowContainer

      values.add((ArrayList<Object>) dummyObj[pos]);
      dummyObjVectors[pos] = values;

      // if serde is null, the input doesn't need to be spilled out
      // e.g., the output columns does not contains the input table
      RowContainer rc = getRowContainer(hconf, pos, alias, joinCacheSize);
      storage.put(pos, rc);
      pos++;
    }

    forwardCache = new Object[totalSz];
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.persistence.RowContainer

    if (serde == null) {
      containerSize = 1;
    }

    RowContainer rc = new RowContainer(containerSize);
    StructObjectInspector rcOI = null;
    if (tblDesc != null) {
      // arbitrary column names used internally for serializing to spill table
      List<String> colNames = Utilities.getColumnNames(tblDesc.getProperties());
      // object inspector for serializing input tuples
      rcOI = ObjectInspectorFactory.getStandardStructObjectInspector(colNames,
          joinValuesStandardObjectInspectors.get(pos));
    }

    rc.setSerDe(serde, rcOI);
    rc.setTableDesc(tblDesc);
    return rc;
  }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.persistence.RowContainer

      values.add((ArrayList<Object>) dummyObj[pos]);
      dummyObjVectors[pos] = values;

      // if serde is null, the input doesn't need to be spilled out
      // e.g., the output columns does not contains the input table
      RowContainer rc = JoinUtil.getRowContainer(hconf,
          rowContainerStandardObjectInspectors.get((byte)pos),
          alias, joinCacheSize,spillTableDesc, conf, !hasFilter(pos), reporter);
      storage.put(pos, rc);

      pos++;
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.persistence.RowContainer

    // all other tables are small, and are cached in the hash table
    posBigTable = conf.getPosBigTable();

    emptyList = new RowContainer<ArrayList<Object>>(1, hconf, reporter);

    RowContainer bigPosRC = JoinUtil.getRowContainer(hconf,
        rowContainerStandardObjectInspectors.get((byte) posBigTable),
        order[posBigTable], joinCacheSize,spillTableDesc, conf,
        !hasFilter(posBigTable), reporter);
    storage.put((byte) posBigTable, bigPosRC);
View Full Code Here

Examples of org.apache.hadoop.hive.ql.exec.persistence.RowContainer

    int bucketSize = HiveConf.getIntVar(hconf,
        HiveConf.ConfVars.HIVEMAPJOINBUCKETCACHESIZE);
    byte storePos = (byte) 0;
    for (Byte alias : order) {
      RowContainer rc = JoinUtil.getRowContainer(hconf,
          rowContainerStandardObjectInspectors.get(storePos),
          alias, bucketSize,spillTableDesc, conf, !hasFilter(storePos),
          reporter);
      nextGroupStorage[storePos] = rc;
      RowContainer candidateRC = JoinUtil.getRowContainer(hconf,
          rowContainerStandardObjectInspectors.get((byte)storePos),
          alias,bucketSize,spillTableDesc, conf, !hasFilter(storePos),
          reporter);
      candidateStorage[alias] = candidateRC;
      storePos++;
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.