You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2018/08/17 15:49:00 UTC

[jira] [Commented] (IMPALA-7439) CREATE DATABASE creates a catalog entry with empty location field

    [ https://issues.apache.org/jira/browse/IMPALA-7439?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16584102#comment-16584102 ] 

ASF subversion and git services commented on IMPALA-7439:
---------------------------------------------------------

Commit 7c0450d6d4b43ab920d4abf97ee918eeca3e6fcf in impala's branch refs/heads/master from [~tlipcon]
[ https://git-wip-us.apache.org/repos/asf?p=impala.git;h=7c0450d ]

IMPALA-7439. CREATE DATABASE creates a catalog entry with missing location

Previously, when creating a new database, the CatalogOpExecutor would
create an HMS Database object, issue the HMS createDatabase call, and
then create a Catalog entry from that same Database object. The
resulting Catalog entry would be missing certain fields that are
auto-created by the HMS itself, most importantly the location field.

The code for CTAS seems to have contained a workaround for this issue
ever since catalogd was first introduced: rather than using the location
stored in the Db object, it would re-fetch the Database from HMS.

Now that this is fixed, that workaround could be removed and some code
simplified.

A new test verifies that a newly-created database has the appropriate
location, and existing CTAS tests verify that functionality didn't
regress.

Change-Id: I13df31cee1e5768b073e0e35c4c16ebf1892be23
Reviewed-on: http://gerrit.cloudera.org:8080/11229
Reviewed-by: Vuk Ercegovac <ve...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


> CREATE DATABASE creates a catalog entry with empty location field
> -----------------------------------------------------------------
>
>                 Key: IMPALA-7439
>                 URL: https://issues.apache.org/jira/browse/IMPALA-7439
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Catalog
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Major
>
> 'create database foobar' followed by 'describe database foobar' shows no location field for the newly created DB. If you then invalidate metadata, it will load the proper location upon a reload.
> It seems that the code for CREATE TABLE is currently working around this as ImpaladCatalog.getTablePath() actually ignores the location stored in the catalog entry and instead goes directly to the HMS to get the database location. It seems we should probably populate the catalog entry correctly upon creation.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org