Search in sources :

Example 6 with MemoryMonitorInfo

use of org.apache.hadoop.hive.ql.exec.MemoryMonitorInfo in project hive by apache.

the class JoinDesc method clone.

@Override
public Object clone() {
    JoinDesc ret = new JoinDesc();
    Map<Byte, List<ExprNodeDesc>> cloneExprs = new HashMap<Byte, List<ExprNodeDesc>>();
    cloneExprs.putAll(getExprs());
    ret.setExprs(cloneExprs);
    Map<Byte, List<ExprNodeDesc>> cloneFilters = new HashMap<Byte, List<ExprNodeDesc>>();
    cloneFilters.putAll(getFilters());
    ret.setFilters(cloneFilters);
    ret.setConds(getConds().clone());
    ret.setNoOuterJoin(getNoOuterJoin());
    ret.setNullSafes(getNullSafes());
    ret.setHandleSkewJoin(handleSkewJoin);
    ret.setSkewKeyDefinition(getSkewKeyDefinition());
    ret.setTagOrder(getTagOrder().clone());
    if (getMemoryMonitorInfo() != null) {
        ret.setMemoryMonitorInfo(new MemoryMonitorInfo(getMemoryMonitorInfo()));
    }
    if (getKeyTableDesc() != null) {
        ret.setKeyTableDesc((TableDesc) getKeyTableDesc().clone());
    }
    if (getBigKeysDirMap() != null) {
        Map<Byte, Path> cloneBigKeysDirMap = new HashMap<Byte, Path>();
        cloneBigKeysDirMap.putAll(getBigKeysDirMap());
        ret.setBigKeysDirMap(cloneBigKeysDirMap);
    }
    if (getSmallKeysDirMap() != null) {
        Map<Byte, Map<Byte, Path>> cloneSmallKeysDirMap = new HashMap<Byte, Map<Byte, Path>>();
        cloneSmallKeysDirMap.putAll(getSmallKeysDirMap());
        ret.setSmallKeysDirMap(cloneSmallKeysDirMap);
    }
    if (getSkewKeysValuesTables() != null) {
        Map<Byte, TableDesc> cloneSkewKeysValuesTables = new HashMap<Byte, TableDesc>();
        cloneSkewKeysValuesTables.putAll(getSkewKeysValuesTables());
        ret.setSkewKeysValuesTables(cloneSkewKeysValuesTables);
    }
    if (getOutputColumnNames() != null) {
        List<String> cloneOutputColumnNames = new ArrayList<String>();
        cloneOutputColumnNames.addAll(getOutputColumnNames());
        ret.setOutputColumnNames(cloneOutputColumnNames);
    }
    if (getReversedExprs() != null) {
        Map<String, Byte> cloneReversedExprs = new HashMap<String, Byte>();
        cloneReversedExprs.putAll(getReversedExprs());
        ret.setReversedExprs(cloneReversedExprs);
    }
    return ret;
}
Also used : Path(org.apache.hadoop.fs.Path) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) ArrayList(java.util.ArrayList) MemoryMonitorInfo(org.apache.hadoop.hive.ql.exec.MemoryMonitorInfo) ArrayList(java.util.ArrayList) List(java.util.List) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) Map(java.util.Map)

Aggregations

MemoryMonitorInfo (org.apache.hadoop.hive.ql.exec.MemoryMonitorInfo)6 IOException (java.io.IOException)2 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 List (java.util.List)2 MapJoinOperator (org.apache.hadoop.hive.ql.exec.MapJoinOperator)2 MapJoinMemoryExhaustionError (org.apache.hadoop.hive.ql.exec.mapjoin.MapJoinMemoryExhaustionError)2 HiveException (org.apache.hadoop.hive.ql.metadata.HiveException)2 ExprNodeDesc (org.apache.hadoop.hive.ql.plan.ExprNodeDesc)2 OpTraits (org.apache.hadoop.hive.ql.plan.OpTraits)2 LogicalInput (org.apache.tez.runtime.api.LogicalInput)2 KeyValueReader (org.apache.tez.runtime.library.api.KeyValueReader)2 VisibleForTesting (com.google.common.annotations.VisibleForTesting)1 LinkedHashMap (java.util.LinkedHashMap)1 Map (java.util.Map)1 Path (org.apache.hadoop.fs.Path)1 CommonJoinOperator (org.apache.hadoop.hive.ql.exec.CommonJoinOperator)1 CommonMergeJoinOperator (org.apache.hadoop.hive.ql.exec.CommonMergeJoinOperator)1 JoinOperator (org.apache.hadoop.hive.ql.exec.JoinOperator)1 ReduceSinkOperator (org.apache.hadoop.hive.ql.exec.ReduceSinkOperator)1