Package org.apache.hadoop.hive.metastore.api

Examples of org.apache.hadoop.hive.metastore.api.ColumnStatistics$ColumnStatisticsTupleSchemeFactory


    ColumnStatisticsDesc statsDesc = getPartitionColumnStatisticsDesc(mStatsObj);
    ColumnStatisticsObj statsObj = getPartitionColumnStatisticsObj(mStatsObj);
    List<ColumnStatisticsObj> statsObjs = new ArrayList<ColumnStatisticsObj>();
    statsObjs.add(statsObj);

    ColumnStatistics colStats = new ColumnStatistics();
    colStats.setStatsDesc(statsDesc);
    colStats.setStatsObj(statsObjs);
    return colStats;
  }
View Full Code Here


      statsObj.setColType(colType.get(i));
      unpackStructObject(foi, f, fieldName, statsObj);
      statsObjs.add(statsObj);
    }

    ColumnStatistics colStats = new ColumnStatistics();
    colStats.setStatsDesc(statsDesc);
    colStats.setStatsObj(statsObjs);
    return colStats;
  }
View Full Code Here

      e.printStackTrace();
    }

    if (io != null) {
      // Construct a column statistics object from the result
      ColumnStatistics colStats = constructColumnStatsFromPackedRow(io.oi, io.o);

      // Persist the column statistics object to the metastore
      try {
        db.updatePartitionColumnStatistics(colStats);
      } catch (Exception e) {
View Full Code Here

      e.printStackTrace();
    }

    if (io != null) {
      // Construct a column statistics object from the result
      ColumnStatistics colStats = constructColumnStatsFromPackedRow(io.oi, io.o);

      // Persist the column statistics object to the metastore
      try {
        db.updateTableColumnStatistics(colStats);
      } catch (Exception e) {
View Full Code Here

      dbName = dbName.toLowerCase();
      tableName = tableName.toLowerCase();
      colName = colName.toLowerCase();
      startFunction("get_column_statistics_by_table: db=" + dbName + " table=" + tableName +
                    " column=" + colName);
      ColumnStatistics statsObj = null;
      try {
        statsObj = getMS().getTableColumnStatistics(dbName, tableName, colName);
      } finally {
        endFunction("get_column_statistics_by_table: ", statsObj != null, null, tableName);
      }
View Full Code Here

      tableName = tableName.toLowerCase();
      colName = colName.toLowerCase();
      String convertedPartName = lowerCaseConvertPartName(partName);
      startFunction("get_column_statistics_by_partition: db=" + dbName + " table=" + tableName +
          " partition=" + convertedPartName + " column=" + colName);
      ColumnStatistics statsObj = null;

      try {
        List<String> partVals = getPartValsFromName(getMS(), dbName, tableName, partName);
        statsObj = getMS().getPartitionColumnStatistics(dbName, tableName, convertedPartName,
                                                            partVals, colName);
View Full Code Here

      dbName = dbName.toLowerCase();
      tableName = tableName.toLowerCase();
      colName = colName.toLowerCase();
      startFunction("get_column_statistics_by_table: db=" + dbName + " table=" + tableName +
                    " column=" + colName);
      ColumnStatistics statsObj = null;
      try {
        statsObj = getMS().getTableColumnStatistics(
            dbName, tableName, Lists.newArrayList(colName));
        assert statsObj.getStatsObjSize() <= 1;
        return statsObj;
      } finally {
        endFunction("get_column_statistics_by_table: ", statsObj != null, null, tableName);
      }
    }
View Full Code Here

        throws MetaException, NoSuchObjectException, TException {
      String dbName = request.getDbName(), tblName = request.getTblName();
      startFunction("get_table_statistics_req: db=" + dbName + " table=" + tblName);
      TableStatsResult result = null;
      try {
        ColumnStatistics cs = getMS().getTableColumnStatistics(
            dbName, tblName, request.getColNames());
        result = new TableStatsResult(
            cs == null ? Lists.<ColumnStatisticsObj>newArrayList() : cs.getStatsObj());
      } finally {
        endFunction("get_table_statistics_req: ", result == null, null, tblName);
      }
      return result;
    }
View Full Code Here

      tableName = tableName.toLowerCase();
      colName = colName.toLowerCase();
      String convertedPartName = lowerCaseConvertPartName(partName);
      startFunction("get_column_statistics_by_partition: db=" + dbName + " table=" + tableName +
          " partition=" + convertedPartName + " column=" + colName);
      ColumnStatistics statsObj = null;

      try {
        List<ColumnStatistics> list = getMS().getPartitionColumnStatistics(dbName, tableName,
            Lists.newArrayList(convertedPartName), Lists.newArrayList(colName));
        if (list.isEmpty()) return null;
View Full Code Here

      return null;
    }
    List<Object[]> list = ensureList(qResult);
    if (list.isEmpty()) return null;
    ColumnStatisticsDesc csd = new ColumnStatisticsDesc(true, dbName, tableName);
    ColumnStatistics result = makeColumnStats(list, csd, 0);
    timingTrace(doTrace, queryText, start, queryTime);
    query.closeAll();
    return result;
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hive.metastore.api.ColumnStatistics$ColumnStatisticsTupleSchemeFactory

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.