Examples of namespaceOperations()


Examples of org.apache.accumulo.core.client.Connector.namespaceOperations()

    List<String> namespaces = (List<String>) state.get("namespaces");

    String namespace = namespaces.get(rand.nextInt(namespaces.size()));

    try {
      conn.namespaceOperations().delete(namespace);
      log.debug("Deleted namespace " + namespace);
    } catch (NamespaceNotFoundException e) {
      log.debug("Delete namespace " + namespace + " failed, doesnt exist");
    } catch (NamespaceNotEmptyException e) {
      log.debug("Delete namespace " + namespace + " failed, not empty");
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.namespaceOperations()

    String srcName = namespaces.get(rand.nextInt(namespaces.size()));
    String newName = namespaces.get(rand.nextInt(namespaces.size()));

    try {
      conn.namespaceOperations().rename(srcName, newName);
      log.debug("Renamed namespace " + srcName + " " + newName);
    } catch (NamespaceExistsException e) {
      log.debug("Rename namespace " + srcName + " failed, " + newName + " exists");
    } catch (NamespaceNotFoundException e) {
      log.debug("Rename namespace " + srcName + " failed, doesn't exist");
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.namespaceOperations()

   
    if (WalkingSecurity.get(state).getNamespaceExists()) {
      String secNamespaceName = WalkingSecurity.get(state).getNamespaceName();
      log.debug("Dropping namespace: " + secNamespaceName);
     
      conn.namespaceOperations().delete(secNamespaceName);
    }
   
    if (WalkingSecurity.get(state).userExists(WalkingSecurity.get(state).getTabUserName())) {
      String tableUserName = WalkingSecurity.get(state).getTabUserName();
      log.debug("Dropping user: " + tableUserName);
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.namespaceOperations()

    List<String> namespaces = (List<String>) state.get("namespaces");

    String namespace = namespaces.get(rand.nextInt(namespaces.size()));

    try {
      conn.namespaceOperations().create(namespace);
      log.debug("Created namespace " + namespace);
    } catch (NamespaceExistsException e) {
      log.debug("Create namespace " + namespace + " failed, it exists");
    }
  }
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.namespaceOperations()

  public void testDefaultNamespace() throws Exception {
    String tableName = "test";
    Instance instance = new MockInstance("default");
    Connector c = instance.getConnector("user", new PasswordToken("pass"));

    assertTrue(c.namespaceOperations().exists(Namespaces.DEFAULT_NAMESPACE));
    c.tableOperations().create(tableName);
    assertTrue(c.tableOperations().exists(tableName));
  }

  /**
 
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.namespaceOperations()

    String tableName2 = namespace + ".table2";

    Instance instance = new MockInstance("createdelete");
    Connector c = instance.getConnector("user", new PasswordToken("pass"));

    c.namespaceOperations().create(namespace);
    assertTrue(c.namespaceOperations().exists(namespace));

    c.tableOperations().create(tableName1);
    assertTrue(c.tableOperations().exists(tableName1));
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.namespaceOperations()

    Instance instance = new MockInstance("createdelete");
    Connector c = instance.getConnector("user", new PasswordToken("pass"));

    c.namespaceOperations().create(namespace);
    assertTrue(c.namespaceOperations().exists(namespace));

    c.tableOperations().create(tableName1);
    assertTrue(c.tableOperations().exists(tableName1));

    c.tableOperations().create(tableName2);
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.namespaceOperations()

    assertTrue(c.tableOperations().exists(tableName2));

    // deleting
    try {
      // can't delete a namespace with tables in it
      c.namespaceOperations().delete(namespace);
      fail();
    } catch (NamespaceNotEmptyException e) {
      // ignore, supposed to happen
    }
    assertTrue(c.namespaceOperations().exists(namespace));
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.namespaceOperations()

      c.namespaceOperations().delete(namespace);
      fail();
    } catch (NamespaceNotEmptyException e) {
      // ignore, supposed to happen
    }
    assertTrue(c.namespaceOperations().exists(namespace));
    assertTrue(c.tableOperations().exists(tableName1));
    assertTrue(c.tableOperations().exists(tableName2));

    c.tableOperations().delete(tableName2);
    assertTrue(!c.tableOperations().exists(tableName2));
View Full Code Here

Examples of org.apache.accumulo.core.client.Connector.namespaceOperations()

    assertTrue(c.tableOperations().exists(tableName1));
    assertTrue(c.tableOperations().exists(tableName2));

    c.tableOperations().delete(tableName2);
    assertTrue(!c.tableOperations().exists(tableName2));
    assertTrue(c.namespaceOperations().exists(namespace));

    c.tableOperations().delete(tableName1);
    assertTrue(!c.tableOperations().exists(tableName1));
    c.namespaceOperations().delete(namespace);
    assertTrue(!c.namespaceOperations().exists(namespace));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.