Examples of ColumnMapping


Examples of org.apache.hadoop.hive.hbase.ColumnMappings.ColumnMapping

    LazyObjectBase[] fields = getFields();
    boolean [] fieldsInited = getFieldInited();

    if (!fieldsInited[fieldID]) {
      ByteArrayRef ref = null;
      ColumnMapping colMap = columnsMapping[fieldID];

      if (colMap.hbaseRowKey) {
        ref = new ByteArrayRef();
        ref.setData(result.getRow());
      } else if (colMap.hbaseTimestamp) {
View Full Code Here

Examples of org.apache.hadoop.hive.hbase.ColumnMappings.ColumnMapping

    List<String> addedFamilies = new ArrayList<String>();

    if (!readAllColumns) {
      ColumnMapping[] columnsMapping = columnMappings.getColumnsMapping();
      for (int i : readColIDs) {
        ColumnMapping colMap = columnsMapping[i];
        if (colMap.hbaseRowKey || colMap.hbaseTimestamp) {
          continue;
        }

        if (colMap.qualifierName == null) {
View Full Code Here

Examples of org.apache.hadoop.hive.hbase.ColumnMappings.ColumnMapping

      throw new IOException(e);
    }

    int iKey = columnMappings.getKeyIndex();
    int iTimestamp = columnMappings.getTimestampIndex();
    ColumnMapping keyMapping = columnMappings.getKeyMapping();

    // Take filter pushdown into account while calculating splits; this
    // allows us to prune off regions immediately.  Note that although
    // the Javadoc for the superclass getSplits says that it returns one
    // split per region, the implementation actually takes the scan
View Full Code Here

Examples of org.apache.hadoop.hive.hbase.ColumnMappings.ColumnMapping

  public static DecomposedPredicate decomposePredicate(
      JobConf jobConf,
      HBaseSerDe hBaseSerDe,
      ExprNodeDesc predicate) {
    ColumnMapping keyMapping = hBaseSerDe.getHBaseSerdeParam().getKeyColumnMapping();
    ColumnMapping tsMapping = hBaseSerDe.getHBaseSerdeParam().getTimestampColumnMapping();
    IndexPredicateAnalyzer analyzer = HiveHBaseTableInputFormat.newIndexPredicateAnalyzer(
        keyMapping.columnName, keyMapping.isComparable(),
        tsMapping == null ? null : tsMapping.columnName);
    List<IndexSearchCondition> conditions = new ArrayList<IndexSearchCondition>();
    ExprNodeGenericFuncDesc residualPredicate =
View Full Code Here

Examples of org.apache.hadoop.hive.hbase.HBaseSerDe.ColumnMapping

    // The list of families that have been added to the scan
    List<String> addedFamilies = new ArrayList<String>();

    if (!addAll) {
      for (int i : readColIDs) {
        ColumnMapping colMap = columnsMapping.get(i);
        if (colMap.hbaseRowKey) {
          continue;
        }

        if (colMap.qualifierName == null) {
          scan.addFamily(colMap.familyNameBytes);
          addedFamilies.add(colMap.familyName);
        } else {
          if(!addedFamilies.contains(colMap.familyName)){
            // add only if the corresponding family has not already been added
            scan.addColumn(colMap.familyNameBytes, colMap.qualifierNameBytes);
          }
        }

        empty = false;
      }
    }

    // The HBase table's row key maps to a Hive table column. In the corner case when only the
    // row key column is selected in Hive, the HBase Scan will be empty i.e. no column family/
    // column qualifier will have been added to the scan. We arbitrarily add at least one column
    // to the HBase scan so that we can retrieve all of the row keys and return them as the Hive
    // tables column projection.
    if (empty) {
      for (int i = 0; i < columnsMapping.size(); i++) {
        ColumnMapping colMap = columnsMapping.get(i);
        if (colMap.hbaseRowKey) {
          continue;
        }

        if (colMap.qualifierName == null) {
View Full Code Here

Examples of org.apache.hadoop.hive.hbase.HBaseSerDe.ColumnMapping

    List<String> addedFamilies = new ArrayList<String>();

    // REVIEW:  are we supposed to be applying the getReadColumnIDs
    // same as in getRecordReader?
    for (int i = 0; i <columnsMapping.size(); i++) {
      ColumnMapping colMap = columnsMapping.get(i);
      if (colMap.hbaseRowKey) {
        continue;
      }

      if (colMap.qualifierName == null) {
View Full Code Here

Examples of org.apache.hadoop.hive.hbase.HBaseSerDe.ColumnMapping

        }
        // make sure the schema mapping is right
        tableDesc = getHBaseAdmin().getTableDescriptor(Bytes.toBytes(tableName));

        for (int i = 0; i < columnsMapping.size(); i++) {
          ColumnMapping colMap = columnsMapping.get(i);

          if (colMap.hbaseRowKey) {
            continue;
          }
View Full Code Here

Examples of org.apache.hadoop.hive.hbase.HBaseSerDe.ColumnMapping

      List<? extends StructField> fieldRefs =
        ((StructObjectInspector)getInspector()).getAllStructFieldRefs();
      LazyObject<? extends ObjectInspector> [] fields = new LazyObject<?>[fieldRefs.size()];

      for (int i = 0; i < fields.length; i++) {
        ColumnMapping colMap = columnsMapping.get(i);

        if (colMap.qualifierName == null && !colMap.hbaseRowKey) {
          // a column family
          fields[i] = new LazyHBaseCellMap(
              (LazyMapObjectInspector) fieldRefs.get(i).getFieldObjectInspector());
View Full Code Here

Examples of org.apache.hadoop.hive.hbase.HBaseSerDe.ColumnMapping

    LazyObject<?> [] fields = getFields();
    boolean [] fieldsInited = getFieldInited();

    if (!fieldsInited[fieldID]) {
      ByteArrayRef ref = null;
      ColumnMapping colMap = columnsMapping.get(fieldID);

      if (colMap.hbaseRowKey) {
        ref = new ByteArrayRef();
        ref.setData(result.getRow());
      } else {
View Full Code Here

Examples of org.apache.hadoop.hive.hbase.HBaseSerDe.ColumnMapping

        }
        // make sure the schema mapping is right
        tableDesc = getHBaseAdmin().getTableDescriptor(Bytes.toBytes(tableName));

        for (int i = 0; i < columnsMapping.size(); i++) {
          ColumnMapping colMap = columnsMapping.get(i);

          if (colMap.hbaseRowKey) {
            continue;
          }
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.