hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "cnweike (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HIVE-3259) public Table getTable(String dbName, String tableName) throws MetaException Shoule log more detail content when exception happens
Date Mon, 16 Jul 2012 02:00:34 GMT
cnweike created HIVE-3259:
-----------------------------

             Summary: public Table getTable(String dbName, String tableName) throws MetaException
Shoule log more detail content when exception happens
                 Key: HIVE-3259
                 URL: https://issues.apache.org/jira/browse/HIVE-3259
             Project: Hive
          Issue Type: Wish
          Components: Metastore
    Affects Versions: 0.8.0
         Environment: CDH3u4 Hive 0.8
            Reporter: cnweike


    public Table get_table(final String dbname, final String name) throws MetaException,
        NoSuchObjectException {
      Table t = null;
      startTableFunction("get_table", dbname, name);
      try {
        t = executeWithRetry(new Command<Table>() {
          @Override
          Table run(RawStore ms) throws Exception {
            Table t = ms.getTable(dbname, name);
            if (t == null) {
              throw new NoSuchObjectException(dbname + "." + name
                  + " table not found");
            }
            return t;
          }
        });
      } catch (NoSuchObjectException e) {
        throw e;
      } catch (MetaException e) {
        throw e;
      } catch (Exception e) {
        assert(e instanceof RuntimeException);
        throw (RuntimeException)e;
      } finally {
        endFunction("get_table");
      }
      return t;
    }

when  Table t = ms.getTable(dbname, name); returns null, it just throw a exception, but why
? we cannot get any useful information from this exception info, so I suggest log the exception
information when ms.getTable(dbname, name) really throw some exception. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message