Package org.kitesdk.data

Examples of org.kitesdk.data.DatasetExistsException


    URI location = descriptor.getLocation();
    String resolved = resolveNamespace(namespace, name, location);
    if (resolved != null) {
      if (resolved.equals(namespace)) {
        // the requested dataset already exists
        throw new DatasetExistsException(
            "Metadata already exists for dataset: " + namespace + "." + name);
      } else {
        DatasetDescriptor loaded = load(resolved, name);
        // replacing old default.name table
        LOG.warn("Creating table managed table {}.{}: replaces default.{}",
View Full Code Here


    String resolved = resolveNamespace(
        namespace, name, descriptor.getLocation());
    if (resolved != null) {
      if (resolved.equals(namespace)) {
        // the requested dataset already exists
        throw new DatasetExistsException(
            "Metadata already exists for dataset: " + namespace + "." + name);
      } else {
        // replacing old default.name table
        LOG.warn("Creating table {}.{} for {}: replaces default.{}",
            new Object[]{
View Full Code Here

        };

    try {
      doWithRetry(create);
    } catch (AlreadyExistsException e) {
      throw new DatasetExistsException(
          "Hive database already exists: " + dbName, e);
    } catch (InvalidObjectException e) {
      throw new DatasetOperationException("Invalid database: " + dbName, e);
    } catch (MetaException e) {
      throw new DatasetOperationException("Hive MetaStore exception", e);
View Full Code Here

      doWithRetry(create);
    } catch (NoSuchObjectException e) {
      throw new DatasetNotFoundException("Hive table not found: " +
          tbl.getDbName() + "." + tbl.getTableName());
    } catch (AlreadyExistsException e) {
      throw new DatasetExistsException("Hive table already exists: " +
          tbl.getDbName() + "." + tbl.getTableName(), e);
    } catch (InvalidObjectException e) {
      throw new DatasetOperationException("Invalid table", e);
    } catch (MetaException e) {
      throw new DatasetOperationException("Hive MetaStore exception", e);
View Full Code Here

    Preconditions.checkNotNull(namespace, "Namespace cannot be null");
    Preconditions.checkNotNull(name, "Name cannot be null");
    Preconditions.checkNotNull(descriptor, "Descriptor cannot be null");

    if (exists(namespace, name)) {
      throw new DatasetExistsException(
          "Dataset already exists for name:" + name);
    }

    DatasetDescriptor newDescriptor;
    if (descriptor.getLocation() == null) {
View Full Code Here

    // no need to check backward-compatibility when creating new datasets
    Path metadataLocation = pathForMetadata(namespace, name);

    try {
      if (rootFileSystem.exists(metadataLocation)) {
        throw new DatasetExistsException(
            "Descriptor directory already exists: " + metadataLocation);
      }
      // create the directory so that update can do the rest of the work
      rootFileSystem.mkdirs(metadataLocation);
    } catch (IOException e) {
View Full Code Here

TOP

Related Classes of org.kitesdk.data.DatasetExistsException

Copyright © 2018 www.massapicom. 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.