@Test public void testInitializePassed() { LinkConfiguration linkConfig = new LinkConfiguration(); ToJobConfiguration toJobConfig = new ToJobConfiguration(); toJobConfig.toJobConfig.uri = "dataset:file:/ds/not/exist"; when(Datasets.exists(toJobConfig.toJobConfig.uri)) .thenReturn(false); initializer.initialize(null, linkConfig, toJobConfig); }
@Override public void initialize(InitializerContext context, LinkConfiguration linkConfig, ToJobConfiguration toJobConfig) { String uri = ConfigUtil.buildDatasetUri( linkConfig.linkConfig, toJobConfig.toJobConfig); LOG.debug("Constructed dataset URI: " + uri); if (Datasets.exists(uri)) { LOG.error("Overwrite an existing dataset is not expected in new create mode."); throw new SqoopException(KiteConnectorError.GENERIC_KITE_CONNECTOR_0001); } }
KiteToInitializer extends Initializer<LinkConfiguration,
    ToJobConfiguration> { @Override public void initialize(InitializerContext context, LinkConfiguration linkConfig, ToJobConfiguration toJobConfig) { String uri = ConfigUtil.buildDatasetUri( linkConfig.linkConfig, toJobConfig.toJobConfig); LOG.debug("Constructed dataset URI: " + uri); if (Datasets.exists(uri)) { LOG.error("Overwrite an existing dataset is not expected in new create mode."); throw new SqoopException(KiteConnectorError.GENERIC_KITE_CONNECTOR_0001); } } }
KiteToInitializer extends Initializer<LinkConfiguration,
    ToJobConfiguration> { @Override public void initialize(InitializerContext context, LinkConfiguration linkConfig, ToJobConfiguration toJobConfig) { String uri = ConfigUtil.buildDatasetUri( linkConfig.linkConfig, toJobConfig.toJobConfig); LOG.debug("Constructed dataset URI: " + uri); if (Datasets.exists(uri)) { LOG.error("Overwrite an existing dataset is not expected in new create mode."); throw new SqoopException(KiteConnectorError.GENERIC_KITE_CONNECTOR_0001); } }  }
KiteToInitializer extends Initializer<LinkConfiguration,
    ToJobConfiguration> { @Override public void initialize(InitializerContext context, LinkConfiguration linkConfig, ToJobConfiguration toJobConfig) { String uri = ConfigUtil.buildDatasetUri( linkConfig.linkConfig, toJobConfig.toJobConfig); LOG.debug("Constructed dataset URI: " + uri); if (Datasets.exists(uri)) { LOG.error("Overwrite an existing dataset is not expected in new create mode."); throw new SqoopException(KiteConnectorError.GENERIC_KITE_CONNECTOR_0001); } }  @Override void initialize(InitializerContext context,
      LinkConfiguration linkConfig, ToJobConfiguration toJobConfig); @Override Set<String> getJars(InitializerContext context,
      LinkConfiguration linkConfig, ToJobConfiguration toJobConfig); @Override Schema getSchema(InitializerContext context,
      LinkConfiguration linkConfig, ToJobConfiguration toJobConfig); }
KiteToInitializer extends Initializer<LinkConfiguration,
    ToJobConfiguration> { @Override public void initialize(InitializerContext context, LinkConfiguration linkConfig, ToJobConfiguration toJobConfig) { String uri = ConfigUtil.buildDatasetUri( linkConfig.linkConfig, toJobConfig.toJobConfig); LOG.debug("Constructed dataset URI: " + uri); if (Datasets.exists(uri)) { LOG.error("Overwrite an existing dataset is not expected in new create mode."); throw new SqoopException(KiteConnectorError.GENERIC_KITE_CONNECTOR_0001); } }  @Override void initialize(InitializerContext context,
      LinkConfiguration linkConfig, ToJobConfiguration toJobConfig); @Override Set<String> getJars(InitializerContext context,
      LinkConfiguration linkConfig, ToJobConfiguration toJobConfig); @Override Schema getSchema(InitializerContext context,
      LinkConfiguration linkConfig, ToJobConfiguration toJobConfig);  }