@Test @Category(UnitTest.class) public void testCreateMrsImageDataProvider() throws Exception { String name = "bar"; MrsImageDataProvider provider = factory.createMrsImageDataProvider(name, conf, providerProperties); Assert.assertNotNull("Provider not created!", provider); Assert.assertEquals("Name not set properly!", name, provider.getResourceName()); String name2 = "foo"; String name3 = MrGeoAccumuloConstants.MRGEO_ACC_PREFIX + name2; MrsImageDataProvider provider2 = factory.createMrsImageDataProvider(name3, conf, providerProperties); Assert.assertNotNull("Provider not created!", provider2); Assert.assertEquals("Name not set properly!", name2, provider2.getResourceName()); }
@Override public MrsImageDataProvider createMrsImageDataProvider(final String input, final Configuration conf, final ProviderProperties providerProperties) { table = input; if (input.startsWith(MrGeoAccumuloConstants.MRGEO_ACC_PREFIX)) { table = table.replace(MrGeoAccumuloConstants.MRGEO_ACC_PREFIX, ""); } return new AccumuloMrsImageDataProvider(providerProperties, table); }
AccumuloMrsImageDataProviderFactory implements MrsImageDataProviderFactory { @Override public MrsImageDataProvider createMrsImageDataProvider(final String input, final Configuration conf, final ProviderProperties providerProperties) { table = input; if (input.startsWith(MrGeoAccumuloConstants.MRGEO_ACC_PREFIX)) { table = table.replace(MrGeoAccumuloConstants.MRGEO_ACC_PREFIX, ""); } return new AccumuloMrsImageDataProvider(providerProperties, table); } }
AccumuloMrsImageDataProviderFactory implements MrsImageDataProviderFactory { @Override public MrsImageDataProvider createMrsImageDataProvider(final String input, final Configuration conf, final ProviderProperties providerProperties) { table = input; if (input.startsWith(MrGeoAccumuloConstants.MRGEO_ACC_PREFIX)) { table = table.replace(MrGeoAccumuloConstants.MRGEO_ACC_PREFIX, ""); } return new AccumuloMrsImageDataProvider(providerProperties, table); } AccumuloMrsImageDataProviderFactory(); }
AccumuloMrsImageDataProviderFactory implements MrsImageDataProviderFactory { @Override public MrsImageDataProvider createMrsImageDataProvider(final String input, final Configuration conf, final ProviderProperties providerProperties) { table = input; if (input.startsWith(MrGeoAccumuloConstants.MRGEO_ACC_PREFIX)) { table = table.replace(MrGeoAccumuloConstants.MRGEO_ACC_PREFIX, ""); } return new AccumuloMrsImageDataProvider(providerProperties, table); } AccumuloMrsImageDataProviderFactory(); @Override boolean isValid(); @Override void initialize(Configuration conf); @Override String getPrefix(); @Override Map<String, String> getConfiguration(); @Override void setConfiguration(Map<String, String> properties); @Override MrsImageDataProvider createTempMrsImageDataProvider(final Configuration conf,
                                                           ProviderProperties providerProperties); @Override MrsImageDataProvider createMrsImageDataProvider(final String input,
                                                       final Configuration conf,
                                                       final ProviderProperties providerProperties); @Override boolean canOpen(final String input,
                       final Configuration conf,
                       final ProviderProperties providerProperties); @Override String[] listImages(final Configuration conf,
                           final ProviderProperties providerProperties); @Override boolean canWrite(final String input,
                        final Configuration conf,
                        final ProviderProperties providerProperties); @Override boolean exists(final String input,
                      final Configuration conf,
                      final ProviderProperties providerProperties); @Override void delete(final String name,
                   final Configuration conf,
                   final ProviderProperties providerProperties); }
AccumuloMrsImageDataProviderFactory implements MrsImageDataProviderFactory { @Override public MrsImageDataProvider createMrsImageDataProvider(final String input, final Configuration conf, final ProviderProperties providerProperties) { table = input; if (input.startsWith(MrGeoAccumuloConstants.MRGEO_ACC_PREFIX)) { table = table.replace(MrGeoAccumuloConstants.MRGEO_ACC_PREFIX, ""); } return new AccumuloMrsImageDataProvider(providerProperties, table); } AccumuloMrsImageDataProviderFactory(); @Override boolean isValid(); @Override void initialize(Configuration conf); @Override String getPrefix(); @Override Map<String, String> getConfiguration(); @Override void setConfiguration(Map<String, String> properties); @Override MrsImageDataProvider createTempMrsImageDataProvider(final Configuration conf,
                                                           ProviderProperties providerProperties); @Override MrsImageDataProvider createMrsImageDataProvider(final String input,
                                                       final Configuration conf,
                                                       final ProviderProperties providerProperties); @Override boolean canOpen(final String input,
                       final Configuration conf,
                       final ProviderProperties providerProperties); @Override String[] listImages(final Configuration conf,
                           final ProviderProperties providerProperties); @Override boolean canWrite(final String input,
                        final Configuration conf,
                        final ProviderProperties providerProperties); @Override boolean exists(final String input,
                      final Configuration conf,
                      final ProviderProperties providerProperties); @Override void delete(final String name,
                   final Configuration conf,
                   final ProviderProperties providerProperties);  }