Examples of addImmutable()


Examples of org.apache.hadoop.hbase.client.Put.addImmutable()

    upsert(table, ns);
  }

  private void upsert(Table table, NamespaceDescriptor ns) throws IOException {
    Put p = new Put(Bytes.toBytes(ns.getName()));
    p.addImmutable(HTableDescriptor.NAMESPACE_FAMILY_INFO_BYTES,
        HTableDescriptor.NAMESPACE_COL_DESC_BYTES,
        ProtobufUtil.toProtoNamespaceDescriptor(ns).toByteArray());
    table.put(p);
    try {
      zkNamespaceManager.update(ns);
View Full Code Here

Examples of org.apache.hadoop.hbase.client.Put.addImmutable()

    HRegionInfo hriAcl = new HRegionInfo(aclTable.getTableName(), null, null);
    HRegion region = HRegion.createHRegion(hriAcl, rootDir, conf, aclTable);
    try {
      // Create rows
      Put p = new Put(Bytes.toBytes("-ROOT-"));
      p.addImmutable(FAMILY, QUALIFIER, VALUE);
      region.put(p);
      p = new Put(Bytes.toBytes(".META."));
      p.addImmutable(FAMILY, QUALIFIER, VALUE);
      region.put(p);
      p = new Put(Bytes.toBytes("_acl_"));
View Full Code Here

Examples of org.apache.hadoop.hbase.client.Put.addImmutable()

      // Create rows
      Put p = new Put(Bytes.toBytes("-ROOT-"));
      p.addImmutable(FAMILY, QUALIFIER, VALUE);
      region.put(p);
      p = new Put(Bytes.toBytes(".META."));
      p.addImmutable(FAMILY, QUALIFIER, VALUE);
      region.put(p);
      p = new Put(Bytes.toBytes("_acl_"));
      p.addImmutable(FAMILY, QUALIFIER, VALUE);
      region.put(p);
View Full Code Here

Examples of org.apache.hadoop.hbase.client.Put.addImmutable()

      region.put(p);
      p = new Put(Bytes.toBytes(".META."));
      p.addImmutable(FAMILY, QUALIFIER, VALUE);
      region.put(p);
      p = new Put(Bytes.toBytes("_acl_"));
      p.addImmutable(FAMILY, QUALIFIER, VALUE);
      region.put(p);

      NamespaceUpgrade upgrade = new NamespaceUpgrade();
      upgrade.updateAcls(region);
View Full Code Here

Examples of org.apache.hadoop.hbase.client.Put.addImmutable()

    try {
      HRegionInfo copyOfMerged = new HRegionInfo(mergedRegion);

      // Put for parent
      Put putOfMerged = makePutFromRegionInfo(copyOfMerged);
      putOfMerged.addImmutable(HConstants.CATALOG_FAMILY, HConstants.MERGEA_QUALIFIER,
        regionA.toByteArray());
      putOfMerged.addImmutable(HConstants.CATALOG_FAMILY, HConstants.MERGEB_QUALIFIER,
        regionB.toByteArray());

      // Deletes for merging regions
View Full Code Here

Examples of org.apache.hadoop.hbase.client.Put.addImmutable()

      // Put for parent
      Put putOfMerged = makePutFromRegionInfo(copyOfMerged);
      putOfMerged.addImmutable(HConstants.CATALOG_FAMILY, HConstants.MERGEA_QUALIFIER,
        regionA.toByteArray());
      putOfMerged.addImmutable(HConstants.CATALOG_FAMILY, HConstants.MERGEB_QUALIFIER,
        regionB.toByteArray());

      // Deletes for merging regions
      Delete deleteA = makeDeleteFromRegionInfo(regionA);
      Delete deleteB = makeDeleteFromRegionInfo(regionB);
View Full Code Here

Examples of org.apache.hadoop.hbase.client.Put.addImmutable()

          } else {
            if(famAndQf.length == 1) {
              LOG.warn("No column qualifier specified. Delete is the only mutation supported "
                  + "over the whole column family.");
            } else {
              put.addImmutable(famAndQf[0], famAndQf[1],
                  m.value != null ? getBytes(m.value)
                      : HConstants.EMPTY_BYTE_ARRAY);
            }
            put.setDurability(m.writeToWAL ? Durability.SYNC_WAL : Durability.SKIP_WAL);
          }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.Put.addImmutable()

            if (famAndQf.length == 1) {
              LOG.warn("No column qualifier specified. Delete is the only mutation supported "
                  + "over the whole column family.");
            }
            if (famAndQf.length == 2) {
              put.addImmutable(famAndQf[0], famAndQf[1],
                  m.value != null ? getBytes(m.value)
                      : HConstants.EMPTY_BYTE_ARRAY);
            } else {
              throw new IllegalArgumentException("Invalid famAndQf provided.");
            }
View Full Code Here

Examples of org.apache.hadoop.hbase.client.Put.addImmutable()

        put = new Put(getBytes(row), HConstants.LATEST_TIMESTAMP);
        addAttributes(put, attributes);

        byte[][] famAndQf = KeyValue.parseColumn(getBytes(mput.column));

        put.addImmutable(famAndQf[0], famAndQf[1], mput.value != null ? getBytes(mput.value)
            : HConstants.EMPTY_BYTE_ARRAY);

        put.setDurability(mput.writeToWAL ? Durability.SYNC_WAL : Durability.SKIP_WAL);
      } catch (IllegalArgumentException e) {
        LOG.warn(e.getMessage(), e);
View Full Code Here

Examples of org.apache.hadoop.hbase.client.Put.addImmutable()

      out.setDurability(durabilityFromThrift(in.getDurability()));
    }

    for (TColumnValue columnValue : in.getColumnValues()) {
      if (columnValue.isSetTimestamp()) {
        out.addImmutable(
            columnValue.getFamily(), columnValue.getQualifier(), columnValue.getTimestamp(),
            columnValue.getValue());
      } else {
        out.addImmutable(
            columnValue.getFamily(), columnValue.getQualifier(), columnValue.getValue());
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.