Package org.apache.accumulo.core.client

Examples of org.apache.accumulo.core.client.NamespaceNotFoundException


        }
      }).entrySet();
    } catch (ThriftTableOperationException e) {
      switch (e.getType()) {
        case NAMESPACE_NOTFOUND:
          throw new NamespaceNotFoundException(e);
        case OTHER:
        default:
          throw new AccumuloException(e.description, e);
      }
    } catch (AccumuloException e) {
View Full Code Here


        }
      });
    } catch (ThriftTableOperationException e) {
      switch (e.getType()) {
        case NAMESPACE_NOTFOUND:
          throw new NamespaceNotFoundException(e);
        default:
          throw new AccumuloException(e.description, e);
      }
    } catch (ThriftSecurityException e) {
      throw new AccumuloSecurityException(e.user, e.code, e);
View Full Code Here

  @Override
  public Iterable<Entry<String,String>> getProperties(String tableName) throws TableNotFoundException {
    String namespace = Tables.qualify(tableName).getFirst();
    if (!exists(tableName)) {
      if (!namespaceExists(namespace))
        throw new TableNotFoundException(tableName, new NamespaceNotFoundException(null, namespace, null));
      throw new TableNotFoundException(null, tableName, null);
    }

    Set<Entry<String,String>> props = new HashSet<Entry<String,String>>(acu.namespaces.get(namespace).settings.entrySet());
View Full Code Here

  }

  public static String getNamespaceId(Instance instance, String namespace) throws NamespaceNotFoundException {
    String id = getNameToIdMap(instance).get(namespace);
    if (id == null)
      throw new NamespaceNotFoundException(null, namespace, "getNamespaceId() failed to find namespace");
    return id;
  }
View Full Code Here

  }

  public static String getNamespaceName(Instance instance, String namespaceId) throws NamespaceNotFoundException {
    String namespaceName = getIdToNameMap(instance).get(namespaceId);
    if (namespaceName == null)
      throw new NamespaceNotFoundException(namespaceId, null, "getNamespaceName() failed to find namespace");
    return namespaceName;
  }
View Full Code Here

      } catch (AccumuloException e) {
        throw e;
      } catch (ThriftTableOperationException e) {
        switch (e.getType()) {
          case NAMESPACE_NOTFOUND:
            throw new TableNotFoundException(e.getTableName(), new NamespaceNotFoundException(e));
          case NOTFOUND:
            throw new TableNotFoundException(e);
          default:
            throw new AccumuloException(e);
        }
View Full Code Here

      } catch (AccumuloException e) {
        throw e;
      } catch (ThriftTableOperationException e) {
        switch (e.getType()) {
          case NAMESPACE_NOTFOUND:
            throw new TableNotFoundException(e.getTableName(), new NamespaceNotFoundException(e));
          case NOTFOUND:
            throw new TableNotFoundException(e);
          default:
            throw new AccumuloException(e);
        }
View Full Code Here

      if (tableId == null) {
        String namespace = qualify(tableName).getFirst();
        if (Namespaces.getNameToIdMap(instance).containsKey(namespace))
          throw new TableNotFoundException(null, tableName, null);
        else
          throw new NamespaceNotFoundException(null, namespace, null);
      }
    }
    return tableId;
  }
View Full Code Here

  @Override
  public void rename(String oldNamespaceName, String newNamespaceName) throws AccumuloSecurityException, NamespaceNotFoundException, AccumuloException,
      NamespaceExistsException {
    if (!exists(oldNamespaceName))
      throw new NamespaceNotFoundException(oldNamespaceName, oldNamespaceName, "");
    if (exists(newNamespaceName))
      throw new NamespaceExistsException(newNamespaceName, newNamespaceName, "");

    MockNamespace n = acu.namespaces.get(oldNamespaceName);
    for (String t : n.getTables(acu)) {
View Full Code Here

  }

  @Override
  public Iterable<Entry<String,String>> getProperties(String namespace) throws NamespaceNotFoundException {
    if (!exists(namespace)) {
      throw new NamespaceNotFoundException(namespace, namespace, "");
    }

    return acu.namespaces.get(namespace).settings.entrySet();
  }
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.client.NamespaceNotFoundException

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.