Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-22995 Add support for location for managed tables on database
  3. HIVE-23388

CTAS queries should use target's location for staging.

    XMLWordPrintableJSON

Details

    Description

      In cloud based storage systems, renaming files across different root level buckets seem to be disallowed. The S3AFileSystem throws the following exception. This appears to be bug in S3FS impl.

      Failed with exception Wrong FS s3a://hive-managed/clusters/env-xxxxx/warehouse-xxxx-xxxx/warehouse/tablespace/managed/hive/tpch.db/customer/delta_0000001_0000001_0000 -expected s3a://hive-external
      2020-04-27T19:34:27,573 INFO [Thread-6] jdbc.TestDriver: java.lang.IllegalArgumentException: Wrong FS s3a://hive-managed//clusters/env-xxxx/warehouse-xxxx-xxxx/warehouse/tablespace/managed/hive/tpch.db/customer/delta_0000001_0000001_0000 -expected s3a://hive-external

      But we should fix our query plans to use the target table's directory for staging as well. That should resolve this issue and it is the right thing to do as well (in case there are different encryption zones/keys for these buckets).

      Fix in HIVE-22995 probably changed this behavior.

      Attachments

        Issue Links

          Activity

            People

              ngangam Naveen Gangam
              ngangam Naveen Gangam
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h