Examples of ArrayByteSequence


Examples of org.apache.accumulo.core.data.ArrayByteSequence

   * @see #Authorizations(String...)
   */
  public Authorizations(Collection<byte[]> authorizations) {
    ArgumentChecker.notNull(authorizations);
    for (byte[] auth : authorizations)
      auths.add(new ArrayByteSequence(auth));
    checkAuths();
  }
View Full Code Here

Examples of org.apache.accumulo.core.data.ArrayByteSequence

   * @see #Authorizations(String...)
   */
  public Authorizations(List<ByteBuffer> authorizations) {
    ArgumentChecker.notNull(authorizations);
    for (ByteBuffer buffer : authorizations) {
      auths.add(new ArrayByteSequence(ByteBufferUtil.toBytes(buffer)));
    }
    checkAuths();
  }
View Full Code Here

Examples of org.apache.accumulo.core.data.ArrayByteSequence

      // it's the new format
      authsString = authsString.substring(HEADER.length());
      if (authsString.length() > 0) {
        for (String encAuth : authsString.split(",")) {
          byte[] auth = Base64.decodeBase64(encAuth.getBytes(Constants.UTF8));
          auths.add(new ArrayByteSequence(auth));
        }
        checkAuths();
      }
    } else {
      // it's the old format
View Full Code Here

Examples of org.apache.accumulo.core.data.ArrayByteSequence

  private void setAuthorizations(String... authorizations) {
    ArgumentChecker.notNull(authorizations);
    auths.clear();
    for (String str : authorizations) {
      str = str.trim();
      auths.add(new ArrayByteSequence(str.getBytes(Constants.UTF8)));
    }

    checkAuths();
  }
View Full Code Here

Examples of org.apache.accumulo.core.data.ArrayByteSequence

  /**
   * Checks for the existence of this UTF-8 encoded authorization.
   */
  public boolean contains(byte[] auth) {
    return auths.contains(new ArrayByteSequence(auth));
  }
View Full Code Here

Examples of org.apache.accumulo.core.data.ArrayByteSequence

    public TermSource(SortedKeyValueIterator<Key,Value> iter, Text term, boolean notFlag) {
      this.iter = iter;
      this.term = term;
      this.notFlag = notFlag;
      // The desired column families for this source is the term itself
      this.seekColfams = Collections.<ByteSequence> singletonList(new ArrayByteSequence(term.getBytes(), 0, term.getLength()));
    }
View Full Code Here

Examples of org.apache.accumulo.core.data.ArrayByteSequence

    if (options.containsKey(indexFamilyOptionName))
      indexColf = new Text(options.get(indexFamilyOptionName));
    if (options.containsKey(docFamilyOptionName))
      docColf = new Text(options.get(docFamilyOptionName));
    docSource = source.deepCopy(env);
    indexColfSet = Collections.singleton((ByteSequence) new ArrayByteSequence(indexColf.getBytes(), 0, indexColf.getLength()));
  }
View Full Code Here

Examples of org.apache.accumulo.core.data.ArrayByteSequence

    if (zeroIndex < 0)
      throw new IllegalArgumentException("bad current docID");
    Text colf = new Text(docColf);
    colf.append(nullByte, 0, 1);
    colf.append(currentDocID.getBytes(), 0, zeroIndex);
    docColfSet = Collections.singleton((ByteSequence) new ArrayByteSequence(colf.getBytes(), 0, colf.getLength()));
    if (log.isTraceEnabled())
      log.trace(zeroIndex + " " + currentDocID.getLength());
    Text colq = new Text();
    colq.set(currentDocID.getBytes(), zeroIndex + 1, currentDocID.getLength() - zeroIndex - 2);
    Key k = new Key(currentPartition, colf, colq);
View Full Code Here

Examples of org.apache.accumulo.core.data.ArrayByteSequence

 
  public static Set<ByteSequence> ncfs(String... colFams) {
    HashSet<ByteSequence> cfs = new HashSet<ByteSequence>();
   
    for (String cf : colFams) {
      cfs.add(new ArrayByteSequence(cf));
    }
   
    return cfs;
  }
View Full Code Here

Examples of org.apache.accumulo.core.data.ArrayByteSequence

      cfi.next();
    }
    assertEquals(tm1, tm2);
   
    HashSet<ByteSequence> colfams = new HashSet<ByteSequence>();
    colfams.add(new ArrayByteSequence("cf2"));
    cfi.seek(new Range(), colfams, true);
    aten(cfi, "r2", "cf2", "cq4", 5, "v4");
    aten(cfi, "r2", "cf2", "cq5", 5, "v5");
    assertFalse(cfi.hasTop());
   
    colfams.add(new ArrayByteSequence("cf3"));
    colfams.add(new ArrayByteSequence("cf4"));
    cfi.seek(new Range(), colfams, true);
    aten(cfi, "r2", "cf2", "cq4", 5, "v4");
    aten(cfi, "r2", "cf2", "cq5", 5, "v5");
    aten(cfi, "r3", "cf3", "cq6", 5, "v6");
    assertFalse(cfi.hasTop());
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.