public String getSchema() { FileUploadDownloadClient fileUploadDownloadClient = new FileUploadDownloadClient(); List<URI> schemaURIs = new ArrayList<>(); try { for (PushLocation pushLocation : _pushLocations) { schemaURIs.add(FileUploadDownloadClient .getRetrieveSchemaHttpURI(pushLocation.getHost(), pushLocation.getPort(), _tableName)); } } catch (URISyntaxException e) { LOGGER.error("Could not construct schema URI for table {}", _tableName); throw new RuntimeException(e); } for (URI schemaURI : schemaURIs) { try { SimpleHttpResponse response = fileUploadDownloadClient.getSchema(schemaURI); if (response != null) { return response.getResponse(); } } catch (Exception e) { LOGGER.warn("Caught exception while trying to get schema for " + _tableName + " " + e); } } LOGGER.error("Could not get schema configs for any push locations provided for " + _tableName); throw new RuntimeException("Could not get schema for table " + _tableName); } }