Examples of NoSuchObjectException


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

        ret = executeWithRetry(new Command<Type>() {
          @Override
          Type run(RawStore ms) throws Exception {
            Type type = ms.getType(name);
            if (null == type) {
              throw new NoSuchObjectException("Type \"" + name + "\" not found.");
            }
            return type;
          }
        });
      } catch (NoSuchObjectException e) {
View Full Code Here

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

    } finally {
      if(!commited) {
        rollbackTransaction();
      }
      if(db == null) {
        throw new NoSuchObjectException("There is no database named " + name);
      }
    }
    return db;
  }
View Full Code Here

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

        if(firstException == null) {
          firstException = e;
        }
      } catch (UnknownTableException e) {
        LOG.error(StringUtils.stringifyException(e));
        throw new NoSuchObjectException(e.getMessage());
      } catch (UnknownDBException e) {
        LOG.error(StringUtils.stringifyException(e));
        throw new NoSuchObjectException(e.getMessage());
      }
    }
    throw firstException;
  }
View Full Code Here

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

    Properties schema = MetaStoreUtils.getSchema(tbl);
    try {
      this.createTable(tbl.getTableName(), schema);
    } catch (UnknownTableException e) {
      LOG.error(StringUtils.stringifyException(e));
      throw new NoSuchObjectException(e.getMessage());
    }
  }
View Full Code Here

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

        try {
          getMS().openTransaction();
          // drop any partitions
          tbl = get_table(dbname, name);
          if (tbl == null) {
            throw new NoSuchObjectException(name + " doesn't exist");
          }
          if(tbl.getSd() == null  || tbl.getSd().getLocation() == null) {
            throw new MetaException("Table metadata is corrupted");
          }
          if(!getMS().dropTable(dbname, name)) {
View Full Code Here

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

      public Table get_table(String dbname, String name) throws MetaException, NoSuchObjectException {
        this.incrementCounter("get_table");
        logStartFunction("get_table", dbname, name);
        Table t = getMS().getTable(dbname, name);
        if(t == null) {
          throw new NoSuchObjectException(dbname + "." + name + " table not found");
        }
        return t;
      }
View Full Code Here

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

        Table tbl = null;
        try {
          getMS().openTransaction();
          Partition part = this.get_partition(db_name, tbl_name, part_vals);
          if(part == null) {
            throw new NoSuchObjectException("Partition doesn't exist. " + part_vals);
          }
          if(part.getSd() == null  || part.getSd().getLocation() == null) {
            throw new MetaException("Partition metadata is corrupted");
          }
          if(!getMS().dropPartition(db_name, tbl_name, part_vals)) {
View Full Code Here

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

    try {
      DB db = new DB(name, conf);
      return new Database(db.getName(), db.whRoot_.getName());
    } catch (Exception e) {
      LOG.error(StringUtils.stringifyException(e));
      throw new NoSuchObjectException(e.getMessage());
    }
  }
View Full Code Here

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

      if (!commited) {
        rollbackTransaction();
      }
    }
    if (mdb == null) {
      throw new NoSuchObjectException("There is no database named " + name);
    }
    return mdb;
  }
View Full Code Here

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

      List<String> part_vals) throws NoSuchObjectException, MetaException {
    openTransaction();
    Partition part = convertToPart(getMPartition(dbName, tableName, part_vals));
    commitTransaction();
    if(part == null) {
      throw new NoSuchObjectException("partition values="
          + part_vals.toString());
    }
    part.setValues(part_vals);
    return part;
  }
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.