@Test @Category(UnitTest.class) public void testExists() throws Exception { provider = factory.createAdHocDataProvider(conf, providerProperties); OutputStream stream = provider.add(); stream.close(); Assert.assertTrue("Name should exist!", factory.exists(provider.getResourceName(), conf, providerProperties)); }
@Override public boolean exists(String name, Configuration conf, ProviderProperties providerProperties) throws IOException { return HdfsAdHocDataProvider.exists(conf, name, providerProperties); }
HdfsAdHocDataProviderFactory implements AdHocDataProviderFactory { @Override public boolean exists(String name, Configuration conf, ProviderProperties providerProperties) throws IOException { return HdfsAdHocDataProvider.exists(conf, name, providerProperties); } }
HdfsAdHocDataProviderFactory implements AdHocDataProviderFactory { @Override public boolean exists(String name, Configuration conf, ProviderProperties providerProperties) throws IOException { return HdfsAdHocDataProvider.exists(conf, name, providerProperties); }  }
HdfsAdHocDataProviderFactory implements AdHocDataProviderFactory { @Override public boolean exists(String name, Configuration conf, ProviderProperties providerProperties) throws IOException { return HdfsAdHocDataProvider.exists(conf, name, providerProperties); }  @Override boolean isValid(Configuration conf); @Override @SuppressWarnings("squid:S2696") // need to keep the conf static, but want to only set it with the object. yuck! void initialize(Configuration config); @Override String getPrefix(); @Override Map<String, String> getConfiguration(); @Override void setConfiguration(Map<String, String> properties); @Override AdHocDataProvider createAdHocDataProvider(String name,
                                                 Configuration conf,
                                                 ProviderProperties providerProperties); @Override AdHocDataProvider createAdHocDataProvider(Configuration conf,
                                                 ProviderProperties providerProperties); @Override boolean canOpen(String name,
                       Configuration conf,
                       ProviderProperties providerProperties); @Override boolean canWrite(String name,
                        Configuration conf,
                        ProviderProperties providerProperties); @Override boolean exists(String name,
                      Configuration conf,
                      ProviderProperties providerProperties); @Override void delete(String name,
                   Configuration conf,
                   ProviderProperties providerProperties); }
HdfsAdHocDataProviderFactory implements AdHocDataProviderFactory { @Override public boolean exists(String name, Configuration conf, ProviderProperties providerProperties) throws IOException { return HdfsAdHocDataProvider.exists(conf, name, providerProperties); }  @Override boolean isValid(Configuration conf); @Override @SuppressWarnings("squid:S2696") // need to keep the conf static, but want to only set it with the object. yuck! void initialize(Configuration config); @Override String getPrefix(); @Override Map<String, String> getConfiguration(); @Override void setConfiguration(Map<String, String> properties); @Override AdHocDataProvider createAdHocDataProvider(String name,
                                                 Configuration conf,
                                                 ProviderProperties providerProperties); @Override AdHocDataProvider createAdHocDataProvider(Configuration conf,
                                                 ProviderProperties providerProperties); @Override boolean canOpen(String name,
                       Configuration conf,
                       ProviderProperties providerProperties); @Override boolean canWrite(String name,
                        Configuration conf,
                        ProviderProperties providerProperties); @Override boolean exists(String name,
                      Configuration conf,
                      ProviderProperties providerProperties); @Override void delete(String name,
                   Configuration conf,
                   ProviderProperties providerProperties);  }