@Test (dependsOnMethods = "testAddSpec") public void testUpdateSpec() throws ExecutionException, InterruptedException, URISyntaxException { this._fsSpecProducer.updateSpec(createTestJobSpec()); List<Pair<SpecExecutor.Verb, Spec>> jobSpecs = this._fsSpecConsumer.changedSpecs().get(); Assert.assertEquals(jobSpecs.size(), 1); Assert.assertEquals(jobSpecs.get(0).getLeft(), SpecExecutor.Verb.UPDATE); Assert.assertEquals(jobSpecs.get(0).getRight().getUri().toString(), "testJob"); Assert.assertEquals(((JobSpec) jobSpecs.get(0).getRight()).getConfig().getString("key1"), "val1"); Assert.assertEquals(((JobSpec) jobSpecs.get(0).getRight()).getConfig().getString("key2"), "val2"); }
@Override public Future<?> updateSpec(Spec updatedSpec) { return writeSpec(updatedSpec, SpecExecutor.Verb.UPDATE); }
FsSpecProducer implements SpecProducer<Spec> { @Override public Future<?> updateSpec(Spec updatedSpec) { return writeSpec(updatedSpec, SpecExecutor.Verb.UPDATE); } }
FsSpecProducer implements SpecProducer<Spec> { @Override public Future<?> updateSpec(Spec updatedSpec) { return writeSpec(updatedSpec, SpecExecutor.Verb.UPDATE); } FsSpecProducer(Config config);  FsSpecProducer(@Nullable FileSystem fs, Config config); }
FsSpecProducer implements SpecProducer<Spec> { @Override public Future<?> updateSpec(Spec updatedSpec) { return writeSpec(updatedSpec, SpecExecutor.Verb.UPDATE); } FsSpecProducer(Config config);  FsSpecProducer(@Nullable FileSystem fs, Config config); @Override Future<?> addSpec(Spec addedSpec); @Override Future<?> updateSpec(Spec updatedSpec); @Override Future<?> deleteSpec(URI deletedSpecURI, Properties headers); @Override Future<? extends List<Spec>> listSpecs(); }
FsSpecProducer implements SpecProducer<Spec> { @Override public Future<?> updateSpec(Spec updatedSpec) { return writeSpec(updatedSpec, SpecExecutor.Verb.UPDATE); } FsSpecProducer(Config config);  FsSpecProducer(@Nullable FileSystem fs, Config config); @Override Future<?> addSpec(Spec addedSpec); @Override Future<?> updateSpec(Spec updatedSpec); @Override Future<?> deleteSpec(URI deletedSpecURI, Properties headers); @Override Future<? extends List<Spec>> listSpecs();  }