hadoop-hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "He Yongqiang (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HIVE-675) add database/scheme support Hive QL
Date Thu, 10 Sep 2009 02:47:57 GMT

    [ https://issues.apache.org/jira/browse/HIVE-675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12753396#action_12753396

He Yongqiang commented on HIVE-675:

>>Assuming Hive is an inner field of SessionState, we don't need to protect the current
database with another level of ThreadLocal.
yes. hive is a singleton object.
public class Hive {

  static final private Log LOG = LogFactory.getLog("hive.ql.metadata.Hive");
  static Hive db = null;
  public static Hive get(HiveConf c, boolean needsRefresh) throws HiveException {
    if(db == null || needsRefresh) {
      db = new Hive(c);
    return db;

So even though Hive is an inner field of SessionState, but i think they all refer to the singleton
instance at runtime. So we need to make the current database be a ThreadLocal variable.

> add database/scheme support Hive QL
> -----------------------------------
>                 Key: HIVE-675
>                 URL: https://issues.apache.org/jira/browse/HIVE-675
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>            Reporter: Prasad Chakka
>            Assignee: He Yongqiang
>         Attachments: hive-675-2009-9-7.patch, hive-675-2009-9-8.patch
> Currently all Hive tables reside in single namespace (default). Hive should support multiple
namespaces (databases or schemas) such that users can create tables in their specific namespaces.
These name spaces can have different warehouse directories (with a default naming scheme)
and possibly different properties.
> There is already some support for this in metastore but Hive query parser should have
this feature as well.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message