-
Notifications
You must be signed in to change notification settings - Fork 4.8k
HIVE-25331: Create database query doesn't create MANAGEDLOCATION dire… #2478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| set hive.support.concurrency=true; | ||
| set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager; | ||
| create database testdb location '/tmp/testdb.db'; | ||
| create table testdb.test as select 1; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,7 +11,7 @@ PREHOOK: Input: database:newdb | |
| POSTHOOK: query: describe database extended newDB | ||
| POSTHOOK: type: DESCDATABASE | ||
| POSTHOOK: Input: database:newdb | ||
| newdb location/in/test hive_test_user USER | ||
| #### A masked pattern was here #### | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we need to double-check in what way the output changed which triggered a q.out masking
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The managedlocation is like "file:/home/robbie/hive/itests/qtest/target/localfs/warehouse/newdb.db" which matches "file:" in QOutProcessor.maskIfContains.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see, I created a followup ticket for this: HIVE-25473 (in order to get useful info back)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually the original output is like: The managedlocation is not empty. Because of the pattern "file:/", QOutProcessor masks the whole line. |
||
| PREHOOK: query: use newDB | ||
| PREHOOK: type: SWITCHDATABASE | ||
| PREHOOK: Input: database:newdb | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| #### A masked pattern was here #### | ||
| PREHOOK: type: CREATEDATABASE | ||
| PREHOOK: Output: database:testdb | ||
| #### A masked pattern was here #### | ||
| POSTHOOK: type: CREATEDATABASE | ||
| POSTHOOK: Output: database:testdb | ||
| #### A masked pattern was here #### | ||
| PREHOOK: query: create table testdb.test as select 1 | ||
| PREHOOK: type: CREATETABLE_AS_SELECT | ||
| PREHOOK: Input: _dummy_database@_dummy_table | ||
| PREHOOK: Output: database:testdb | ||
| PREHOOK: Output: testdb@test | ||
| POSTHOOK: query: create table testdb.test as select 1 | ||
| POSTHOOK: type: CREATETABLE_AS_SELECT | ||
| POSTHOOK: Input: _dummy_database@_dummy_table | ||
| POSTHOOK: Output: database:testdb | ||
| POSTHOOK: Output: testdb@test | ||
| POSTHOOK: Lineage: test._c0 SIMPLE [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pkumarsinha: could you please confirm if removing this assertion won't hide any problems with replication?
this patch takes care of setting managed location uri if it's not set by create database
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ujc714 Rather than removing, I think we should assert that replDatabase.getManagedLocationUri() is in default warehouse location, i.e it should be equal to new Path(replica.warehouseRoot, replicatedDbName.toLowerCase() + ".db")
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pkumarsinha Made the change as you suggested :)