You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Adam Szita (JIRA)" <ji...@apache.org> on 2016/10/27 15:11:00 UTC

[jira] [Assigned] (PIG-4939) QueryParserUtils.setHdfsServers(QueryParserUtils.java:104) should not be called for non-dfs methods

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

Adam Szita reassigned PIG-4939:
-------------------------------

    Assignee: Adam Szita

> QueryParserUtils.setHdfsServers(QueryParserUtils.java:104) should not be called for non-dfs methods
> ---------------------------------------------------------------------------------------------------
>
>                 Key: PIG-4939
>                 URL: https://issues.apache.org/jira/browse/PIG-4939
>             Project: Pig
>          Issue Type: Improvement
>          Components: impl
>            Reporter: Siddhi Mehta
>            Assignee: Adam Szita
>            Priority: Minor
>
> {code}
> A = load 'hbase://query/SELECT ID,NAME,DATE FROM HIRES WHERE DATE > TO_DATE('1990-12-21 05:55:00.000');
> STORE A into 'output';
> {code}
> The above script throws an exception because it treats the location as an fs path and tries to convert it to a URI after splitting it based on comma.
> The code that tries to the same is 
> {code}
>  String buildLoadOp(SourceLocation loc, String alias, String filename, FuncSpec funcSpec, LogicalSchema schema)
>     throws ParserValidationException {
>         String absolutePath;
>         LoadFunc loFunc;
>         try {
>             // Load LoadFunc class from default properties if funcSpec is null. Fallback on PigStorage if LoadFunc is not specified in properties.
>             funcSpec = funcSpec == null ? new FuncSpec(pigContext.getProperties().getProperty(PigConfiguration.PIG_DEFAULT_LOAD_FUNC, PigStorage.class.getName())) : funcSpec;
>             loFunc = (LoadFunc)PigContext.instantiateFuncFromSpec(funcSpec);
>             ......
>             .......
>             if (absolutePath == null) {
>                 absolutePath = loFunc.relativeToAbsolutePath( filename, QueryParserUtils.getCurrentDir( pigContext ) );
>                 if (absolutePath!=null) {
>                     QueryParserUtils.setHdfsServers( absolutePath, pigContext );
>                 }
>          .....  
>        }
> {code}
> We should not be calling QueryParserUtils.setHdfsServers(QueryParserUtils.java:104) should not be called for non-dfs methods



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)