You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Ashutosh Chauhan (JIRA)" <ji...@apache.org> on 2013/06/01 23:35:20 UTC

[jira] [Commented] (HIVE-4554) Failed to create a table from existing file if file path has spaces

    [ https://issues.apache.org/jira/browse/HIVE-4554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13672245#comment-13672245 ] 

Ashutosh Chauhan commented on HIVE-4554:
----------------------------------------

Few comments:

* In EximUtil.java changing relativeToAbsolutePath to return path instead of uri may not be a good idea. This function is also used by SemanticAnalyzer::createTable which uses it to get absolute location and then stores in metastore. If this is changed to return only path component we will loose scheme and authority.

* Similarly LoadSemanticAnalyzer, line 149 its better to use toString, instead of path in error message, since location could be remote fs and hence scheme, authority, port etc. are useful info in the error message.

* At line 261, uri is not necessarily of local fs, so other components of url needs to be preserved, we shall use url here also.

I believe your test case will pass if you revert these changes and keep other changes. Can you test? Also, it will be better to create phabricator or RB entry for easier review.
                
> Failed to create a table from existing file if file path has spaces
> -------------------------------------------------------------------
>
>                 Key: HIVE-4554
>                 URL: https://issues.apache.org/jira/browse/HIVE-4554
>             Project: Hive
>          Issue Type: Bug
>          Components: CLI
>    Affects Versions: 0.10.0
>            Reporter: Xuefu Zhang
>            Assignee: Xuefu Zhang
>             Fix For: 0.11.1
>
>         Attachments: HIVE-4554.patch, HIVE-4554.patch.1
>
>
> To reproduce the problem,
> 1. Create a table, say, person_age (name STRING, age INT).
> 2. Create a file whose name has a space in it, say, "data set.txt".
> 3. Try to load the date in the file to the table.
> The following error can be seen in the console:
> hive> LOAD DATA INPATH '/home/xzhang/temp/data set.txt' INTO TABLE person_age;
> Loading data to table default.person_age
> Failed with exception Wrong file format. Please check the file's format.
> FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.MoveTask
> Note: the error message is confusing.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira