Package org.apache.hadoop.hbase

Examples of org.apache.hadoop.hbase.NamespaceDescriptor


  @Override
  public NamespaceDescriptor getNamespaceDescriptor(String name) throws IOException {
    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


  @Override
  public NamespaceDescriptor getNamespaceDescriptor(String name) throws IOException {
    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

    boolean ready = tableNamespaceManager != null &&
        tableNamespaceManager.isTableAvailableAndInitialized();
    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

  }

  @Override
  public NamespaceDescriptor getNamespaceDescriptor(String name) throws IOException {
    checkNamespaceManagerReady();
    NamespaceDescriptor nsd = tableNamespaceManager.get(name);
    if (nsd == null) {
      throw new NamespaceNotFoundException(name);
    }
    return nsd;
  }
View Full Code Here

        try {
          for (Result result : scanner) {
            byte[] val =  CellUtil.cloneValue(result.getColumnLatestCell(
                HTableDescriptor.NAMESPACE_FAMILY_INFO_BYTES,
                HTableDescriptor.NAMESPACE_COL_DESC_BYTES));
            NamespaceDescriptor ns =
                ProtobufUtil.toNamespaceDescriptor(
                    HBaseProtos.NamespaceDescriptor.parseFrom(val));
            zkNamespaceManager.update(ns);
          }
        } finally {
View Full Code Here

  }

  @Test
  public void testGetNamespacePermission() throws Exception {
    String namespace = "testNamespace";
    NamespaceDescriptor desc = NamespaceDescriptor.create(namespace).build();
    TEST_UTIL.getMiniHBaseCluster().getMaster().createNamespace(desc);
    grantOnNamespace(TEST_UTIL, USER_NONE.getShortName(), namespace, Permission.Action.READ);
    try {
      List<UserPermission> namespacePermissions = AccessControlClient.getUserPermissions(conf,
      AccessControlLists.toNamespaceEntry(namespace));
View Full Code Here

    boolean ready = tableNamespaceManager != null &&
        tableNamespaceManager.isTableAvailableAndInitialized();
    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

        try {
          for (Result result : scanner) {
            byte[] val =  CellUtil.cloneValue(result.getColumnLatest(
                HTableDescriptor.NAMESPACE_FAMILY_INFO_BYTES,
                HTableDescriptor.NAMESPACE_COL_DESC_BYTES));
            NamespaceDescriptor ns =
                ProtobufUtil.toNamespaceDescriptor(
                    HBaseProtos.NamespaceDescriptor.parseFrom(val));
            zkNamespaceManager.update(ns);
          }
        } finally {
View Full Code Here

    boolean ready = tableNamespaceManager != null &&
        tableNamespaceManager.isTableAvailableAndInitialized();
    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

TOP

Related Classes of org.apache.hadoop.hbase.NamespaceDescriptor

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.