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

Method addRegisterScriptUDFClause

src/org/apache/pig/scripting/Pig.java:369–379  ·  view source on GitHub ↗
(String path, String namespace)

Source from the content-addressed store, hash-verified

367 }
368
369 private static void addRegisterScriptUDFClause(String path, String namespace)
370 throws IOException {
371 ScriptPigContext ctx = getScriptContext();
372 ScriptEngine engine = ctx.getScriptEngine();
373 String clause = "REGISTER '" + path + "' USING "
374 + engine.getScriptingLang();
375 if (namespace != null && !namespace.isEmpty()) {
376 clause += " AS " + namespace;
377 }
378 scriptUDFCache.add(clause + ";\n");
379 }
380
381 private static String getDefineClauses() {
382 StringBuilder sb = new StringBuilder();

Callers 1

registerUDFMethod · 0.95

Calls 5

getScriptContextMethod · 0.95
getScriptEngineMethod · 0.95
getScriptingLangMethod · 0.95
addMethod · 0.65
isEmptyMethod · 0.45

Tested by

no test coverage detected