Examples of namespaceOperations()


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

    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));
  }

  /**
   * This test creates a namespace, modifies it's properties, and checks to make sure that those properties are applied to its tables. To do something on a
View Full Code Here

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

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

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

  /**
   * This test creates a namespace, modifies it's properties, and checks to make sure that those properties are applied to its tables. To do something on a
   * namespace-wide level, use {@link NamespaceOperations}.
View Full Code Here

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

    String propVal = "42K";

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

    c.namespaceOperations().create(namespace);
    c.tableOperations().create(tableName1);
    c.namespaceOperations().setProperty(namespace, propKey, propVal);

    // check the namespace has the property
    assertTrue(checkNamespaceHasProp(c, namespace, propKey, propVal));
View Full Code Here

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

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

    c.namespaceOperations().create(namespace);
    c.tableOperations().create(tableName1);
    c.namespaceOperations().setProperty(namespace, propKey, propVal);

    // check the namespace has the property
    assertTrue(checkNamespaceHasProp(c, namespace, propKey, propVal));

    // check that the table gets it from the namespace
View Full Code Here

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

    String propKey2 = Property.TABLE_FILE_MAX.getKey();
    String propVal2 = "42";
    String tablePropVal = "13";

    c.tableOperations().setProperty(tableName2, propKey2, tablePropVal);
    c.namespaceOperations().setProperty("propchange", propKey2, propVal2);

    assertTrue(checkTableHasProp(c, tableName2, propKey2, tablePropVal));

    // now check that you can change the default namespace's properties
    propVal = "13K";
View Full Code Here

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

    // now check that you can change the default namespace's properties
    propVal = "13K";
    String tableName = "some_table";
    c.tableOperations().create(tableName);
    c.namespaceOperations().setProperty(Namespaces.DEFAULT_NAMESPACE, propKey, propVal);

    assertTrue(checkTableHasProp(c, tableName, propKey, propVal));

    // test the properties server-side by configuring an iterator.
    // should not show anything with column-family = 'a'
View Full Code Here

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

    // should not show anything with column-family = 'a'
    String tableName3 = namespace + ".table3";
    c.tableOperations().create(tableName3);

    IteratorSetting setting = new IteratorSetting(250, "thing", SimpleFilter.class.getName());
    c.namespaceOperations().attachIterator(namespace, setting);

    BatchWriter bw = c.createBatchWriter(tableName3, new BatchWriterConfig());
    Mutation m = new Mutation("r");
    m.put("a", "b", new Value("abcde".getBytes()));
    bw.addMutation(m);
View Full Code Here

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

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

    c.tableOperations().create(tableName);
    c.namespaceOperations().create(namespace1);
    c.namespaceOperations().create(namespace2);

    c.tableOperations().rename(tableName, tableName1);

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

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

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

    c.tableOperations().create(tableName);
    c.namespaceOperations().create(namespace1);
    c.namespaceOperations().create(namespace2);

    c.tableOperations().rename(tableName, tableName1);

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

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

    user1Con.tableOperations().setProperty(t3, Property.TABLE_FILE_MAX.getKey(), "42");
    user1Con.tableOperations().removeProperty(t3, Property.TABLE_FILE_MAX.getKey());
    c.securityOperations().revokeNamespacePermission(u1, n1, NamespacePermission.ALTER_TABLE);

    try {
      user1Con.namespaceOperations().setProperty(n1, Property.TABLE_FILE_MAX.getKey(), "55");
      fail();
    } catch (AccumuloSecurityException e) {
      expectPermissionDenied(e);
    }
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.