public boolean createOrUpdateDataset(NamespaceService userNamespaceService, ManagedStoragePlugin plugin, NamespaceKey source, final NamespaceKey datasetPath, final DatasetConfig datasetConfig, NamespaceAttribute... attributes) throws NamespaceException { if (!isFSBasedDataset(datasetConfig)) { return userNamespaceService.tryCreatePhysicalDataset(datasetPath, datasetConfig, attributes); return userNamespaceService.tryCreatePhysicalDataset(datasetPath, datasetConfig, attributes); datasetConfig, false); if (datasetAccessor == null) { return userNamespaceService.tryCreatePhysicalDataset(datasetPath, datasetConfig, attributes); if (datasetAccessor == null) { return userNamespaceService.tryCreatePhysicalDataset(datasetPath, datasetConfig, attributes);
public void addPhysicalDataset(final DatasetPath path, final DatasetType type) throws Exception { NamespaceKey datasetPath = path.toNamespaceKey(); final DatasetConfig datasetConfig = new DatasetConfig(); datasetConfig.setName(datasetPath.getName()); datasetConfig.setType(type); datasetConfig.setPhysicalDataset(new PhysicalDataset()); getNamespaceService().tryCreatePhysicalDataset(datasetPath, datasetConfig); }
public void addPhysicalDataset(final DatasetPath path, final DatasetType type) throws Exception { NamespaceKey datasetPath = path.toNamespaceKey(); final DatasetConfig datasetConfig = new DatasetConfig(); datasetConfig.setName(datasetPath.getName()); datasetConfig.setType(type); datasetConfig.setPhysicalDataset(new PhysicalDataset()); getNamespaceService().tryCreatePhysicalDataset(datasetPath, datasetConfig); }
public static void addPhysicalDS(NamespaceService ns, String filePath, DatasetType type, byte[] datasetSchema) throws Exception { NamespaceKey datasetPath = new NamespaceKey(PathUtils.parseFullPath(filePath)); final DatasetConfig datasetConfig = new DatasetConfig(); datasetConfig.setName(datasetPath.getName()); datasetConfig.setType(type); final PhysicalDataset physicalDataset = new PhysicalDataset(); if (datasetSchema != null) { datasetConfig.setRecordSchema(io.protostuff.ByteString.copyFrom(datasetSchema)); } datasetConfig.setSchemaVersion(DatasetHelper.CURRENT_VERSION); datasetConfig.setPhysicalDataset(physicalDataset); ns.tryCreatePhysicalDataset(datasetPath, datasetConfig); }