Examples of NoSuchObjectException


Examples of org.apache.hadoop.hive.metastore.api.NoSuchObjectException

    try {
      openTransaction();
      MPartition mpart = getMPartition(dbName, tblName, partVals);
      if (mpart == null) {
        commitTransaction();
        throw new NoSuchObjectException("partition values="
            + partVals.toString());
      }
      Partition part = null;
      MTable mtbl = mpart.getTable();
      part = convertToPart(mpart);
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.api.NoSuchObjectException

    dbName = dbName.toLowerCase().trim();
    tableName = tableName.toLowerCase().trim();
    Table table = getTable(dbName, tableName);

    if (table == null) {
      throw new NoSuchObjectException(dbName + "." + tableName + " table not found");
    }

    List<FieldSchema> partCols = table.getPartitionKeys();
    int numPartKeys = partCols.size();
    if (part_vals.size() > numPartKeys) {
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.api.NoSuchObjectException

  }

  private MTable ensureGetMTable(String dbName, String tblName) throws NoSuchObjectException {
    MTable mtable = getMTable(dbName, tblName);
    if (mtable == null) {
      throw new NoSuchObjectException("Specified database/table does not exist : "
          + dbName + "." + tblName);
    }
    return mtable;
  }
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.api.NoSuchObjectException

  }

  public Role getRole(String roleName) throws NoSuchObjectException {
    MRole mRole = this.getMRole(roleName);
    if (mRole == null) {
      throw new NoSuchObjectException(roleName + " role can not be found.");
    }
    Role ret = new Role(mRole.getRoleName(), mRole.getCreateTime(), mRole
        .getOwnerName());
    return ret;
  }
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.api.NoSuchObjectException

     String dbName = statsDesc.getDbName();
     String tableName = statsDesc.getTableName();
     MTable table = getMTable(dbName, tableName);

     if (table == null) {
       throw new NoSuchObjectException("Table " + tableName +
       " for which stats is gathered doesn't exist.");
     }

     MTableColumnStatistics mColStats = new MTableColumnStatistics();
     mColStats.setTable(table);
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.api.NoSuchObjectException

    }

    MPartition partition  = getMPartition(statsDesc.getDbName(), statsDesc.getTableName(), partVal);

    if (partition == null) {
      throw new NoSuchObjectException("Partition for which stats is gathered doesn't exist.");
    }

    MPartitionColumnStatistics mColStats = new MPartitionColumnStatistics();
    mColStats.setPartition(partition);
    mColStats.setDbName(statsDesc.getDbName());
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.api.NoSuchObjectException

     MTable mTable = getMTable(mStatsObj.getDbName(), mStatsObj.getTableName());
     boolean foundCol = false;

     if (mTable == null) {
        throw new
          NoSuchObjectException("Table " + tableName +
          " for which stats gathering is requested doesn't exist.");
      }

      MStorageDescriptor mSDS = mTable.getSd();
      List<MFieldSchema> colList = mSDS.getCD().getCols();

      for(MFieldSchema mCol:colList) {
        if (mCol.getName().equals(mStatsObj.getColName().trim())) {
          foundCol = true;
          break;
        }
      }

      if (!foundCol) {
        throw new
          NoSuchObjectException("Column " + colName +
          " for which stats gathering is requested doesn't exist.");
      }

      MTableColumnStatistics oldStatsObj = getMTableColumnStatistics(dbName, tableName, colName);
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.api.NoSuchObjectException

    MTable mTable = getMTable(mStatsObj.getDbName(), mStatsObj.getTableName());
    boolean foundCol = false;

    if (mTable == null) {
      throw new
        NoSuchObjectException("Table " + tableName +
        " for which stats gathering is requested doesn't exist.");
    }

    MPartition mPartition =
                 getMPartition(mStatsObj.getDbName(), mStatsObj.getTableName(), partVal);

    if (mPartition == null) {
      throw new
        NoSuchObjectException("Partition " + partName +
        " for which stats gathering is requested doesn't exist");
    }

    MStorageDescriptor mSDS = mPartition.getSd();
    List<MFieldSchema> colList = mSDS.getCD().getCols();

    for(MFieldSchema mCol:colList) {
      if (mCol.getName().equals(mStatsObj.getColName().trim())) {
        foundCol = true;
        break;
      }
    }

    if (!foundCol) {
      throw new
        NoSuchObjectException("Column " + colName +
        " for which stats gathering is requested doesn't exist.");
    }

    MPartitionColumnStatistics oldStatsObj = getMPartitionColumnStatistics(dbName, tableName,
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.api.NoSuchObjectException

      MTableColumnStatistics mStatsObj = null;
      MTable mTable = getMTable(dbName.trim(), tableName.trim());
      boolean foundCol = false;

      if (mTable == null) {
        throw new NoSuchObjectException("Table " + tableName +
        " for which stats is requested doesn't exist.");
      }

      MStorageDescriptor mSDS = mTable.getSd();
      List<MFieldSchema> colList = mSDS.getCD().getCols();

      for(MFieldSchema mCol:colList) {
        if (mCol.getName().equals(colName.trim())) {
          foundCol = true;
          break;
        }
      }

      if (!foundCol) {
        throw new NoSuchObjectException("Column " + colName +
        " for which stats is requested doesn't exist.");
      }

      Query query = pm.newQuery(MTableColumnStatistics.class);
      query.setFilter("table.tableName == t1 && " +
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.api.NoSuchObjectException

  {
    ColumnStatistics statsObj;
    MTableColumnStatistics mStatsObj = getMTableColumnStatistics(dbName, tableName, colName);

    if (mStatsObj == null) {
      throw new NoSuchObjectException("Statistics for dbName=" + dbName + " tableName=" + tableName
        + " columnName=" + colName + " doesn't exist.");
    }

    statsObj = convertToTableColumnStatistics(mStatsObj);
    return statsObj;
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.