Package org.kitesdk.data

Examples of org.kitesdk.data.DatasetNotFoundException


      Map<String, String> match = pattern.getMatch(datasetUri);
      if (match != null) {
        return Pair.of(DATASET_PATTERNS.get(pattern).getFromOptions(match), match);
      }
    }
    throw new DatasetNotFoundException("Unknown dataset URI: " + datasetUri);
  }
View Full Code Here


    Preconditions.checkArgument(DEFAULT_NAMESPACE.equals(namespace),
        "Non-default namespaces are not supported");
    Preconditions.checkNotNull(name, "Dataset name cannot be null");

    if (!exists(namespace, name)) {
      throw new DatasetNotFoundException("No such dataset: " + name);
    }
    String tableName = getTableName(name);
    String entityName = getEntityName(name);
    return new DatasetDescriptor.Builder()
        .schemaLiteral(schemaManager.getEntitySchema(tableName, entityName)
View Full Code Here

    Table table;
    try {
      table = doWithRetry(getTable);
    } catch (NoSuchObjectException e) {
      throw new DatasetNotFoundException(
          "Hive table not found: " + dbName + "." + tableName);
    } catch (MetaException e) {
      throw new DatasetNotFoundException("Hive table lookup exception", e);
    } catch (TException e) {
      throw new DatasetOperationException(
          "Exception communicating with the Hive MetaStore", e);
    }

    if (table == null) {
      throw new DatasetNotFoundException("Could not find info for table: " + tableName);
    }
    return table;
  }
View Full Code Here

    }

    try {
      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) {
View Full Code Here

        };

    try {
      doWithRetry(alter);
    } catch (NoSuchObjectException e) {
      throw new DatasetNotFoundException("Hive table not found: " +
          tbl.getDbName() + "." + tbl.getTableName());
    } catch (InvalidObjectException e) {
      throw new DatasetOperationException("Invalid table", e);
    } catch (InvalidOperationException e) {
      throw new DatasetOperationException("Invalid table change", e);
View Full Code Here

    String resolved = resolveNamespace(namespace, name);
    if (resolved != null) {
      return HiveUtils.descriptorForTable(
          conf, getMetaStoreUtil().getTable(resolved, name));
    }
    throw new DatasetNotFoundException(
        "Hive table not found: " + namespace + "." + name);
  }
View Full Code Here

      Table table = getMetaStoreUtil().getTable(resolved, name);
      HiveUtils.updateTableSchema(table, descriptor);
      getMetaStoreUtil().alterTable(table);
      return descriptor;
    }
    throw new DatasetNotFoundException(
        "Hive table not found: " + namespace + "." + name);
  }
View Full Code Here

      Map<String, DatasetDescriptor> datasets = descriptors.get(namespace);
      if (datasets.containsKey(name)) {
        return datasets.get(name);
      }
    }
    throw new DatasetNotFoundException(
        "Missing dataset:" + namespace + ":" + name);
  }
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 DatasetNotFoundException("Missing dataset:" + name);
    }

    descriptors.get(namespace).put(name, descriptor);

    return descriptor;
View Full Code Here

   * @throws org.kitesdk.data.DatasetIOException  if any IOException is thrown
   */
  private static void checkExists(FileSystem fs, Path location) {
    try {
      if (!fs.exists(location)) {
        throw new DatasetNotFoundException(
            "Descriptor location does not exist: " + location);
      }
    } catch (IOException ex) {
      throw new DatasetIOException(
          "Cannot access descriptor location: " + location, ex);
View Full Code Here

TOP

Related Classes of org.kitesdk.data.DatasetNotFoundException

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.