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

Thejas M Nair commented on PIG-2186:
------------------------------------

Here is a modified proposal -
Behavior for pigstorage as load func -
1. with "PigStorage()" (ie default), it tries to load schema , but does not 
warn if there is no schema . 
2. if user loads with "PigStorage('-schema'), it gives an error if the schema 
is not present or it fails to get a schema.
3. if user loads with "PigStorage('-noschema'), it does not load schema


> PigStorage new warnings about missing schema file can be confusing; cache 
> schema
> --------------------------------------------------------------------------------
>
>                 Key: PIG-2186
>                 URL: https://issues.apache.org/jira/browse/PIG-2186
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.10
>            Reporter: Thejas M Nair
>            Assignee: Thejas M Nair
>             Fix For: 0.10
>
>
> In PIG-2143,the ability to store and use schema files was added to PigStorage 
> . By default, PigStorage as a load function checks for the schema file 
> presence and logs a warning if there is no schema file.
> {code}
> 2011-07-21 13:15:19,101 [main] WARN  org.apache.pig.builtin.JsonMetadata - 
> Could not find schema file for file:///Users/thejas/pig_trunk_cp/trunk/t.txt
> {code}
> But in cases where user has not taken actions to store a schema, this warning 
> can be confusing. There is no way for PigStorage() to know if the schema is 
> actually expected.
> To get rid of this warning, I think the default should be to not use schema. 
> (I take back my suggestions in PIG-2143 !)
> Also, the PigStorage.getSchema() call should cache the schema as the call is 
> made multiple times.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to