hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ferdinand Xu (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-16920) remove useless uri.getScheme() from EximUtil
Date Wed, 21 Jun 2017 17:20:00 GMT

     [ https://issues.apache.org/jira/browse/HIVE-16920?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ferdinand Xu updated HIVE-16920:
--------------------------------
       Resolution: Fixed
    Fix Version/s: 3.0.0
           Status: Resolved  (was: Patch Available)

Committed to the upstream. Thx [~ferhui] for the contribution.

> remove useless uri.getScheme() from EximUtil
> --------------------------------------------
>
>                 Key: HIVE-16920
>                 URL: https://issues.apache.org/jira/browse/HIVE-16920
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 3.0.0
>            Reporter: Fei Hui
>            Assignee: Fei Hui
>             Fix For: 3.0.0
>
>         Attachments: HIVE-16920.patch
>
>
> {code:title=EximUtil.java|borderStyle=solid}
> static URI getValidatedURI(HiveConf conf, String dcPath) throws SemanticException {
>     try {
>       boolean testMode = conf.getBoolVar(HiveConf.ConfVars.HIVETESTMODE);
>       URI uri = new Path(dcPath).toUri();
>       String scheme = uri.getScheme();
>       String authority = uri.getAuthority();
>       String path = uri.getPath();
>       FileSystem fs = FileSystem.get(uri, conf);
>       LOG.info("Path before norm :" + path);
>       // generate absolute path relative to home directory
>       if (!path.startsWith("/")) {
>         if (testMode) {
>           path = (new Path(System.getProperty("test.tmp.dir"), path)).toUri().getPath();
>         } else {
>           path =
>               (new Path(new Path("/user/" + System.getProperty("user.name")), path)).toUri()
>                   .getPath();
>         }
>       }
>       // Get scheme from FileSystem
>       scheme = fs.getScheme();
>   ...
> }
> {code}
> We found that {{String scheme = uri.getScheme();}} is useless, we can remove it.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message