Package org.apache.accumulo.core.client

Examples of org.apache.accumulo.core.client.BatchWriter.addMutation()


    getConnector().tableOperations().removeConstraint("ct", 1);
    UtilWaitThread.sleep(1000);
   
    // now should be able to add a non numeric value
    bw = getConnector().createBatchWriter("ct", new BatchWriterConfig());
    bw.addMutation(mut2);
    bw.close();
   
    // verify mutation went through
    iter = scanner.iterator();
    entry = iter.next();
View Full Code Here


    bw = getConnector().createBatchWriter("ct", new BatchWriterConfig());
   
    Mutation mut3 = new Mutation(new Text("r1"));
    mut3.put(new Text("cf1"), new Text("cq1"), new Value("foo".getBytes(Constants.UTF8)));
   
    bw.addMutation(mut3);
   
    sawMRE = false;
   
    try {
      bw.close();
View Full Code Here

    getConnector().tableOperations().removeProperty("ct", Property.TABLE_CONSTRAINT_PREFIX + "1");
    UtilWaitThread.sleep(1000);
   
    // try the mutation again
    bw = getConnector().createBatchWriter("ct", new BatchWriterConfig());
    bw.addMutation(mut3);
    bw.close();
   
    // verify it went through
    iter = scanner.iterator();
    entry = iter.next();
View Full Code Here

    // test sending multiple mutations with multiple constrain violations... all of the non violating mutations
    // should go through
    int numericErrors = 2;
   
    BatchWriter bw = getConnector().createBatchWriter(table, new BatchWriterConfig());
    bw.addMutation(newMut("r1", "cf1", "cq1", "123"));
    bw.addMutation(newMut("r1", "cf1", "cq2", "I'm a bad value"));
    if (doFlush) {
      try {
        bw.flush();
        throw new Exception("Didn't find a bad mutation");
View Full Code Here

    // should go through
    int numericErrors = 2;
   
    BatchWriter bw = getConnector().createBatchWriter(table, new BatchWriterConfig());
    bw.addMutation(newMut("r1", "cf1", "cq1", "123"));
    bw.addMutation(newMut("r1", "cf1", "cq2", "I'm a bad value"));
    if (doFlush) {
      try {
        bw.flush();
        throw new Exception("Didn't find a bad mutation");
      } catch (MutationsRejectedException mre) {
View Full Code Here

        }
        bw = getConnector().createBatchWriter(table, new BatchWriterConfig());
        numericErrors = 1;
      }
    }
    bw.addMutation(newMut("r1", "cf1", "cq3", "I'm a naughty value"));
    bw.addMutation(newMut("@bad row@", "cf1", "cq2", "456"));
    bw.addMutation(newMut("r1", "cf1", "cq4", "789"));
   
    boolean sawMRE = false;
   
View Full Code Here

        bw = getConnector().createBatchWriter(table, new BatchWriterConfig());
        numericErrors = 1;
      }
    }
    bw.addMutation(newMut("r1", "cf1", "cq3", "I'm a naughty value"));
    bw.addMutation(newMut("@bad row@", "cf1", "cq2", "456"));
    bw.addMutation(newMut("r1", "cf1", "cq4", "789"));
   
    boolean sawMRE = false;
   
    try {
View Full Code Here

        numericErrors = 1;
      }
    }
    bw.addMutation(newMut("r1", "cf1", "cq3", "I'm a naughty value"));
    bw.addMutation(newMut("@bad row@", "cf1", "cq2", "456"));
    bw.addMutation(newMut("r1", "cf1", "cq4", "789"));
   
    boolean sawMRE = false;
   
    try {
      bw.close();
View Full Code Here

   
    Mutation m2 = new Mutation("008");
    m2.put("data", "x", "3");
    m2.put("data", "y", "4");
   
    bw.addMutation(m1);
    bw.addMutation(m2);
   
    bw.flush();
   
    Map<String,String> props = new HashMap<String,String>();
View Full Code Here

    Mutation m2 = new Mutation("008");
    m2.put("data", "x", "3");
    m2.put("data", "y", "4");
   
    bw.addMutation(m1);
    bw.addMutation(m2);
   
    bw.flush();
   
    Map<String,String> props = new HashMap<String,String>();
    props.put(Property.TABLE_FILE_COMPRESSED_BLOCK_SIZE.getKey(), "500K");
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.