Examples of Put


Examples of org.apache.hadoop.hbase.client.Put

  public void testFamilyWithAndWithoutColon() throws Exception {
    byte [] b = Bytes.toBytes(getName());
    byte [] cf = Bytes.toBytes("cf");
    initHRegion(b, getName(), cf);
    Put p = new Put(b);
    byte [] cfwithcolon = Bytes.toBytes("cf:");
    p.add(cfwithcolon, cfwithcolon, cfwithcolon);
    boolean exception = false;
    try {
      this.region.put(p);
    } catch (NoSuchColumnFamilyException e) {
      exception = true;
    }
    assertTrue(exception);
    // Can I add it using old style call?
    p = new Put(b);
    p.add(cfwithcolon, System.currentTimeMillis(), cfwithcolon);
    this.region.put(p);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.Put

   
    //Setting up region
    String method = this.getName();
    initHRegion(tableName, method, fam1);
    //Putting data in key
    Put put = new Put(row1);
    put.add(fam1, qf1, val1);

    //checkAndPut with correct value
    boolean res = region.checkAndPut(row1, fam1, qf1, emptyVal, put, lockId,
        true);
    assertTrue(res);

    // not empty anymore
    res = region.checkAndPut(row1, fam1, qf1, emptyVal, put, lockId, true);
    assertFalse(res);

    put = new Put(row1);
    put.add(fam1, qf1, val2);
    //checkAndPut with correct value
    res = region.checkAndPut(row1, fam1, qf1, val1, put, lockId, true);
    assertTrue(res);
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.Put

    //Setting up region
    String method = this.getName();
    initHRegion(tableName, method, fam1);

    //Putting data in key
    Put put = new Put(row1);
    put.add(fam1, qf1, val1);
    region.put(put);
   
    //checkAndPut with wrong value
    boolean res = region.checkAndPut(row1, fam1, qf1, val2, put, lockId, true);
    assertEquals(false, res);
View Full Code Here

Examples of org.apache.hadoop.hbase.client.Put

    //Setting up region
    String method = this.getName();
    initHRegion(tableName, method, fam1);

    //Putting data in key
    Put put = new Put(row1);
    put.add(fam1, qf1, val1);
    region.put(put);
   
    //checkAndPut with correct value
    boolean res = region.checkAndPut(row1, fam1, qf1, val1, put, lockId, true);
    assertEquals(true, res);
View Full Code Here

Examples of org.apache.hadoop.hbase.client.Put

    //Setting up region
    String method = this.getName();
    initHRegion(tableName, method, families);

    //Putting data in the key to check
    Put put = new Put(row1);
    put.add(fam1, qf1, val1);
    region.put(put);
   
    //Creating put to add
    long ts = System.currentTimeMillis();
    KeyValue kv = new KeyValue(row1, fam2, qf1, ts, KeyValue.Type.Put, val2);
    put = new Put(row1);
    put.add(kv);
   
    //checkAndPut with wrong value
    Store store = region.getStore(fam1);
    store.memstore.kvset.size();
   
View Full Code Here

Examples of org.apache.hadoop.hbase.client.Put

    byte [] serverinfo = Bytes.toBytes("serverinfo");
    byte [] splitA = Bytes.toBytes("splitA");
    byte [] splitB = Bytes.toBytes("splitB");

    // add some data:
    Put put = new Put(row);
    put.add(fam, splitA, Bytes.toBytes("reference_A"));
    region.put(put);

    put = new Put(row);
    put.add(fam, splitB, Bytes.toBytes("reference_B"));
    region.put(put);

    put = new Put(row);
    put.add(fam, serverinfo, Bytes.toBytes("ip_address"));
    region.put(put);

    // ok now delete a split:
    Delete delete = new Delete(row);
    delete.deleteColumns(fam, splitA);
View Full Code Here

Examples of org.apache.hadoop.hbase.client.Put

    byte [] row = Bytes.toBytes("table_name");
    // column names
    byte [] serverinfo = Bytes.toBytes("serverinfo");

    // add data in the far future
    Put put = new Put(row);
    put.add(fam, serverinfo, HConstants.LATEST_TIMESTAMP-5,Bytes.toBytes("value"));
    region.put(put);

    // now delete something in the present
    Delete delete = new Delete(row);
    region.delete(delete, null, true);
View Full Code Here

Examples of org.apache.xindice.webadmin.webdav.components.Put

public class PutTest extends MethodSetup {

    public void setUp() throws Exception {
        super.setUp();
        method = new Put();
    }
View Full Code Here

Examples of org.cruxframework.crux.core.shared.rest.annotation.PUT

      return methodInfo;
    }
 
  private StateValidationModel getStateValidationModel(JMethod method)
    {
    PUT put = method.getAnnotation(PUT.class);
    if (put != null)
    {
      return put.validatePreviousState();
    }
    POST post = method.getAnnotation(POST.class);
    if (post != null)
    {
      return post.validatePreviousState();
View Full Code Here

Examples of org.iosgi.outpost.operations.Put

  public void put(InputStream is, File to) throws InterruptedException,
      OperationExecutionException {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    Streams.drain(is, baos);
    Put p = new Put(to, baos.toByteArray());
    perform(p);
  }
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.