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

Method set

src/org/apache/pig/scripting/Pig.java:155–159  ·  view source on GitHub ↗

Set a variable for use in Pig Latin. This set will then be present for all subsequent Pig pipelines defined in this script. If you wish to set it for only a single Pig pipeline, use set within that definition. @param var variable to set @param value to set it to

(String var, String value)

Source from the content-addressed store, hash-verified

153 * @param value to set it to
154 */
155 public static void set(String var, String value) throws IOException {
156 ScriptPigContext ctx = getScriptContext();
157 PigServer pigServer = new PigServer(ctx.getPigContext(), false);
158 pigServer.getPigContext().getProperties().setProperty(var, value);
159 }
160
161 /**
162 * Define a Pig pipeline.

Callers 1

setMethod · 0.95

Calls 5

getScriptContextMethod · 0.95
getPigContextMethod · 0.95
getPigContextMethod · 0.95
setPropertyMethod · 0.65
getPropertiesMethod · 0.45

Tested by

no test coverage detected