You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ch...@apache.org on 2015/10/19 12:49:58 UTC
hive git commit: HIVE-12026 : Add test case to check permissions when
truncating partition (Jason Dere , via ChinnaRao L)
Repository: hive
Updated Branches:
refs/heads/master 1450c09c3 -> 905f2e6d0
HIVE-12026 : Add test case to check permissions when truncating partition
(Jason Dere , via ChinnaRao L)
Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/905f2e6d
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/905f2e6d
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/905f2e6d
Branch: refs/heads/master
Commit: 905f2e6d069dd17c79b77cb1a197221f6bf9d5ec
Parents: 1450c09
Author: ChinnRao L <ch...@apache.org>
Authored: Mon Oct 19 16:16:04 2015 +0530
Committer: ChinnRao L <ch...@apache.org>
Committed: Mon Oct 19 16:16:04 2015 +0530
----------------------------------------------------------------------
.../hadoop/hive/ql/security/FolderPermissionBase.java | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hive/blob/905f2e6d/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/FolderPermissionBase.java
----------------------------------------------------------------------
diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/FolderPermissionBase.java b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/FolderPermissionBase.java
index d7149a7..2ae9cc0 100644
--- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/FolderPermissionBase.java
+++ b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/ql/security/FolderPermissionBase.java
@@ -710,6 +710,9 @@ public abstract class FolderPermissionBase {
ret = driver.run("TRUNCATE TABLE " + tableName);
Assert.assertEquals(0, ret.getResponseCode());
+ assertExistence(warehouseDir + "/" + tableName);
+ verifyPermission(warehouseDir + "/" + tableName);
+
ret = driver.run("insert into table " + tableName + " partition(part1='1') select key,value from mysrc where part1='1' and part2='1'");
Assert.assertEquals(0, ret.getResponseCode());
@@ -717,6 +720,13 @@ public abstract class FolderPermissionBase {
assertExistence(partition);
verifyPermission(partition);
+
+ // Also test the partition folder if the partition is truncated
+ ret = driver.run("TRUNCATE TABLE " + tableName + " partition(part1='1')");
+ Assert.assertEquals(0, ret.getResponseCode());
+
+ assertExistence(partition);
+ verifyPermission(partition);
}
private void setSinglePartition(String tableLoc, int index) throws Exception {