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

Method registerScript

test/org/apache/pig/pigunit/pig/PigServer.java:49–61  ·  view source on GitHub ↗

Parses and registers the pig script. @param fileName The Pig script file. @param aliasOverride The list of aliases to override in the Pig script. @throws IOException If the Pig script can't be parsed correctly.

(String fileName, Map<String, String> aliasOverride)

Source from the content-addressed store, hash-verified

47 * @throws IOException If the Pig script can't be parsed correctly.
48 */
49 public void registerScript(String fileName, Map<String, String> aliasOverride)
50 throws IOException {
51 try {
52 InputStream compositeStream = Utils.getCompositeStream(new FileInputStream(fileName), pigContext.getProperties());
53 GruntParser grunt = new GruntParser(new InputStreamReader(compositeStream), this, aliasOverride);
54 grunt.setInteractive(false);
55 grunt.parseStopOnError(true);
56 } catch (FileNotFoundException e) {
57 throw new IOException(e);
58 } catch (org.apache.pig.tools.pigscript.parser.ParseException e) {
59 throw new IOException(e);
60 }
61 }
62}

Callers 15

testInScriptMethod · 0.95
testBlacklistMethod · 0.95
testExplainMethod · 0.95
testExecMethod · 0.95
testRunMethod · 0.95
testImportMethod · 0.95
testParamSubstitutionMethod · 0.95

Calls 4

getCompositeStreamMethod · 0.95
setInteractiveMethod · 0.95
parseStopOnErrorMethod · 0.95
getPropertiesMethod · 0.45

Tested by

no test coverage detected