FAQ
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 <chinnaraol@apache.org>
Authored: Mon Oct 19 16:16:04 2015 +0530
Committer: ChinnRao L <chinnaraol@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 {

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
groupcommits @
categorieshive, hadoop
postedOct 19, '15 at 10:49a
activeOct 19, '15 at 10:49a
posts1
users1
websitehive.apache.org

1 user in discussion

Chinnaraol: 1 post

People

Translate

site design / logo © 2021 Grokbase