Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-6792

hive.warehouse.subdir.inherit.perms doesn't work correctly in CTAS

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.14.0
    • 0.14.0
    • Authorization, Security
    • None

    Description

      hive.warehouse.subdir.inherit.perms doesn't work correctly in CTAS. When it is set to true, the table created using create table .. as select.. does not inherit its parent directory's group and permission mode. It can be easily reproduced:
      ==
      hive> dfs -ls -R /user/hive/warehouse;
      drwxrwx--T - hive hive 0 2014-03-30 17:44 /user/hive/warehouse/ctas.db
      drwxr-xr-x - hive hive 0 2014-03-30 17:20 /user/hive/warehouse/ctas_src_tbl
      rw-rr- 3 hive hive 46059 2014-03-30 17:20 /user/hive/warehouse/ctas_src_tbl/000000_0

      hive> create table ctas.test_perm as select * from ctas_src_tbl;

      hive> dfs -ls -R /user/hive/warehouse;
      drwxrwx--T - hive hive 0 2014-03-30 17:46 /user/hive/warehouse/ctas.db
      drwxr-xr-x - hive supergroup 0 2014-03-30 17:46 /user/hive/warehouse/ctas.db/test_perm
      rw-rr- 3 hive supergroup 46059 2014-03-30 17:46 /user/hive/warehouse/ctas.db/test_perm/000000_0
      drwxr-xr-x - hive hive 0 2014-03-30 17:20 /user/hive/warehouse/ctas_src_tbl
      rw-rr- 3 hive hive 46059 2014-03-30 17:20 /user/hive/warehouse/ctas_src_tbl/000000_0
      ==
      The created table does not inherit its database ctas's group hive and permission mode 770, instead it takes the default group (supergroup) and permission mode (755) in hdfs

      Attachments

        1. HIVE-6792.1.patch
          3 kB
          Brock Noland
        2. HIVE-6792.patch
          4 kB
          Chaoyu Tang
        3. HIVE-6792-1.patch
          3 kB
          Chaoyu Tang

        Issue Links

          Activity

            People

              ctang Chaoyu Tang
              ctang Chaoyu Tang
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: