/** * @param db * @param tableName * @throws UnknownTableException * @throws UnknownDBException * @throws MetaException * @throws TException * @see org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore.Iface#get_fields(java.lang.String, * java.lang.String) */ @Override public List<FieldSchema> getFields(String db, String tableName) throws MetaException, TException, UnknownTableException, UnknownDBException { List<FieldSchema> fields = client.get_fields(db, tableName); return fastpath ? fields : deepCopyFieldSchemas(fields); }
/** * @param db * @param tableName * @throws UnknownTableException * @throws UnknownDBException * @throws MetaException * @throws TException * @see org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore.Iface#get_schema(java.lang.String, * java.lang.String) */ @Override public List<FieldSchema> getSchema(String db, String tableName) throws MetaException, TException, UnknownTableException, UnknownDBException { EnvironmentContext envCxt = null; String addedJars = MetastoreConf.getVar(conf, ConfVars.ADDED_JARS); if(org.apache.commons.lang.StringUtils.isNotBlank(addedJars)) { Map<String, String> props = new HashMap<String, String>(); props.put("hive.added.jars.path", addedJars); envCxt = new EnvironmentContext(props); } List<FieldSchema> fields = client.get_schema_with_environment_context(db, tableName, envCxt); return fastpath ? fields : deepCopyFieldSchemas(fields); }