use of co.cask.cdap.client.MetaClient in project cdap by caskdata.
the class CLIConfig method checkConnection.
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);
}
}
Aggregations