"Namespace" seems too overloaded and nebulous. Namebase or Dataspace
even just Database is probably more appropriate. I intentionally
avoided tablespace, which already means physical location/grouping of
tables instead of logical names in the current db jargons.

I get what you want from the parent namespace parameter, which is
analogous to the "current directory", but I think it would be less
confusing if you name the arguments to something like:

create_namespace(Namespace subSpace, Namespace currentSpace);

__Luke

On Mon, Aug 2, 2010 at 2:05 PM, Sanjit Jhala <[email protected]> wrote:
> In order to support namespaces, the Client API needs some modification.
> Namespaces are intended to work much like "databases" in MySql terminology.
> As in MySql, all table operations will occur within the context of a
> namespace and so the API has to change accordingly.
>
> Here's a summary of the proposal:
>
> 1. We will have a new "Namespace" class. Many of the existing client API
> methods will be moved into this class (create table, drop_table etc).
> 2. The Client API will have new methods to operate on namespaces
> (create_namespace, drop_namespace etc.)
> 3. Clients will have an additional "open_namespace" call before accessing
> tables/scanners/mutators etc. For example, to write to Hypertable:
>     a. create Client
>     b. open Namespace (via Client object) <-- additional step
>     c. open Table  (via Namespace object)
>     d. create TableMutator (via Table object)
> 4. The Client API get_tables method will be replaced by the Namespace API
> get_listing method. Each returned Listing will contain a name and flag
> indicating whether it is a table or a namespace.
> 5. The ThriftClient API will also have to be changed accordingly.
>
>
> In more detail the new Client API will look like:
>
> - Namespace*open_namespace(const String &namespace, Namespace parent=NULL) .
> If "parent" Namespace is non-null then treat "namespace" as relative to
> "parent"
> - void create_namespace(const String &namespace_name, Namespace parent=NULL)
> - void drop_namespace(const String &namespace, Namespace parent=NULL)
> - void close()
> - void shutdown()
> - Hyperspace::SessionPtr& get_hyperspace_session()
> - HqlInterpreter *create_hql_interpreter()
>
> The Namespace API will have most of the methods in the current Client API:
>
> - void create_table(const String &name, const String &schema)
> - void alter_table(const String &name, const String &schema)
> - Table *open_table(const String &name, bool force = false)
> - void refresh_table(const String &name)
> - bool exists_table(const String &name)
> - SchemaPtr get_schema(const String &name)
> - String get_schema_str(const String &name, bool with_ids=false)
> - void get_listing(std::vector<Listing> &listing)
> - void drop_table(const String &name, bool if_exists)
> - void get_table_splits(const String &name, TableSplitsContainer &splits)
>
>
> -Sanjit
>
> --
> You received this message because you are subscribed to the Google Groups
> "Hypertable Development" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/hypertable-dev?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Hypertable Development" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hypertable-dev?hl=en.

Reply via email to