[
https://issues.apache.org/jira/browse/TRAFODION-2584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16050607#comment-16050607
]
ASF GitHub Bot commented on TRAFODION-2584:
-------------------------------------------
GitHub user anoopsharma00 opened a pull request:
https://github.com/apache/incubator-trafodion/pull/1120
[TRAFODION-2584] Add support to register hive schemas in traf MD
This checkin extends jira TRAFODION-2584 to add support to register
hive schemas(referred to as databases in hive) in trafodion metadata.
Until now, only hive tables and views were registered.
Registering hive schemas would allow certain operations, like
granting/revoking privileges, to be done on a hive schema/database.
Syntax to register/unregister hive schema
-- register/unregister hive schema hive.sch;
Syntax to show registred hive schemas
-- get hive registered schemas in catalog trafodion
"showddl schema hive.sch" will now show the ddl for hive database
creation and whether this schema is registered.
showddl and 'get tables in schema' will now return error if that
schema doesn't exist.
regress/hive/TEST007 has been extended with additional tests.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/anoopsharma00/incubator-trafodion
ansharma_br_reghs
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-trafodion/pull/1120.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1120
----
commit 8e67ca9e49dffc0d1ed1d5e744c9607b1155adcb
Author: Anoop Sharma <[email protected]>
Date: 2017-06-15T15:14:27Z
ra TRAFODION-2584 Add support to register hive schemas in traf MD
This checkin extends jira TRAFODION-2584 to add support to register
hive schemas(referred to as databases in hive) in trafodion metadata.
Until now, only hive tables and views were registered.
Registering hive schemas would allow certain operations, like
granting/revoking privileges, to be done on a hive schema/database.
Syntax to register/unregister hive schema
-- register/unregister hive schema hive.sch;
Syntax to show registred hive schemas
-- get hive registered schemas in catalog trafodion
"showddl schema hive.sch" will now show the ddl for hive database
creation and whether this schema is registered.
showddl and 'get tables in schema' will now return error if that
schema doesn't exist.
regress/hive/TEST007 has been extended with additional tests.
----
> Add support to register hive objects in trafodion metadata
> ----------------------------------------------------------
>
> Key: TRAFODION-2584
> URL: https://issues.apache.org/jira/browse/TRAFODION-2584
> Project: Apache Trafodion
> Issue Type: Improvement
> Reporter: Anoop Sharma
> Assignee: Anoop Sharma
>
> Many trafodion operations on hive objects require an objectUID (a unique
> identifier) to be associated with them. This allows them to be added to
> trafodion metadata and then referred to later.
> Operations that need an identifier are privileges grant/revoke,
> updating statistics, hive view usage and external tables.
> Currently, to associate an objectUID with a hive table, trafodion creates
> an implicit external table on it. That generates a UID for the table
> which is then associated with the underlying object.
> That approach is not lightweight in that the implicit external table
> creation impact multiple traf metadata tables as it goes through all the
> steps needed for table creation.
> It doesn't support hive views as traf doesnt allow creation of external
> tables on a hive view.
> Also, If an implicit external table has been created by a traf operation,
> for example update statistics, and then the user wants to create an
> explicit external table, they need to drop the implicit table before
> creating the new external table. It means that all stats become
> obsolete as they are associated with the older implicit external
> table objectUID.
> This enhancement proposes a way to register hive objects(tables, views)
> in trafodion metadata OBJECTS without creating an external table.
> That has the following advantages:
> -- registering objects is a lightweight operation without creating an
> external table
> -- it impact only OBJECTS metadata and doesnt affect other objects
> (like COLUMNS, KEYS, etc) which will be for an external table
> -- it can be used for hive tables and views
> -- since there is no implicit external table, this allows creation of user
> external tables without having to drop the implicit table and thus
> invalidating the older objectUID. User external table create/drop
> become independent of internal operations that require an objectUID.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)