|
|
Prashant Kommireddi 2012-10-04, 20:49
Hi All,
I am looking at PigServer methods for running scripts/queries and it seems like currently theie return type is void which does not tell much about job completion.
public void registerScript(InputStream in, Map<String,String> params,List<String> paramsFiles) throws IOException { try { String substituted = doParamSubstitution(in, params, paramsFiles); GruntParser grunt = new GruntParser(new StringReader(substituted)); grunt.setInteractive(false); grunt.setParams(this); grunt.parseStopOnError(true); } catch (org.apache.pig.tools.pigscript.parser.ParseException e) { log.error(e.getLocalizedMessage()); throw new IOException(e.getCause()); } } We do have a handle on number of jobs succeeded/failed as part of the job run, so that is something we should add as return type?
Thanks, Prashant
+
Prashant Kommireddi 2012-10-04, 20:49
Bill Graham 2012-10-05, 01:05
Makes sense to me. We could return a PigStats object.
On Thu, Oct 4, 2012 at 1:49 PM, Prashant Kommireddi <[EMAIL PROTECTED]>wrote:
> Hi All, > > I am looking at PigServer methods for running scripts/queries and it seems > like currently theie return type is void which does not tell much about job > completion. > > public void registerScript(InputStream in, Map<String,String> > params,List<String> paramsFiles) throws IOException { > try { > String substituted = doParamSubstitution(in, params, > paramsFiles); > GruntParser grunt = new GruntParser(new > StringReader(substituted)); > grunt.setInteractive(false); > grunt.setParams(this); > grunt.parseStopOnError(true); > } catch (org.apache.pig.tools.pigscript.parser.ParseException e) { > log.error(e.getLocalizedMessage()); > throw new IOException(e.getCause()); > } > } > > > We do have a handle on number of jobs succeeded/failed as part of the job > run, so that is something we should add as return type? > > Thanks, > Prashant >
-- *Note that I'm no longer using my Yahoo! email address. Please email me at [EMAIL PROTECTED] going forward.*
+
Bill Graham 2012-10-05, 01:05
|
|
All projects made searchable here are trademarks of the Apache Software Foundation.
Service operated by
Sematext