@Test(expected = DataProviderException.class) @Category(UnitTest.class) public void testSetupJobBadName() throws Exception { Job job = new Job(conf, getClass().getSimpleName()); HdfsAdHocDataProvider badprovider = new HdfsAdHocDataProvider(conf, "abcd:bad-name", providerProperties); badprovider.setupJob(job); }
@Override public void setupJob(Job job) throws DataProviderException { super.setupJob(job); try { if (!HadoopFileUtils.exists(getConfiguration(), getResourcePath())) { HadoopFileUtils.create(getConfiguration(), getResourceName()); } } catch (IOException e) { throw new DataProviderException("Error setting up HDFS ad hoc provider", e); } }
HdfsAdHocDataProvider extends AdHocDataProvider { @Override public void setupJob(Job job) throws DataProviderException { super.setupJob(job); try { if (!HadoopFileUtils.exists(getConfiguration(), getResourcePath())) { HadoopFileUtils.create(getConfiguration(), getResourceName()); } } catch (IOException e) { throw new DataProviderException("Error setting up HDFS ad hoc provider", e); } } }
HdfsAdHocDataProvider extends AdHocDataProvider { @Override public void setupJob(Job job) throws DataProviderException { super.setupJob(job); try { if (!HadoopFileUtils.exists(getConfiguration(), getResourcePath())) { HadoopFileUtils.create(getConfiguration(), getResourceName()); } } catch (IOException e) { throw new DataProviderException("Error setting up HDFS ad hoc provider", e); } } HdfsAdHocDataProvider(Configuration conf,
    ProviderProperties providerProperties);  HdfsAdHocDataProvider(Configuration conf, String resourceName,
    ProviderProperties providerProperties); }
HdfsAdHocDataProvider extends AdHocDataProvider { @Override public void setupJob(Job job) throws DataProviderException { super.setupJob(job); try { if (!HadoopFileUtils.exists(getConfiguration(), getResourcePath())) { HadoopFileUtils.create(getConfiguration(), getResourceName()); } } catch (IOException e) { throw new DataProviderException("Error setting up HDFS ad hoc provider", e); } } HdfsAdHocDataProvider(Configuration conf,
    ProviderProperties providerProperties);  HdfsAdHocDataProvider(Configuration conf, String resourceName,
    ProviderProperties providerProperties); @SuppressWarnings("squid:S1166") // Exception caught and handled static boolean canOpen(Configuration conf,
    String name, ProviderProperties providerProperties); static boolean canWrite(String name, Configuration conf,
    ProviderProperties providerProperties); @SuppressWarnings("squid:S1166") // Exception caught and handled static boolean exists(Configuration conf, String name,
    ProviderProperties providerProperties); static void delete(Configuration conf, String name,
    ProviderProperties providerProperties); @Override void setupJob(Job job); @Override OutputStream add(); @Override @SuppressWarnings("squid:S1166") // Exception caught and handled OutputStream add(String name); @Override void delete(); @Override void move(String toResource); @Override InputStream get(int index); @Override @SuppressFBWarnings(value = "WEAK_FILENAMEUTILS", justification = "adhoc provider, our class, we control the filenames") InputStream get(String name); @Override String getName(int index); Path getResourcePath(); @Override int size(); }
HdfsAdHocDataProvider extends AdHocDataProvider { @Override public void setupJob(Job job) throws DataProviderException { super.setupJob(job); try { if (!HadoopFileUtils.exists(getConfiguration(), getResourcePath())) { HadoopFileUtils.create(getConfiguration(), getResourceName()); } } catch (IOException e) { throw new DataProviderException("Error setting up HDFS ad hoc provider", e); } } HdfsAdHocDataProvider(Configuration conf,
    ProviderProperties providerProperties);  HdfsAdHocDataProvider(Configuration conf, String resourceName,
    ProviderProperties providerProperties); @SuppressWarnings("squid:S1166") // Exception caught and handled static boolean canOpen(Configuration conf,
    String name, ProviderProperties providerProperties); static boolean canWrite(String name, Configuration conf,
    ProviderProperties providerProperties); @SuppressWarnings("squid:S1166") // Exception caught and handled static boolean exists(Configuration conf, String name,
    ProviderProperties providerProperties); static void delete(Configuration conf, String name,
    ProviderProperties providerProperties); @Override void setupJob(Job job); @Override OutputStream add(); @Override @SuppressWarnings("squid:S1166") // Exception caught and handled OutputStream add(String name); @Override void delete(); @Override void move(String toResource); @Override InputStream get(int index); @Override @SuppressFBWarnings(value = "WEAK_FILENAMEUTILS", justification = "adhoc provider, our class, we control the filenames") InputStream get(String name); @Override String getName(int index); Path getResourcePath(); @Override int size();  }