Return-Path: Delivered-To: apmail-pig-dev-archive@www.apache.org Received: (qmail 19826 invoked from network); 24 Dec 2010 23:09:06 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Dec 2010 23:09:06 -0000 Received: (qmail 36371 invoked by uid 500); 24 Dec 2010 23:09:06 -0000 Delivered-To: apmail-pig-dev-archive@pig.apache.org Received: (qmail 36322 invoked by uid 500); 24 Dec 2010 23:09:06 -0000 Mailing-List: contact dev-help@pig.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pig.apache.org Delivered-To: mailing list dev@pig.apache.org Received: (qmail 36312 invoked by uid 500); 24 Dec 2010 23:09:06 -0000 Delivered-To: apmail-hadoop-pig-dev@hadoop.apache.org Received: (qmail 36307 invoked by uid 99); 24 Dec 2010 23:09:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Dec 2010 23:09:06 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Dec 2010 23:09:05 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oBON8jhx021834 for ; Fri, 24 Dec 2010 23:08:45 GMT Message-ID: <20213078.14771293232125730.JavaMail.jira@thor> Date: Fri, 24 Dec 2010 18:08:45 -0500 (EST) From: "Dmitriy V. Ryaboy (JIRA)" To: pig-dev@hadoop.apache.org Subject: [jira] Commented: (PIG-1675) Suggest to allow PigServer can register pig script from InputStream MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PIG-1675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12974987#action_12974987 ] Dmitriy V. Ryaboy commented on PIG-1675: ---------------------------------------- Granted, we labeled PigServer as stable.. Does that really, really mean we can't change it? If we go with a builder approach, can we just deprecate the old methods and let them hang around for a release or two? > Suggest to allow PigServer can register pig script from InputStream > ------------------------------------------------------------------- > > Key: PIG-1675 > URL: https://issues.apache.org/jira/browse/PIG-1675 > Project: Pig > Issue Type: Improvement > Affects Versions: 0.8.0 > Reporter: Jeff Zhang > Assignee: Jeff Zhang > Fix For: 0.9.0 > > Attachments: pig-findbugs-report.html, PIG_1675.patch, PIG_1675_2.patch, PIG_1675_3.patch, PIG_1675_4.patch > > > Currently, Pig only allow users to register script from file. Although it satisfy most people's requirements, sometimes people hope to build pig script dynamically using code, then they need to create temp file for the script they build. So here I suggest to allow PigServer be able to register pig script from InputStream. > InputStream is a more general type than File, pig script can been from file (FileInputStream) > or from in-memory (ByteArrayInputStream) even it can been from remote machines (SocketInputStream) > Here's a blog which explains why using InputStream is better than using File in interface http://java.dzone.com/articles/using-files-your-interfaces-0 > So I suggest to add the following 4 methods in PigServer: > {code} > public void registerScript(InputStream in) throws IOException > public void registerScript(InputStream in, Map params) throws IOException > public void registerScript(InputStream in, List paramsFiles) throws IOException > public void registerScript(InputStream in, Map params,List paramsFiles) throws IOException > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.