Package co.cask.cdap.api.dataset

Examples of co.cask.cdap.api.dataset.DatasetDefinition.configure()


      throw new InstanceConflictException("Dataset instance with name already exists: " + datasetInstanceName);
    }

    Preconditions.checkArgument(registry.hasType(datasetType), "Dataset type '%s' is not registered", datasetType);
    DatasetDefinition def = registry.get(datasetType);
    DatasetSpecification spec = def.configure(datasetInstanceName, props);
    instances.put(datasetInstanceName, spec);
    def.getAdmin(spec, null).create();
    instances.put(datasetInstanceName, spec);
    LOG.info("Created dataset {} of type {}", datasetInstanceName, datasetType);
  }
View Full Code Here


      throw new InstanceConflictException("Dataset instance with name does not exist: " + datasetInstanceName);
    }
    String datasetType = oldSpec.getType();
    Preconditions.checkArgument(registry.hasType(datasetType), "Dataset type '%s' is not registered", datasetType);
    DatasetDefinition def = registry.get(datasetType);
    DatasetSpecification spec = def.configure(datasetInstanceName, props);
    instances.put(datasetInstanceName, spec);
    def.getAdmin(spec, null).upgrade();
  }

  @Override
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.