use of com.hazelcast.jet.impl.deployment.LoadResource.LoadResourceMetaSupplier in project hazelcast-jet by hazelcast.
the class AbstractDeploymentTest method testDeployment_whenFileAddedAsResource_thenAvailableOnClassLoader.
@Test
public void testDeployment_whenFileAddedAsResource_thenAvailableOnClassLoader() throws Throwable {
createCluster();
DAG dag = new DAG();
dag.newVertex("load resource", new LoadResourceMetaSupplier());
JobConfig jobConfig = new JobConfig();
jobConfig.addResource(this.getClass().getResource("/deployment/resource.txt"), "customId");
executeAndPeel(getJetInstance().newJob(dag, jobConfig));
}
use of com.hazelcast.jet.impl.deployment.LoadResource.LoadResourceMetaSupplier in project hazelcast by hazelcast.
the class AbstractDeploymentTest method testDeployment_whenFileAddedAsResource_thenAvailableOnClassLoader.
@Test
public void testDeployment_whenFileAddedAsResource_thenAvailableOnClassLoader() throws Throwable {
DAG dag = new DAG();
dag.newVertex("load resource", new LoadResourceMetaSupplier());
JobConfig jobConfig = new JobConfig();
jobConfig.addClasspathResource(this.getClass().getResource("/deployment/resource.txt"), "customId");
executeAndPeel(getJet().newJob(dag, jobConfig));
}
use of com.hazelcast.jet.impl.deployment.LoadResource.LoadResourceMetaSupplier in project hazelcast by hazelcast.
the class AbstractDeploymentTest method testDeployment_when_customClassLoaderFactory_then_used.
@Test
public void testDeployment_when_customClassLoaderFactory_then_used() throws Throwable {
DAG dag = new DAG();
dag.newVertex("load resource", new LoadResourceMetaSupplier());
JobConfig jobConfig = new JobConfig();
jobConfig.setClassLoaderFactory(new MyJobClassLoaderFactory());
executeAndPeel(getJet().newJob(dag, jobConfig));
}
Aggregations