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

Prashant Kommireddi commented on PIG-2456:
------------------------------------------

Makes sense. This is what I think we could do to support this

1. Create a static method in Main that takes in 1 argument, InputStream and 
returns a SequenceInputStream which is a composite stream comprised of default 
file, say ".pigbootup" and the InputStream
2. All individual components within Main call this function to get a handle on 
the composite stream by passing it the InputStream it uses (Console, FileInput)
3. This composite stream is then passed to Grunt.

Another approach would be to add a new constructor to class Grunt, 
Grunt(InputStream in, PigContext pig). This constructor will create a composite 
stream (.pigbootup + console/fileinput), then create a BufferedReader on the 
composite stream and invoke Grunt(BufferedReader in, PigContext pig)

Not sure which one of these approach' would be better. 

Any suggestions or other ideas?

                
> Pig should have a pigrc to specify default script cache
> -------------------------------------------------------
>
>                 Key: PIG-2456
>                 URL: https://issues.apache.org/jira/browse/PIG-2456
>             Project: Pig
>          Issue Type: New Feature
>            Reporter: Aniket Mokashi
>
> There should be a way to specify default statements in pig. This is helpful 
> when multiple users are using pig in interactive mode.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to