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

Method parseRegister

src/org/apache/pig/parser/RegisterResolver.java:45–62  ·  view source on GitHub ↗

@param path @param scriptingLang @param namespace @throws IOException

(String path, String scriptingLang, String namespace)

Source from the content-addressed store, hash-verified

43 * @throws IOException
44 */
45 public void parseRegister(String path, String scriptingLang, String namespace) throws IOException {
46 try {
47 URI uri = new URI(path);
48 if (resolvesToJar(uri)) {
49 if (scriptingLang != null || namespace != null) {
50 throw new ParserException("Cannot register a jar with a scripting language or namespace");
51 }
52 URI[] uriList = resolve(uri);
53 for (URI jarUri : uriList) {
54 pigServer.registerJar(jarUri.toString());
55 }
56 } else {
57 pigServer.registerCode(path, scriptingLang, namespace);
58 }
59 } catch (URISyntaxException e) {
60 throw new ParserException("URI " + path + " is incorrect.", e);
61 }
62 }
63
64 /**
65 * @param uri

Callers 7

testRegisterArtifactMethod · 0.95
processRegisterMethod · 0.80
applyRegistersMethod · 0.80

Calls 5

resolvesToJarMethod · 0.95
resolveMethod · 0.95
registerCodeMethod · 0.80
registerJarMethod · 0.45
toStringMethod · 0.45

Tested by 5

testRegisterArtifactMethod · 0.76