Examples of addImmutable()


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

        if (valueToPutCell == null) {
          servlet.getMetrics().incrementFailedPutRequests(1);
          return Response.status(Response.Status.BAD_REQUEST).type(MIMETYPE_TEXT)
              .entity("Bad request: The column to put and check do not match." + CRLF).build();
        } else {
          put.addImmutable(valueToPutParts[0], valueToPutParts[1], valueToPutCell.getTimestamp(),
            valueToPutCell.getValue());
          retValue = table.checkAndPut(key, valueToPutParts[0], valueToPutParts[1],
            valueToCheckCell.getValue(), put);
        }
      } else {
View Full Code Here

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

    byte[] value = new byte[actions.length];
    for (int i = 0; i < actions.length; i++) {
      value[i] = actions[i].code();
    }
    p.addImmutable(ACL_LIST_FAMILY, key, value);
    if (LOG.isDebugEnabled()) {
      LOG.debug("Writing permission with rowKey "+
          Bytes.toString(rowKey)+" "+
          Bytes.toString(key)+": "+Bytes.toStringBinary(value)
      );
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()

      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

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

      if (columnValue.isSetTimestamp()) {
        out.addImmutable(
            columnValue.getFamily(), columnValue.getQualifier(), columnValue.getTimestamp(),
            columnValue.getValue());
      } else {
        out.addImmutable(
            columnValue.getFamily(), columnValue.getQualifier(), columnValue.getValue());
      }
    }

    if (in.isSetAttributes()) {
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
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.