[
https://issues.apache.org/jira/browse/HIVE-10576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14527504#comment-14527504
]
Thejas M Nair commented on HIVE-10576:
--------------------------------------
Using org.apache.hadoop.fs.Path to normalize the path names is the practice
followed in earlier fixes for windows file name handling (see HIVE-3319 for
example).
I looked at how Path and File normalizes. It looks like File would be calling
the native local file system for normalization, and would result in a system
call. So sticking to using Path seems better to me.
Also, this results in exception being thrown in a normal (not really an error)
code path. We should avoid that. We can just use (new Path(pathstr).toUri()) in
all cases on windows. It does not seem to add much of an overhead.
> add jar command does not work with Windows OS
> ---------------------------------------------
>
> Key: HIVE-10576
> URL: https://issues.apache.org/jira/browse/HIVE-10576
> Project: Hive
> Issue Type: Bug
> Reporter: Hari Sankar Sivarama Subramaniyan
> Assignee: Hari Sankar Sivarama Subramaniyan
> Attachments: HIVE-10576.1.patch, HIVE-10576.2.patch
>
>
> Steps to reproduce this issue in Windows OS:
> hadoop.cmd fs -mkdir -p /tmp/testjars
> hadoop.cmd fs -copyFromLocal <hive-hcatalog-core-*.jar> /tmp/testjars
> from hive cli:
> add jar hdfs:///tmp/testjars/hive-hcatalog-core-*.jar;
> add jar D:\hdp\hive-1.2.0.2.3.0.0-1737\hcatalog\share\hcatalog\hive-hcatal
> og-core-1.2.0.2.3.0.0-1737.jar;
> {code}
> hive> add jar hdfs:///tmp/testjars/hive-hcatalog-core-1.2.0.2.3.0.0-1737.jar;
> converting to local
> hdfs:///tmp/testjars/hive-hcatalog-core-1.2.0.2.3.0.0-1737.j
> ar
> Illegal character in opaque part at index 2:
> C:\Users\hadoopqa\AppData\Local\Tem
> p\cf0c70a4-f8e5-43ae-8c94-aa528f90887d_resources\hive-hcatalog-core-1.2.0.2.3.0.
> 0-1737.jar
> Query returned non-zero code: 1, cause: java.net.URISyntaxException: Illegal
> cha
> racter in opaque part at index 2:
> C:\Users\hadoopqa\AppData\Local\Temp\cf0c70a4-
> f8e5-43ae-8c94-aa528f90887d_resources\hive-hcatalog-core-1.2.0.2.3.0.0-1737.jar
> hive> add jar
> D:\hdp\hive-1.2.0.2.3.0.0-1737\hcatalog\share\hcatalog\hive-hcatal
> og-core-1.2.0.2.3.0.0-1737.jar;
> Illegal character in opaque part at index 2:
> D:\hdp\hive-1.2.0.2.3.0.0-1737\hcat
> alog\share\hcatalog\hive-hcatalog-core-1.2.0.2.3.0.0-1737.jar
> Query returned non-zero code: 1, cause: java.net.URISyntaxException: Illegal
> cha
> racter in opaque part at index 2:
> D:\hdp\hive-1.2.0.2.3.0.0-1737\hcatalog\share\
> hcatalog\hive-hcatalog-core-1.2.0.2.3.0.0-1737.jar
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)