Return-Path: X-Original-To: apmail-pig-dev-archive@www.apache.org Delivered-To: apmail-pig-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5F1619249 for ; Thu, 27 Sep 2012 07:04:11 +0000 (UTC) Received: (qmail 55722 invoked by uid 500); 27 Sep 2012 07:04:11 -0000 Delivered-To: apmail-pig-dev-archive@pig.apache.org Received: (qmail 55661 invoked by uid 500); 27 Sep 2012 07:04:10 -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 54937 invoked by uid 500); 27 Sep 2012 07:04:08 -0000 Delivered-To: apmail-hadoop-pig-dev@hadoop.apache.org Received: (qmail 54827 invoked by uid 99); 27 Sep 2012 07:04:08 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Sep 2012 07:04:08 +0000 Date: Thu, 27 Sep 2012 18:04:08 +1100 (NCT) From: "Russell Jurney (JIRA)" To: pig-dev@hadoop.apache.org Message-ID: <762802363.132543.1348729448117.JavaMail.jiratomcat@arcas> In-Reply-To: <218993830.47146.1346972947609.JavaMail.jiratomcat@arcas> Subject: [jira] [Updated] (PIG-2910) Make toString() methods on Schema and FieldSchema be readable by Utils.getSchemaFromString() 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-2910?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Russell Jurney updated PIG-2910: -------------------------------- Assignee: Thejas M Nair (was: Russell Jurney) > Make toString() methods on Schema and FieldSchema be readable by Utils.getSchemaFromString() > -------------------------------------------------------------------------------------------- > > Key: PIG-2910 > URL: https://issues.apache.org/jira/browse/PIG-2910 > Project: Pig > Issue Type: Bug > Components: impl, parser > Affects Versions: 0.9.2, 0.10.0, 0.11, 0.10.1 > Reporter: Russell Jurney > Assignee: Thejas M Nair > Fix For: 0.11, 0.10.1 > > > I want to toString() schemas and send them to the backend via UDFContext. At the moment this requires writing your own toString() method that Utils.getSchemaFromString() can read. Making a readable schema for the backend would be an improvement. > I spoke with Thejas, who believes this is a bug. The workaround for the moment is, for example: > String schemaString = inputSchema.toString().substring(1, inputSchema.toString().length() - 1); > // Set the input schema for processing > UDFContext context = UDFContext.getUDFContext(); > Properties udfProp = context.getUDFProperties(this.getClass()); > udfProp.setProperty("horton.json.udf.schema", schemaString); > ... > schema = Utils.getSchemaFromString(strSchema); -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira