@Test public void noConfigLoadedWhenNoKiteService() throws URIHandlerException, URISyntaxException, ServiceException, FileNotFoundException, IOException { setupKiteConfigurationService(false, false); URI uri = new URI("view:file:target/data/data/nomailbox?message=hello"); uriHandler.exists(uri, null); Assert.assertNotNull(Services.get()); Assert.assertNull(Services.get().get(KiteConfigurationService.class)); }
@SuppressWarnings("rawtypes") @Override public boolean exists(final URI uri, final Context context) throws URIHandlerException { if(confLoaded.compareAndSet(false, true)) { loadConfiguration(); } try { View<GenericRecord> view = Datasets.load(uri); if(view instanceof Signalable) { return ((Signalable)view).isReady(); } } catch (IllegalArgumentException ex) { LOG.error("the URI " + uri + " was not a view or dataset"); } catch (DatasetNotFoundException ex) { LOG.error("the dataset for the URI "+ uri +" did not actually exist"); } catch (DatasetException e) { throw new HadoopAccessorException(ErrorCode.E0902, e); } return false; }
KiteURIHandler implements URIHandler { @SuppressWarnings("rawtypes") @Override public boolean exists(final URI uri, final Context context) throws URIHandlerException { if(confLoaded.compareAndSet(false, true)) { loadConfiguration(); } try { View<GenericRecord> view = Datasets.load(uri); if(view instanceof Signalable) { return ((Signalable)view).isReady(); } } catch (IllegalArgumentException ex) { LOG.error("the URI " + uri + " was not a view or dataset"); } catch (DatasetNotFoundException ex) { LOG.error("the dataset for the URI "+ uri +" did not actually exist"); } catch (DatasetException e) { throw new HadoopAccessorException(ErrorCode.E0902, e); } return false; } }
KiteURIHandler implements URIHandler { @SuppressWarnings("rawtypes") @Override public boolean exists(final URI uri, final Context context) throws URIHandlerException { if(confLoaded.compareAndSet(false, true)) { loadConfiguration(); } try { View<GenericRecord> view = Datasets.load(uri); if(view instanceof Signalable) { return ((Signalable)view).isReady(); } } catch (IllegalArgumentException ex) { LOG.error("the URI " + uri + " was not a view or dataset"); } catch (DatasetNotFoundException ex) { LOG.error("the dataset for the URI "+ uri +" did not actually exist"); } catch (DatasetException e) { throw new HadoopAccessorException(ErrorCode.E0902, e); } return false; }  }
KiteURIHandler implements URIHandler { @SuppressWarnings("rawtypes") @Override public boolean exists(final URI uri, final Context context) throws URIHandlerException { if(confLoaded.compareAndSet(false, true)) { loadConfiguration(); } try { View<GenericRecord> view = Datasets.load(uri); if(view instanceof Signalable) { return ((Signalable)view).isReady(); } } catch (IllegalArgumentException ex) { LOG.error("the URI " + uri + " was not a view or dataset"); } catch (DatasetNotFoundException ex) { LOG.error("the dataset for the URI "+ uri +" did not actually exist"); } catch (DatasetException e) { throw new HadoopAccessorException(ErrorCode.E0902, e); } return false; }  @Override void init(final Configuration conf); @Override Set<String> getSupportedSchemes(); @Override Class<? extends LauncherURIHandler> getLauncherURIHandlerClass(); @Override List<Class<?>> getClassesForLauncher(); @Override DependencyType getDependencyType(final URI uri); @Override void registerForNotification(final URI uri, final Configuration conf,
      final String user, final String actionID); @Override boolean unregisterFromNotification(final URI uri, final String actionID); @Override Context getContext(final URI uri, final Configuration conf,
      final String user); @SuppressWarnings("rawtypes") @Override boolean exists(final URI uri, final Context context); @Override boolean exists(final URI uri, final Configuration conf, final String user); @Override String getURIWithDoneFlag(final String uri, final String doneFlag); @Override void validate(final String uri); @Override void destroy(); }
KiteURIHandler implements URIHandler { @SuppressWarnings("rawtypes") @Override public boolean exists(final URI uri, final Context context) throws URIHandlerException { if(confLoaded.compareAndSet(false, true)) { loadConfiguration(); } try { View<GenericRecord> view = Datasets.load(uri); if(view instanceof Signalable) { return ((Signalable)view).isReady(); } } catch (IllegalArgumentException ex) { LOG.error("the URI " + uri + " was not a view or dataset"); } catch (DatasetNotFoundException ex) { LOG.error("the dataset for the URI "+ uri +" did not actually exist"); } catch (DatasetException e) { throw new HadoopAccessorException(ErrorCode.E0902, e); } return false; }  @Override void init(final Configuration conf); @Override Set<String> getSupportedSchemes(); @Override Class<? extends LauncherURIHandler> getLauncherURIHandlerClass(); @Override List<Class<?>> getClassesForLauncher(); @Override DependencyType getDependencyType(final URI uri); @Override void registerForNotification(final URI uri, final Configuration conf,
      final String user, final String actionID); @Override boolean unregisterFromNotification(final URI uri, final String actionID); @Override Context getContext(final URI uri, final Configuration conf,
      final String user); @SuppressWarnings("rawtypes") @Override boolean exists(final URI uri, final Context context); @Override boolean exists(final URI uri, final Configuration conf, final String user); @Override String getURIWithDoneFlag(final String uri, final String doneFlag); @Override void validate(final String uri); @Override void destroy();  }