Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive, mail # dev - Review Request 16826: Review for HIVE-5032 Enable hive creating external table at the root directory of DFS


Copy link to this message
-
Review Request 16826: Review for HIVE-5032 Enable hive creating external table at the root directory of DFS
Shuaishuai Nie 2014-01-13, 18:35

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16826/
-----------------------------------------------------------

Review request for hive, Ashutosh Chauhan and Thejas Nair.
Bugs: hive-5032
    https://issues.apache.org/jira/browse/hive-5032
Repository: hive-git
Description
-------

Creating external table using HIVE with location point to the root directory of DFS will fail because the function HiveFileFormatUtils#doGetPartitionDescFromPath treat authority of the path the same as folder and cannot find a match in the "pathToPartitionInfo" table when doing prefix match. Instead of modify the path string for recursive prefix match, this patch use Path.getParent() to get the prefix for the path. This approach solve the failed corner cases of original implementation.
Diffs
-----

  itests/qtest/pom.xml 3d3f3f8
  ql/src/java/org/apache/hadoop/hive/ql/io/HiveFileFormatUtils.java 4be56f3
  ql/src/test/queries/clientpositive/root_dir_external_table.q PRE-CREATION
  ql/src/test/results/clientpositive/root_dir_external_table.q.out PRE-CREATION

Diff: https://reviews.apache.org/r/16826/diff/
Testing
-------

unit test added
Thanks,

Shuaishuai Nie