Examples of addImmutable()


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

            Object[] array = Tag.asList(tags, 0, (short)tags.length).toArray();
            Tag[] tagArray = new Tag[array.length];
            for(int i = 0; i< array.length; i++) {
              tagArray[i] = (Tag)array[i];
            }
            put.addImmutable(family, qualifier, ts, value, tagArray);
          } else {
            put.addImmutable(family, qualifier, ts, value);
          }
        }
      }
View Full Code Here

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

            for(int i = 0; i< array.length; i++) {
              tagArray[i] = (Tag)array[i];
            }
            put.addImmutable(family, qualifier, ts, value, tagArray);
          } else {
            put.addImmutable(family, qualifier, ts, value);
          }
        }
      }
    }
    put.setDurability(toDurability(proto.getDurability()));
View Full Code Here

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

            Object[] array = Tag.asList(tags, 0, (short)tags.length).toArray();
            Tag[] tagArray = new Tag[array.length];
            for(int i = 0; i< array.length; i++) {
              tagArray[i] = (Tag)array[i];
            }
            put.addImmutable(family, qualifier, ts, value, tagArray);
          } else {
            put.addImmutable(family, qualifier, ts, value);
          }
        }
      }
View Full Code Here

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

            for(int i = 0; i< array.length; i++) {
              tagArray[i] = (Tag)array[i];
            }
            put.addImmutable(family, qualifier, ts, value, tagArray);
          } else {
            put.addImmutable(family, qualifier, ts, value);
          }
        }
      }
    }
    put.setDurability(toDurability(proto.getDurability()));
View Full Code Here

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

    Result r = region.get(g);
    if (r == null || r.size() == 0) return;
    // create a put for new _acl_ entry with rowkey as hbase:acl
    Put p = new Put(AccessControlLists.ACL_GLOBAL_NAME);
    for (Cell c : r.rawCells()) {
      p.addImmutable(CellUtil.cloneFamily(c), CellUtil.cloneQualifier(c), CellUtil.cloneValue(c));
    }
    region.put(p);
    // delete the old entry
    Delete del = new Delete(rowKey);
    region.delete(del);
View Full Code Here

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

  private void addSystemLabel(HRegion region, Map<String, Integer> labels,
      Map<String, List<Integer>> userAuths) throws IOException {
    if (!labels.containsKey(SYSTEM_LABEL)) {
      Put p = new Put(Bytes.toBytes(SYSTEM_LABEL_ORDINAL));
      p.addImmutable(LABELS_TABLE_FAMILY, LABEL_QUALIFIER, Bytes.toBytes(SYSTEM_LABEL));
      // Set auth for "system" label for all super users.
      List<String> superUsers = getSystemAndSuperUsers();
      for (String superUser : superUsers) {
        p.addImmutable(
            LABELS_TABLE_FAMILY, Bytes.toBytes(superUser), DUMMY_VALUE, LABELS_TABLE_TAGS);
View Full Code Here

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

      Put p = new Put(Bytes.toBytes(SYSTEM_LABEL_ORDINAL));
      p.addImmutable(LABELS_TABLE_FAMILY, LABEL_QUALIFIER, Bytes.toBytes(SYSTEM_LABEL));
      // Set auth for "system" label for all super users.
      List<String> superUsers = getSystemAndSuperUsers();
      for (String superUser : superUsers) {
        p.addImmutable(
            LABELS_TABLE_FAMILY, Bytes.toBytes(superUser), DUMMY_VALUE, LABELS_TABLE_TAGS);
      }
      region.put(p);
      labels.put(SYSTEM_LABEL, SYSTEM_LABEL_ORDINAL);
      for (String superUser : superUsers) {
View Full Code Here

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

                .buildException(new LabelAlreadyExistsException("Label '" + labelStr
                    + "' already exists")));
            response.addResult(failureResultBuilder.build());
          } else {
            Put p = new Put(Bytes.toBytes(ordinalCounter));
            p.addImmutable(
                LABELS_TABLE_FAMILY, LABEL_QUALIFIER, label, LABELS_TABLE_TAGS);
            if (LOG.isDebugEnabled()) {
              LOG.debug("Adding the label "+labelStr);
            }
            puts.add(p);
View Full Code Here

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

          failureResultBuilder.setException(ResponseConverter
              .buildException(new InvalidLabelException("Label '" + authStr + "' doesn't exist")));
          response.addResult(failureResultBuilder.build());
        } else {
          Put p = new Put(Bytes.toBytes(labelOrdinal));
          p.addImmutable(
              LABELS_TABLE_FAMILY, user, DUMMY_VALUE, LABELS_TABLE_TAGS);
          puts.add(p);
          response.addResult(successResult);
        }
      }
View Full Code Here

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

              qv.hasValue() ? qv.getValue().asReadOnlyByteBuffer() : null;
          long ts = timestamp;
          if (qv.hasTimestamp()) {
            ts = qv.getTimestamp();
          }
          put.addImmutable(family, qualifier, ts, value);
        }
      }
    }
    put.setDurability(toDurability(proto.getDurability()));
    for (NameBytesPair attribute: proto.getAttributeList()) {
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.