Package org.apache.hadoop.hbase

Examples of org.apache.hadoop.hbase.NamespaceNotFoundException


    if (!isTableNamespaceManagerReady()) {
      throw new IOException("Table Namespace Manager not ready yet, try again later");
    }
    NamespaceDescriptor nsd = tableNamespaceManager.get(name);
    if (nsd == null) {
      throw new NamespaceNotFoundException(name);
    }
    return nsd;
  }
View Full Code Here


  }

  public synchronized void update(NamespaceDescriptor ns) throws IOException {
    HTable table = getNamespaceTable();
    if (get(table, ns.getName()) == null) {
      throw new NamespaceNotFoundException(ns.getName());
    }
    upsert(table, ns);
  }
View Full Code Here

    }
  }

  public synchronized void remove(String name) throws IOException {
    if (get(name) == null) {
      throw new NamespaceNotFoundException(name);
    }
    if (NamespaceDescriptor.RESERVED_NAMESPACES.contains(name)) {
      throw new ConstraintException("Reserved namespace "+name+" cannot be removed.");
    }
    int tableCount;
    try {
      tableCount = masterServices.listTableDescriptorsByNamespace(name).size();
    } catch (FileNotFoundException fnfe) {
      throw new NamespaceNotFoundException(name);
    }
    if (tableCount > 0) {
      throw new ConstraintException("Only empty namespaces can be removed. " +
          "Namespace "+name+" has "+tableCount+" tables");
    }
View Full Code Here

    if (!ready) {
      throw new IOException("Table Namespace Manager not ready yet, try again later");
    }
    NamespaceDescriptor nsd = tableNamespaceManager.get(name);
    if (nsd == null) {
      throw new NamespaceNotFoundException(name);
    }
    return nsd;
  }
View Full Code Here

  }

  public synchronized void update(NamespaceDescriptor ns) throws IOException {
    HTable table = getNamespaceTable();
    if (get(table, ns.getName()) == null) {
      throw new NamespaceNotFoundException(ns.getName());
    }
    upsert(table, ns);
  }
View Full Code Here

    }
  }

  public synchronized void remove(String name) throws IOException {
    if (get(name) == null) {
      throw new NamespaceNotFoundException(name);
    }
    if (NamespaceDescriptor.RESERVED_NAMESPACES.contains(name)) {
      throw new ConstraintException("Reserved namespace "+name+" cannot be removed.");
    }
    int tableCount;
    try {
      tableCount = masterServices.listTableDescriptorsByNamespace(name).size();
    } catch (FileNotFoundException fnfe) {
      throw new NamespaceNotFoundException(name);
    }
    if (tableCount > 0) {
      throw new ConstraintException("Only empty namespaces can be removed. " +
          "Namespace "+name+" has "+tableCount+" tables");
    }
View Full Code Here

    if (!isTableNamespaceManagerReady()) {
      throw new IOException("Table Namespace Manager not ready yet, try again later");
    }
    NamespaceDescriptor nsd = tableNamespaceManager.get(name);
    if (nsd == null) {
      throw new NamespaceNotFoundException(name);
    }
    return nsd;
  }
View Full Code Here

    if (!ready) {
      throw new IOException("Table Namespace Manager not ready yet, try again later");
    }
    NamespaceDescriptor nsd = tableNamespaceManager.get(name);
    if (nsd == null) {
      throw new NamespaceNotFoundException(name);
    }
    return nsd;
  }
View Full Code Here

    if (!ready) {
      throw new IOException("Table Namespace Manager not ready yet, try again later");
    }
    NamespaceDescriptor nsd = tableNamespaceManager.get(name);
    if (nsd == null) {
      throw new NamespaceNotFoundException(name);
    }
    return nsd;
  }
View Full Code Here

  }

  public synchronized void update(NamespaceDescriptor ns) throws IOException {
    Table table = getNamespaceTable();
    if (get(table, ns.getName()) == null) {
      throw new NamespaceNotFoundException(ns.getName());
    }
    upsert(table, ns);
  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.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.