/** * Validates a job before executing it. * * @param context * @param job * @param analysisJob * * @throws NoSuchDatastoreException */ private void preExecuteJob(TenantContext context, DataCleanerJobContext job, AnalysisJob analysisJob) throws NoSuchDatastoreException { final Datastore datastore = analysisJob.getDatastore(); if (datastore instanceof PlaceholderDatastore) { // the job was materialized using a placeholder datastore - ie. // the real datastore was not found! final String sourceDatastoreName = job.getSourceDatastoreName(); logger.warn( "Raising a NoSuchDatastoreException since a PlaceholderDatastore was found at execution time: {}", sourceDatastoreName); throw new NoSuchDatastoreException(sourceDatastoreName); } }
.showConfirmDialog(null, e.getMessage() + "\n\nDo you wish to open this job as a template?", "Error: " + e.getMessage(), JOptionPane.OK_CANCEL_OPTION, JOptionPane.ERROR_MESSAGE); if (result == JOptionPane.OK_OPTION) { final OpenAnalysisJobAsTemplateDialog dialog =
@Override public SynonymCatalogConnection openConnection(final DataCleanerConfiguration configuration) { final Datastore datastore = configuration.getDatastoreCatalog().getDatastore(_datastoreName); if (datastore == null) { throw new NoSuchDatastoreException(_datastoreName); } final DatastoreConnection datastoreConnection = datastore.openConnection(); if (_loadIntoMemory) { final SimpleSynonymCatalog simpleSynonymCatalog = loadIntoMemory(datastoreConnection); // no need for the connection anymore datastoreConnection.close(); return simpleSynonymCatalog.openConnection(configuration); } return new DatastoreSynonymCatalogConnection(this, datastoreConnection); }
@Override public DictionaryConnection openConnection(final DataCleanerConfiguration configuration) { final Datastore datastore = configuration.getDatastoreCatalog().getDatastore(_datastoreName); if (datastore == null) { throw new NoSuchDatastoreException(_datastoreName); } final DatastoreConnection datastoreConnection = datastore.openConnection(); if (_loadIntoMemory) { final SimpleDictionary simpleDictionary = loadIntoMemory(datastoreConnection); // no need for the connection anymore datastoreConnection.close(); return simpleDictionary.openConnection(configuration); } return new DatastoreDictionaryConnection(this, datastoreConnection); }
throw new NoSuchDatastoreException(ref);