Examples of namespaceOperations()


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

    } catch (AccumuloSecurityException e) {
      expectPermissionDenied(e);
    }

    c.securityOperations().grantSystemPermission(u1, SystemPermission.DROP_NAMESPACE);
    user1Con.namespaceOperations().delete(n2);
    c.securityOperations().revokeSystemPermission(u1, SystemPermission.DROP_NAMESPACE);

    try {
      user1Con.namespaceOperations().setProperty(n1, Property.TABLE_FILE_MAX.getKey(), "33");
      fail();
View Full Code Here

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

    c.securityOperations().grantSystemPermission(u1, SystemPermission.DROP_NAMESPACE);
    user1Con.namespaceOperations().delete(n2);
    c.securityOperations().revokeSystemPermission(u1, SystemPermission.DROP_NAMESPACE);

    try {
      user1Con.namespaceOperations().setProperty(n1, Property.TABLE_FILE_MAX.getKey(), "33");
      fail();
    } catch (AccumuloSecurityException e) {
      expectPermissionDenied(e);
    }
View Full Code Here

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

    c.tableOperations().create(tableName);

    IteratorSetting setting = new IteratorSetting(250, iter, SimpleFilter.class.getName());
    HashSet<IteratorScope> scope = new HashSet<IteratorScope>();
    scope.add(IteratorScope.scan);
    c.namespaceOperations().attachIterator(namespace, setting, EnumSet.copyOf(scope));

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

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

    } catch (AccumuloSecurityException e) {
      expectPermissionDenied(e);
    }

    c.securityOperations().grantSystemPermission(u1, SystemPermission.ALTER_NAMESPACE);
    user1Con.namespaceOperations().setProperty(n1, Property.TABLE_FILE_MAX.getKey(), "33");
    user1Con.namespaceOperations().removeProperty(n1, Property.TABLE_FILE_MAX.getKey());
    c.securityOperations().revokeSystemPermission(u1, SystemPermission.ALTER_NAMESPACE);
  }

  @Test
View Full Code Here

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

      expectPermissionDenied(e);
    }

    c.securityOperations().grantSystemPermission(u1, SystemPermission.ALTER_NAMESPACE);
    user1Con.namespaceOperations().setProperty(n1, Property.TABLE_FILE_MAX.getKey(), "33");
    user1Con.namespaceOperations().removeProperty(n1, Property.TABLE_FILE_MAX.getKey());
    c.securityOperations().revokeSystemPermission(u1, SystemPermission.ALTER_NAMESPACE);
  }

  @Test
  public void verifySystemPropertyInheritance() throws Exception {
View Full Code Here

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

    Scanner s = c.createScanner(tableName, Authorizations.EMPTY);
    System.out.println(s.iterator().next());
    // do scanners work correctly in mock?
    // assertTrue(!s.iterator().hasNext());

    assertTrue(c.namespaceOperations().listIterators(namespace).containsKey(iter));
    c.namespaceOperations().removeIterator(namespace, iter, EnumSet.copyOf(scope));
  }

  private boolean checkTableHasProp(Connector c, String t, String propKey, String propVal) throws AccumuloException, TableNotFoundException {
    for (Entry<String,String> e : c.tableOperations().getProperties(t)) {
View Full Code Here

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

    System.out.println(s.iterator().next());
    // do scanners work correctly in mock?
    // assertTrue(!s.iterator().hasNext());

    assertTrue(c.namespaceOperations().listIterators(namespace).containsKey(iter));
    c.namespaceOperations().removeIterator(namespace, iter, EnumSet.copyOf(scope));
  }

  private boolean checkTableHasProp(Connector c, String t, String propKey, String propVal) throws AccumuloException, TableNotFoundException {
    for (Entry<String,String> e : c.tableOperations().getProperties(t)) {
      if (e.getKey().equals(propKey) && e.getValue().equals(propVal)) {
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.