@Test public void testLoad_dataModels_parserError() throws Exception { String base = String.format("http: HTTPSchemaLoader client = new HTTPSchemaLoader(base, "manifest_invalid_data_model.json"); SetValuedMap<String, Schema> glossary = client.load(); Assert.assertTrue(glossary.isEmpty()); }
@Override public SetValuedMap<String, Schema> load() throws IOException { Manifest manifest = downloadResource(baseUrl, manifestName, is -> gson.fromJson(new InputStreamReader(is), Manifest.class)); if (manifest == null) { throw new IOException("unable to download the manifest resource."); } return downloadSchemas(manifest); }
HTTPSchemaLoader implements AvroSchemaLoader { @Override public SetValuedMap<String, Schema> load() throws IOException { Manifest manifest = downloadResource(baseUrl, manifestName, is -> gson.fromJson(new InputStreamReader(is), Manifest.class)); if (manifest == null) { throw new IOException("unable to download the manifest resource."); } return downloadSchemas(manifest); } }
HTTPSchemaLoader implements AvroSchemaLoader { @Override public SetValuedMap<String, Schema> load() throws IOException { Manifest manifest = downloadResource(baseUrl, manifestName, is -> gson.fromJson(new InputStreamReader(is), Manifest.class)); if (manifest == null) { throw new IOException("unable to download the manifest resource."); } return downloadSchemas(manifest); } HTTPSchemaLoader(String baseUrl, String manifestName); }
HTTPSchemaLoader implements AvroSchemaLoader { @Override public SetValuedMap<String, Schema> load() throws IOException { Manifest manifest = downloadResource(baseUrl, manifestName, is -> gson.fromJson(new InputStreamReader(is), Manifest.class)); if (manifest == null) { throw new IOException("unable to download the manifest resource."); } return downloadSchemas(manifest); } HTTPSchemaLoader(String baseUrl, String manifestName); @Override SetValuedMap<String, Schema> load(); }
HTTPSchemaLoader implements AvroSchemaLoader { @Override public SetValuedMap<String, Schema> load() throws IOException { Manifest manifest = downloadResource(baseUrl, manifestName, is -> gson.fromJson(new InputStreamReader(is), Manifest.class)); if (manifest == null) { throw new IOException("unable to download the manifest resource."); } return downloadSchemas(manifest); } HTTPSchemaLoader(String baseUrl, String manifestName); @Override SetValuedMap<String, Schema> load();  }