forked from apache/hive
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HIVE-26765: Hive Ranger URL policy for insert overwrite directory den…
…ies access when fully qualified paths are passed (apache#3790) (Simhadri Govindappa, reviewed by Adam Szita) (cherry picked from commit aefc06d)
- Loading branch information
1 parent
0d677c2
commit fe807f9
Showing
4 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
ql/src/test/queries/clientpositive/fully_qualified_or_relative_location.q
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--! qt:dataset:src | ||
|
||
SET hive.insert.into.multilevel.dirs=true; | ||
SET hive.output.file.extension=.txt; | ||
|
||
set hive.ranger.use.fully.qualified.url = true; | ||
INSERT OVERWRITE DIRECTORY 'target/data/x/y/z/' SELECT src.* FROM src; | ||
|
||
set hive.ranger.use.fully.qualified.url = false; | ||
INSERT OVERWRITE DIRECTORY 'target/data/x/y/z/' SELECT src.* FROM src; |
16 changes: 16 additions & 0 deletions
16
ql/src/test/results/clientpositive/llap/fully_qualified_or_relative_location.q.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
PREHOOK: query: INSERT OVERWRITE DIRECTORY 'target/data/x/y/z/' SELECT src.* FROM src | ||
PREHOOK: type: QUERY | ||
PREHOOK: Input: default@src | ||
#### A masked pattern was here #### | ||
POSTHOOK: query: INSERT OVERWRITE DIRECTORY 'target/data/x/y/z/' SELECT src.* FROM src | ||
POSTHOOK: type: QUERY | ||
POSTHOOK: Input: default@src | ||
#### A masked pattern was here #### | ||
PREHOOK: query: INSERT OVERWRITE DIRECTORY 'target/data/x/y/z/' SELECT src.* FROM src | ||
PREHOOK: type: QUERY | ||
PREHOOK: Input: default@src | ||
PREHOOK: Output: target/data/x/y/z | ||
POSTHOOK: query: INSERT OVERWRITE DIRECTORY 'target/data/x/y/z/' SELECT src.* FROM src | ||
POSTHOOK: type: QUERY | ||
POSTHOOK: Input: default@src | ||
POSTHOOK: Output: target/data/x/y/z |