Package org.apache.accumulo.server.constraints

Examples of org.apache.accumulo.server.constraints.MetadataConstraints.check()


    assertEquals(Short.valueOf((short) 4), violations.get(0));
   
    m = new Mutation(new Text("0;foo"));
    m.put(new Text("bad_column_name"), new Text(""), new Value("e".getBytes()));
   
    violations = mc.check(null, m);
   
    assertNotNull(violations);
    assertEquals(1, violations.size());
    assertEquals(Short.valueOf((short) 2), violations.get(0));
   
View Full Code Here


    assertEquals(Short.valueOf((short) 2), violations.get(0));
   
    m = new Mutation(new Text("!!<"));
    TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.put(m, new Value("1poo".getBytes()));
   
    violations = mc.check(null, m);
   
    assertNotNull(violations);
    assertEquals(2, violations.size());
    assertEquals(Short.valueOf((short) 4), violations.get(0));
    assertEquals(Short.valueOf((short) 5), violations.get(1));
View Full Code Here

    assertEquals(Short.valueOf((short) 5), violations.get(1));
   
    m = new Mutation(new Text("0;foo"));
    TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.put(m, new Value("".getBytes()));
   
    violations = mc.check(null, m);
   
    assertNotNull(violations);
    assertEquals(1, violations.size());
    assertEquals(Short.valueOf((short) 6), violations.get(0));
   
View Full Code Here

    assertEquals(Short.valueOf((short) 6), violations.get(0));
   
    m = new Mutation(new Text("0;foo"));
    TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.put(m, new Value("bar".getBytes()));
   
    violations = mc.check(null, m);
   
    assertEquals(null, violations);
   
    m = new Mutation(new Text("!0<"));
    TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.put(m, new Value("bar".getBytes()));
View Full Code Here

    assertEquals(null, violations);
   
    m = new Mutation(new Text("!0<"));
    TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.put(m, new Value("bar".getBytes()));
   
    violations = mc.check(null, m);
   
    assertEquals(null, violations);
   
    m = new Mutation(new Text("!1<"));
    TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.put(m, new Value("bar".getBytes()));
View Full Code Here

    assertEquals(null, violations);
   
    m = new Mutation(new Text("!1<"));
    TabletsSection.TabletColumnFamily.PREV_ROW_COLUMN.put(m, new Value("bar".getBytes()));
   
    violations = mc.check(null, m);
   
    assertNotNull(violations);
    assertEquals(1, violations.size());
    assertEquals(Short.valueOf((short) 4), violations.get(0));
   
View Full Code Here

   
    // inactive txid
    m = new Mutation(new Text("0;foo"));
    m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile"), new Value("12345".getBytes()));
    m.put(DataFileColumnFamily.NAME, new Text("/someFile"), new Value("1,1".getBytes()));
    violations = mc.check(null, m);
    assertNotNull(violations);
    assertEquals(1, violations.size());
    assertEquals(Short.valueOf((short) 8), violations.get(0));
   
    // txid that throws exception
View Full Code Here

   
    // txid that throws exception
    m = new Mutation(new Text("0;foo"));
    m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile"), new Value("9".getBytes()));
    m.put(DataFileColumnFamily.NAME, new Text("/someFile"), new Value("1,1".getBytes()));
    violations = mc.check(null, m);
    assertNotNull(violations);
    assertEquals(1, violations.size());
    assertEquals(Short.valueOf((short) 8), violations.get(0));
   
    // active txid w/ file
View Full Code Here

   
    // active txid w/ file
    m = new Mutation(new Text("0;foo"));
    m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile"), new Value("5".getBytes()));
    m.put(DataFileColumnFamily.NAME, new Text("/someFile"), new Value("1,1".getBytes()));
    violations = mc.check(null, m);
    assertNull(violations);
   
    // active txid w/o file
    m = new Mutation(new Text("0;foo"));
    m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile"), new Value("5".getBytes()));
View Full Code Here

    assertNull(violations);
   
    // active txid w/o file
    m = new Mutation(new Text("0;foo"));
    m.put(TabletsSection.BulkFileColumnFamily.NAME, new Text("/someFile"), new Value("5".getBytes()));
    violations = mc.check(null, m);
    assertNotNull(violations);
    assertEquals(1, violations.size());
    assertEquals(Short.valueOf((short) 8), violations.get(0));
   
    // two active txids w/ files
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.