public Map<String, ConfigEntry> getHadoopConfig() throws IOException, UnauthenticatedException, UnauthorizedException { return getConfig("config/hadoop"); }
private void checkConnection(ClientConfig baseClientConfig, ConnectionConfig connectionInfo, AccessToken accessToken) throws IOException, UnauthenticatedException, UnauthorizedException { ClientConfig clientConfig = new ClientConfig.Builder(baseClientConfig) .setConnectionConfig(connectionInfo) .setAccessToken(accessToken) .build(); MetaClient metaClient = new MetaClient(clientConfig); try { metaClient.ping(); } catch (IOException e) { throw new IOException("Check hostname and/or port", e); } }
protected MetaClient getMetaClient() { return new MetaClient(getClientConfig(), getRestClient()); }
private void assertUnrecoverableResetEnabled() throws IOException, UnauthenticatedException, UnauthorizedException { ConfigEntry configEntry = getMetaClient().getCDAPConfig().get(Constants.Dangerous.UNRECOVERABLE_RESET); Preconditions.checkNotNull(configEntry, "Missing key from CDAP Configuration: %s", Constants.Dangerous.UNRECOVERABLE_RESET); Preconditions.checkState(Boolean.parseBoolean(configEntry.getValue()), "UnrecoverableReset not enabled."); }
private void checkConnection(ClientConfig baseClientConfig, ConnectionConfig connectionInfo, AccessToken accessToken) throws IOException, UnauthenticatedException, UnauthorizedException { ClientConfig clientConfig = new ClientConfig.Builder(baseClientConfig) .setConnectionConfig(connectionInfo) .setAccessToken(accessToken) .build(); MetaClient metaClient = new MetaClient(clientConfig); try { metaClient.ping(); } catch (IOException e) { throw new IOException("Check hostname and/or port", e); } }
public Map<String, ConfigEntry> getCDAPConfig() throws IOException, UnauthenticatedException, UnauthorizedException { return getConfig("config/cdap"); }