MCPcopy Create free account
hub / github.com/apache/pig / processScript

Method processScript

src/org/apache/pig/tools/grunt/GruntParser.java:477–508  ·  view source on GitHub ↗
(String script, boolean batch,
                                 List<String> params, List<String> files)

Source from the content-addressed store, hash-verified

475 }
476
477 @Override
478 protected void processScript(String script, boolean batch,
479 List<String> params, List<String> files)
480 throws IOException, ParseException {
481 if(batch) {
482 filter.validate(PigCommandFilter.Command.EXEC);
483 } else {
484 filter.validate(PigCommandFilter.Command.RUN);
485 }
486
487 if(mExplain == null) { // process only if not in "explain" mode
488 if (script == null) {
489 executeBatch();
490 return;
491 }
492
493 if (batch) {
494 setBatchOn();
495 mPigServer.setJobName(script);
496 try {
497 loadScript(script, true, false, mLoadOnly, params, files);
498 executeBatch();
499 } finally {
500 discardBatch();
501 }
502 } else {
503 loadScript(script, false, false, mLoadOnly, params, files);
504 }
505 } else {
506 log.warn("'run/exec' statement is ignored while processing 'explain -script' or '-check'");
507 }
508 }
509
510 private void loadScript(String script, boolean batch, boolean loadOnly, boolean illustrate,
511 List<String> params, List<String> files)

Callers

nothing calls this directly

Calls 7

executeBatchMethod · 0.95
setBatchOnMethod · 0.95
loadScriptMethod · 0.95
discardBatchMethod · 0.95
setJobNameMethod · 0.80
validateMethod · 0.65
warnMethod · 0.65

Tested by

no test coverage detected