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

Examples of org.apache.hadoop.hive.metastore.api.UnknownTableException$UnknownTableExceptionStandardScheme


      Table tbl;
      try {
        tbl = get_table(db, base_table_name);
      } catch (NoSuchObjectException e) {
        throw new UnknownTableException(e.getMessage());
      }
      boolean getColsFromSerDe = SerDeUtils.shouldGetColsFromSerDe(
        tbl.getSd().getSerdeInfo().getSerializationLib());
      if (!getColsFromSerDe) {
        return tbl.getSd().getCols();
View Full Code Here


      Table tbl;
      try {
        tbl = get_table(db, base_table_name);
      } catch (NoSuchObjectException e) {
        throw new UnknownTableException(e.getMessage());
      }
      List<FieldSchema> fieldSchemas = get_fields(db, base_table_name);

      if (tbl == null || fieldSchemas == null) {
        throw new UnknownTableException(tableName + " doesn't exist");
      }

      if (tbl.getPartitionKeys() != null) {
        // Combine the column field schemas and the partition keys to create the
        // whole schema
View Full Code Here

    conf_ = conf;
    store_ = new FileStore(conf); // only choice for now

    // check and load the schema
    if(store_.tableExists(parent_.getName(), tableName) == false) {
      throw new UnknownTableException("metadata does not exist");
    }
    schema_ = store_.load(parent, tableName);

    // check the table location is on the default dfs server for safety
    whPath_ = new Path(schema_.getProperty(Constants.META_TABLE_LOCATION));
    if(whPath_.toUri().relativize(parent.whRoot_.toUri()) == null) {
      // something potentially wrong as the stored warehouse not the same as our default
      // in general we want this, but in the short term, it can't happen
      LOG.warn(whPath_ + " is not the current default fs");
    }

    // check the data directory is there
    try {
      if(whPath_.getFileSystem(conf).exists(whPath_) == false) {
        throw new UnknownTableException("data does not exist:" + whPath_);
      }
    } catch(IOException e) {
      // ignore
    }
  }
View Full Code Here

      try {
        this.open(store);
        try {
          client.drop_table(dbName, tableName);
        } catch(UnknownDBException e) {
          throw new UnknownTableException();
        }
        close();
        return;
      catch(TException e) {
        System.err.println("get_tables got exception: " + e);
View Full Code Here

      try {
        this.open(store);
        try {
          client.create_table(dbName, tableName, hm);
        } catch(UnknownDBException e) {
          throw new UnknownTableException();
        }
        close();
        return;
      } catch(TException e) {
        System.err.println("get_tables got exception: " + e);
View Full Code Here

        Table tbl;
        try {
          tbl = this.get_table(db, base_table_name);
        } catch (NoSuchObjectException e) {
          throw new UnknownTableException(e.getMessage());
        }
        try {
          Deserializer s = MetaStoreUtils.getDeserializer(this.hiveConf, tbl);
          return MetaStoreUtils.getFieldsFromDeserializer(tableName, s);
        } catch(SerDeException e) {
View Full Code Here

    Properties schema = new Properties();

    File schemaFile = getSchemaFile(parent.getName(), tableName);

    if(schemaFile.exists() == false) {
      throw new UnknownTableException();
    }

    try {
      FileInputStream fis = new FileInputStream(schemaFile);
      schema.load(fis);
View Full Code Here

    openTransaction();
    Query query = pm.newQuery(MPartitionEvent.class, "dbName == t1 && tblName == t2 && partName == t3 && eventType == t4");
    query.declareParameters("java.lang.String t1, java.lang.String t2, java.lang.String t3, int t4");
    Table tbl = getTable(dbName, tblName); // Make sure dbName and tblName are valid.
    if(null == tbl) {
      throw new UnknownTableException("Table: "+ tblName + " is not found.");
    }
    partEvents = (Collection<MPartitionEvent>) query.executeWithArray(dbName, tblName, getPartitionStr(tbl, partName), evtType.getValue());
    pm.retrieveAll(partEvents);
    success = commitTransaction();
    LOG.debug("Done executing isPartitionMarkedForEvent");
View Full Code Here

    Table tbl = null;
    try{
    openTransaction();
    tbl = getTable(dbName, tblName); // Make sure dbName and tblName are valid.
    if(null == tbl) {
      throw new UnknownTableException("Table: "+ tblName + " is not found.");
    }
    pm.makePersistent(new MPartitionEvent(dbName,tblName,getPartitionStr(tbl, partName), evtType.getValue()));
    success = commitTransaction();
    LOG.debug("Done executing markPartitionForEvent");
    } finally {
View Full Code Here

      Exception ex = null;
      try {
        try {
          tbl = get_table(db, base_table_name);
        } catch (NoSuchObjectException e) {
          throw new UnknownTableException(e.getMessage());
        }
        boolean getColsFromSerDe = SerDeUtils.shouldGetColsFromSerDe(
            tbl.getSd().getSerdeInfo().getSerializationLib());
        if (!getColsFromSerDe) {
          ret = tbl.getSd().getCols();
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hive.metastore.api.UnknownTableException$UnknownTableExceptionStandardScheme

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.