Examples of PutRequest


Examples of com.hazelcast.multimap.operations.client.PutRequest

    }

    public boolean put(K key, V value) {
        Data keyData = toData(key);
        Data valueData = toData(value);
        PutRequest request = new PutRequest(name, keyData, valueData, -1, ThreadUtil.getThreadId());
        Boolean result = invoke(request, keyData);
        return result;
    }
View Full Code Here

Examples of com.opengamma.engine.cache.msg.PutRequest

    return result;
  }

  @Override
  public void put(long identifier, FudgeMsg data) {
    final PutRequest request = new PutRequest(getCacheKey().getViewCycleId(), getCacheKey()
        .getCalculationConfigurationName(), Collections.singleton(identifier),
        Collections.singleton(data));
    getRemoteCacheClient().sendPutMessage(request, CacheMessage.class);
  }
View Full Code Here

Examples of org.hbase.async.PutRequest

            break;
          default:
            rowKey = SimpleRowKeyGenerator.getUUIDKey(rowPrefix);
            break;
        }
        PutRequest putRequest =  new PutRequest(table, rowKey, cf,
            payloadColumn, payload);
        actions.add(putRequest);
      } catch (Exception e){
        throw new FlumeException("Could not get row key!", e);
      }
View Full Code Here

Examples of org.hbase.async.PutRequest

      super(conf, options, status);
    }

    @Override
    void testRow(final int i) {
      final PutRequest put = new PutRequest(tableName, getRandomRow(this.rand, this.totalRows),
                                            FAMILY_NAME, QUALIFIER_NAME, generateValue(this.rand));
      put.setDurable(writeToWAL);
      put.setBufferable(flushCommits);
      client().put(put).addCallbacks(callback, errback);
    }
View Full Code Here

Examples of org.hbase.async.PutRequest

      super(conf, options, status);
    }

    @Override
    void testRow(final int i) {
      final PutRequest put = new PutRequest(tableName, format(i),
                                            FAMILY_NAME, QUALIFIER_NAME, generateValue(this.rand));
      put.setDurable(writeToWAL);
      put.setBufferable(flushCommits);
      client().put(put).addCallbacks(callback, errback);
    }
View Full Code Here

Examples of org.hbase.async.PutRequest

            break;
          default:
            rowKey = SimpleRowKeyGenerator.getUUIDKey(rowPrefix);
            break;
        }
        PutRequest putRequest =  new PutRequest(table, rowKey, cf,
            payloadColumn, payload);
        actions.add(putRequest);
      } catch (Exception e){
        throw new FlumeException("Could not get row key!", e);
      }
View Full Code Here

Examples of org.hbase.async.PutRequest

      if (args[1].charAt(0) == 'l') {  // locked version of the command
        final RowLockRequest rlr = new RowLockRequest(args[2], args[3]);
        lock = client.lockRow(rlr).joinUninterruptibly();
        LOG.info("Acquired explicit row lock: " + lock);
      }
      final PutRequest put = lock == null
        ? new PutRequest(args[2], args[3], args[4], args[5], args[7])
        : new PutRequest(args[2], args[3], args[4], args[5], args[7], lock);
      final String expected = args[6];
      args = null;
      try {
        final boolean ok = client.compareAndSet(put, expected).joinUninterruptibly();
        LOG.info("CAS "
View Full Code Here

Examples of org.hbase.async.PutRequest

  /** Write a single thing to HBase and read it back. */
  @Test
  public void putRead() throws Exception {
    client.setFlushInterval(FAST_FLUSH);
    final double write_time = System.currentTimeMillis();
    final PutRequest put = new PutRequest(table, "k", family, "q", "val");
    final GetRequest get = new GetRequest(table, "k", family, "q");
    client.put(put).join();
    final ArrayList<KeyValue> kvs = client.get(get).join();
    assertSizeIs(1, kvs);
    final KeyValue kv = kvs.get(0);
View Full Code Here

Examples of org.hbase.async.PutRequest

  /** Write a single thing to HBase and read it back, delete it, read it. */
  @Test
  public void putReadDeleteRead() throws Exception {
    client.setFlushInterval(FAST_FLUSH);
    final PutRequest put = new PutRequest(table, "k", family, "q", "val");
    final GetRequest get = new GetRequest(table, "k", family, "q");
    client.put(put).join();
    final ArrayList<KeyValue> kvs = client.get(get).join();
    assertSizeIs(1, kvs);
    assertEq("val", kvs.get(0).value());
View Full Code Here

Examples of org.hbase.async.PutRequest

    // Make the qualifier unique to avoid running into HBASE-9879.
    byte[] q = ("q" + System.currentTimeMillis()
                + "-" + System.nanoTime()).getBytes();
    byte[] v1 = "val1".getBytes();
    byte[] v2 = "val2".getBytes();
    final PutRequest put1 = new PutRequest(t, k, f, q, v1, 100L);
    final PutRequest put2 = new PutRequest(t, k, f, q, v2, 200L);
    client.put(put1).join();
    client.put(put2).join();
    final GetRequest get = new GetRequest(t, k, f, q).maxVersions(2);
    final ArrayList<KeyValue> kvs = client.get(get).join();
    assertSizeIs(2, kvs);
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.