protected DatasetClient getDatasetClient() { return new DatasetClient(getClientConfig(), getRestClient()); }
public void datasetClient() throws Exception { // Construct the client used to interact with CDAP DatasetClient datasetClient = new DatasetClient(clientConfig); // Fetch the list of datasets List<DatasetSpecificationSummary> datasets = datasetClient.list(NamespaceId.DEFAULT); // Create a dataset DatasetId datasetId = NamespaceId.DEFAULT.dataset("someDataset"); datasetClient.create(datasetId, "someDatasetType"); // Truncate a dataset datasetClient.truncate(datasetId); // Delete a dataset datasetClient.delete(datasetId); }
public IntegrationTestManager(ClientConfig clientConfig, RESTClient restClient, File tmpFolder) { this.clientConfig = clientConfig; this.restClient = restClient; this.tmpFolder = tmpFolder; this.locationFactory = new LocalLocationFactory(tmpFolder); this.applicationClient = new ApplicationClient(clientConfig, restClient); this.artifactClient = new ArtifactClient(clientConfig, restClient); this.datasetClient = new DatasetClient(clientConfig, restClient); this.datasetModuleClient = new DatasetModuleClient(clientConfig, restClient); this.namespaceClient = new NamespaceClient(clientConfig, restClient); this.programClient = new ProgramClient(clientConfig, restClient); this.scheduleClient = new ScheduleClient(clientConfig, restClient); }
metadataSubscriberService.startAndWait(); locationFactory = getInjector().getInstance(LocationFactory.class); datasetClient = new DatasetClient(getClientConfig(discoveryClient, Constants.Service.DATASET_MANAGER)); metadataClient = new MetadataClient(getClientConfig(discoveryClient, Constants.Service.METADATA_SERVICE)); metricStore = injector.getInstance(MetricStore.class);