public Endpoint getServicesEndpoint() { final int servicePort = HiveConf.getIntVar(conf, ConfVars.LLAP_DAEMON_WEB_PORT); final boolean isSSL = HiveConf.getBoolVar(conf, ConfVars.LLAP_DAEMON_WEB_SSL); final String scheme = isSSL ? "https" : "http"; final URL serviceURL; try { serviceURL = new URL(scheme, hostname, servicePort, ""); return RegistryTypeUtils.webEndpoint(IPC_SERVICES, serviceURL.toURI()); } catch (MalformedURLException e) { throw new RuntimeException(e); } catch (URISyntaxException e) { throw new RuntimeException("llap service URI for " + hostname + " is invalid", e); } }
public Endpoint getServicesEndpoint() { final int servicePort = HiveConf.getIntVar(conf, ConfVars.LLAP_DAEMON_WEB_PORT); final boolean isSSL = HiveConf.getBoolVar(conf, ConfVars.LLAP_DAEMON_WEB_SSL); final String scheme = isSSL ? "https" : "http"; final URL serviceURL; try { serviceURL = new URL(scheme, hostname, servicePort, ""); return RegistryTypeUtils.webEndpoint(IPC_SERVICES, serviceURL.toURI()); } catch (MalformedURLException e) { throw new RuntimeException(e); } catch (URISyntaxException e) { throw new RuntimeException("llap service URI for " + hostname + " is invalid", e); } }
return usageError("Invalid URI: " + e.getMessage(), BIND_USAGE); sr.addExternalEndpoint(webEndpoint(line.getOptionValue("api"), theUri));
return usageError("Invalid URI: " + e.getMessage(), BIND_USAGE); sr.addExternalEndpoint(webEndpoint(line.getOptionValue("api"), theUri));
RegistryTypeUtils.webEndpoint( CustomRegistryConstants.WEB_UI, amWebURI.toURI())); RegistryTypeUtils.webEndpoint( CustomRegistryConstants.AM_REST_BASE, amWebURI.toURI()));
RegistryTypeUtils.webEndpoint( CustomRegistryConstants.WEB_UI, amWebURI.toURI())); RegistryTypeUtils.webEndpoint( CustomRegistryConstants.AM_REST_BASE, amWebURI.toURI()));
/** * Add some endpoints * @param entry entry */ public static void addSampleEndpoints(ServiceRecord entry, String hostname) throws URISyntaxException { assertNotNull(hostname); entry.addExternalEndpoint(webEndpoint(HTTP_API, new URI("http", hostname + ":80", "/"))); entry.addExternalEndpoint( restEndpoint(API_WEBHDFS, new URI("http", hostname + ":8020", "/"))); Endpoint endpoint = ipcEndpoint(API_HDFS, null); endpoint.addresses.add(RegistryTypeUtils.hostnamePortPair(hostname, 8030)); entry.addInternalEndpoint(endpoint); InetSocketAddress localhost = new InetSocketAddress("localhost", 8050); entry.addInternalEndpoint( inetAddrEndpoint(NNIPC, ProtocolTypes.PROTOCOL_THRIFT, "localhost", 8050)); entry.addInternalEndpoint( RegistryTypeUtils.ipcEndpoint( IPC2, localhost)); }
/** * Add some endpoints * @param entry entry */ public static void addSampleEndpoints(ServiceRecord entry, String hostname) throws URISyntaxException { assertNotNull(hostname); entry.addExternalEndpoint(webEndpoint(HTTP_API, new URI("http", hostname + ":80", "/"))); entry.addExternalEndpoint( restEndpoint(API_WEBHDFS, new URI("http", hostname + ":8020", "/"))); Endpoint endpoint = ipcEndpoint(API_HDFS, null); endpoint.addresses.add(RegistryTypeUtils.hostnamePortPair(hostname, 8030)); entry.addInternalEndpoint(endpoint); InetSocketAddress localhost = new InetSocketAddress("localhost", 8050); entry.addInternalEndpoint( inetAddrEndpoint(NNIPC, ProtocolTypes.PROTOCOL_THRIFT, "localhost", 8050)); entry.addInternalEndpoint( RegistryTypeUtils.ipcEndpoint( IPC2, localhost)); }