/** * Build an application artifact from the specified class and then add it. * * @param artifactId the id of the artifact to add * @param appClass the application class to build the artifact from * @return an {@link ArtifactManager} to manage the added artifact */ protected static ArtifactManager addAppArtifact(ArtifactId artifactId, Class<?> appClass) throws Exception { return getTestManager().addAppArtifact(artifactId, appClass); }
/** * Update an existing schedule. * * @param scheduleId the ID of the schedule to add * @param scheduleDetail the {@link ScheduleDetail} describing the updated schedule. */ protected final void updateSchedule(ScheduleId scheduleId, ScheduleDetail scheduleDetail) throws Exception { getTestManager().updateSchedule(scheduleId, scheduleDetail); }
/** * Deploys {@link DatasetModule}. * * @param datasetModuleId the module id * @param datasetModule module class * @throws Exception */ protected static void deployDatasetModule(DatasetModuleId datasetModuleId, Class<? extends DatasetModule> datasetModule) throws Exception { getTestManager().deployDatasetModule(datasetModuleId, datasetModule); }
protected ApplicationManager deployApplication(NamespaceId namespace, Class<? extends Application> applicationClz, File...bundleEmbeddedJars) throws IOException { return getTestManager().deployApplication(namespace, applicationClz, bundleEmbeddedJars); }
/** * Gets Dataset manager of Dataset instance of type {@literal <}T>. * * @param datasetId the id of the dataset to get * @return Dataset Manager of Dataset instance of type <T> * @throws Exception */ protected final <T> DataSetManager<T> getDataset(DatasetId datasetId) throws Exception { return getTestManager().getDataset(datasetId); }
/** * Add the specified artifact. * * @param artifactId the id of the artifact to add * @param artifactFile the contents of the artifact. Must be a valid jar file containing apps or plugins * @throws Exception */ protected static ArtifactManager addArtifact(ArtifactId artifactId, File artifactFile) throws Exception { return getTestManager().addArtifact(artifactId, artifactFile); }
/** * Add a new schedule to an existing application * * @param scheduleId the ID of the schedule to add * @param scheduleDetail the {@link ScheduleDetail} describing the new schedule. */ protected final void addSchedule(ScheduleId scheduleId, ScheduleDetail scheduleDetail) throws Exception { getTestManager().addSchedule(scheduleId, scheduleDetail); }
/** * Deletes an instance of dataset. * * @param datasetId the dataset to delete */ protected void deleteDatasetInstance(DatasetId datasetId) throws Exception { getTestManager().deleteDatasetInstance(datasetId); }
/** * Gets the app detail of an application * * @param applicationId the app id of the application * @return ApplicationDetail of the app */ protected final ApplicationDetail getAppDetail(ApplicationId applicationId) throws Exception { return getTestManager().getApplicationDetail(applicationId); }
/** * Delete an existing schedule. * * @param scheduleId the ID of the schedule to be deleted */ protected final void deleteSchedule(ScheduleId scheduleId) throws Exception { getTestManager().deleteSchedule(scheduleId); }
/** * Deletes all applications in the specified namespace. * * @param namespaceId the namespace from which to delete all applications */ protected static void deleteAllApplications(NamespaceId namespaceId) throws Exception { getTestManager().deleteAllApplications(namespaceId); } }
/** * Returns a {@link StreamManager} for the specified stream in the specified namespace * * @param streamId the stream to get * @return {@link StreamManager} for the specified stream in the specified namespace */ protected final StreamManager getStreamManager(StreamId streamId) { return getTestManager().getStreamManager(streamId); }
@Override public ProgramManager apply(ApplicationManager input) { return input.getWorkerManager(AppWithPartitionConsumers.WordCountWorker.NAME).start(); } }, false);
@Override public ProgramManager apply(ApplicationManager input) { return input.getMapReduceManager(AppWithPartitionConsumers.WordCountMapReduce.NAME).start(); } }, true);
/** * Build an application artifact from the specified class and then add it. * * @param artifactId the id of the artifact to add * @param appClass the application class to build the artifact from * @return an {@link ArtifactManager} to manage the added artifact */ protected static ArtifactManager addAppArtifact(ArtifactId artifactId, Class<?> appClass) throws Exception { return getTestManager().addAppArtifact(artifactId, appClass); }
/** * Update an existing schedule. * * @param scheduleId the ID of the schedule to add * @param scheduleDetail the {@link ScheduleDetail} describing the updated schedule. */ protected final void updateSchedule(ScheduleId scheduleId, ScheduleDetail scheduleDetail) throws Exception { getTestManager().updateSchedule(scheduleId, scheduleDetail); }
/** * Deploys {@link DatasetModule}. * * @param datasetModuleId the module id * @param datasetModule module class * @throws Exception */ protected static void deployDatasetModule(DatasetModuleId datasetModuleId, Class<? extends DatasetModule> datasetModule) throws Exception { getTestManager().deployDatasetModule(datasetModuleId, datasetModule); }
/** * Gets Dataset manager of Dataset instance of type {@literal <}T>. * * @param datasetId the id of the dataset to get * @return Dataset Manager of Dataset instance of type <T> * @throws Exception */ protected final <T> DataSetManager<T> getDataset(DatasetId datasetId) throws Exception { return getTestManager().getDataset(datasetId); }
/** * Add the specified artifact. * * @param artifactId the id of the artifact to add * @param artifactFile the contents of the artifact. Must be a valid jar file containing apps or plugins * @throws Exception */ protected static ArtifactManager addArtifact(ArtifactId artifactId, File artifactFile) throws Exception { return getTestManager().addArtifact(artifactId, artifactFile); }
/** * Build an application artifact from the specified class and then add it. * * @param artifactId the id of the artifact to add * @param appClass the application class to build the artifact from * @param manifest the manifest to use when building the jar * @return an {@link ArtifactManager} to manage the added artifact */ protected static ArtifactManager addAppArtifact(ArtifactId artifactId, Class<?> appClass, Manifest manifest) throws Exception { return getTestManager().addAppArtifact(artifactId, appClass, manifest); }