Search in sources :

Example 1 with MStringList

use of org.apache.hadoop.hive.metastore.model.MStringList in project hive by apache.

the class ObjectStore method covertToSkewedMap.

/**
 * Convert a MStringList Map to a Map
 */
private Map<List<String>, String> covertToSkewedMap(Map<MStringList, String> mMap) {
    Map<List<String>, String> map = null;
    if (mMap != null) {
        map = new HashMap<>();
        Set<MStringList> keys = mMap.keySet();
        for (MStringList key : keys) {
            map.put(new ArrayList<>(key.getInternalList()), mMap.get(key));
        }
    }
    return map;
}
Also used : MStringList(org.apache.hadoop.hive.metastore.model.MStringList) ValidWriteIdList(org.apache.hadoop.hive.common.ValidWriteIdList) ReplicationMetricList(org.apache.hadoop.hive.metastore.api.ReplicationMetricList) LinkedList(java.util.LinkedList) MStringList(org.apache.hadoop.hive.metastore.model.MStringList) ArrayList(java.util.ArrayList) ValidReaderWriteIdList(org.apache.hadoop.hive.common.ValidReaderWriteIdList) List(java.util.List)

Example 2 with MStringList

use of org.apache.hadoop.hive.metastore.model.MStringList in project hive by apache.

the class ObjectStore method covertToMapMStringList.

/**
 * Covert a Map to a MStringList Map
 */
private Map<MStringList, String> covertToMapMStringList(Map<List<String>, String> mMap) {
    Map<MStringList, String> map = null;
    if (mMap != null) {
        map = new HashMap<>();
        Set<List<String>> keys = mMap.keySet();
        for (List<String> key : keys) {
            map.put(new MStringList(key), mMap.get(key));
        }
    }
    return map;
}
Also used : MStringList(org.apache.hadoop.hive.metastore.model.MStringList) ValidWriteIdList(org.apache.hadoop.hive.common.ValidWriteIdList) ReplicationMetricList(org.apache.hadoop.hive.metastore.api.ReplicationMetricList) LinkedList(java.util.LinkedList) MStringList(org.apache.hadoop.hive.metastore.model.MStringList) ArrayList(java.util.ArrayList) ValidReaderWriteIdList(org.apache.hadoop.hive.common.ValidReaderWriteIdList) List(java.util.List)

Aggregations

ArrayList (java.util.ArrayList)2 LinkedList (java.util.LinkedList)2 List (java.util.List)2 ValidReaderWriteIdList (org.apache.hadoop.hive.common.ValidReaderWriteIdList)2 ValidWriteIdList (org.apache.hadoop.hive.common.ValidWriteIdList)2 ReplicationMetricList (org.apache.hadoop.hive.metastore.api.ReplicationMetricList)2 MStringList (org.apache.hadoop.hive.metastore.model.MStringList)2