hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shuaishuai Nie" <shuai...@microsoft.com>
Subject Re: Review Request 16727: Review Board for HIVE-5446 Hive can CREATE an external table but not SELECT from it when file path have spaces
Date Thu, 09 Jan 2014 19:41:23 GMT

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



ql/src/java/org/apache/hadoop/hive/ql/metadata/Partition.java
<https://reviews.apache.org/r/16727/#comment59949>

    The reason is when we create an external table with space in location, DDLTask.createTable
function calls table.setDataLocation(Path.toUri()) function which need to pass an URI. Since
URI cannot have space, toUri() function have to http encoded space as %20. However for Partition,
DDLTask.addPartition function pass the location of partition using Path, so there is no http
encoding for the path. If you look at the location entries in metastore database, for table,
the location is like "hdfs://shuainie-vm10.redmond.corp.microsoft.com:8020/folder+with%20space"
however for Partition, the location is like "hdfs://shuainie-vm10.redmond.corp.microsoft.com:8020/folder+with
space"
    So location corruption when having space in path only happens for table but not for partition.


- Shuaishuai Nie


On Jan. 9, 2014, 1:57 a.m., Shuaishuai Nie wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16727/
> -----------------------------------------------------------
> 
> (Updated Jan. 9, 2014, 1:57 a.m.)
> 
> 
> Review request for hive, Thejas Nair and Xuefu Zhang.
> 
> 
> Bugs: HIVE-5446
>     https://issues.apache.org/jira/browse/HIVE-5446
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> Hive cannot select from external table with location has "+" or space in the path
> 
> 
> Diffs
> -----
> 
>   data/files/ext_test_space/folder+with PRE-CREATION 
>   itests/qtest/pom.xml 119ddb5 
>   ql/src/java/org/apache/hadoop/hive/ql/metadata/Partition.java 0fe260d 
>   ql/src/java/org/apache/hadoop/hive/ql/metadata/Table.java 877d342 
>   ql/src/test/queries/clientpositive/external_table_with_space_in_location_path.q PRE-CREATION

>   ql/src/test/results/clientpositive/external_table_with_space_in_location_path.q.out
PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/16727/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Shuaishuai Nie
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message