Examples of readFields()


Examples of org.apache.hadoop.util.bloom.BloomFilter.readFields()

    protected BloomFilter bloomIn(DataByteArray b) throws IOException {
        DataInputStream dis = new DataInputStream(new
            ByteArrayInputStream(b.get()));
        BloomFilter f = new BloomFilter();
        f.readFields(dis);
        return f;
    }

    private int convertHashType(String hashType) {
        if (hashType.toLowerCase().contains("jenkins")) {
View Full Code Here

Examples of org.apache.hadoop.util.bloom.Filter.readFields()

    if( str != null ) {
      Filter filter = NewVesselBloom();
      byte[] decoded = Base64.decodeBase64( str.getBytes());
      DataInputStream dataInput = new DataInputStream( new ByteArrayInputStream(decoded));
   
      filter.readFields(dataInput);
      return filter;
    } else {
      return NewBloomInstance();
    }
  }
View Full Code Here

Examples of org.apache.hadoop.vertica.VerticaInputSplit.readFields()

    input.write(out);

    in.reset(out.getData(), out.getLength());

    rem_input.readFields(in);
    assertEquals("Serialized segment params do not match", rem_input.getSegmentParams(), input.getSegmentParams());
    assertEquals("Serialized start does not match", rem_input.getStart(), input.getStart());
    assertEquals("Serialized length does not match", rem_input.getLength(), input.getLength());
  }
View Full Code Here

Examples of org.apache.hadoop.vertica.VerticaRecord.readFields()

    // create a new record with new values
    List<Object> new_values = new ArrayList<Object>();
    record = new VerticaRecord(null, types, new_values, date_string);

    // read back into values
    record.readFields(in);

    // compare values
    for(int i = 0; i < values.size(); i++)
      if(values.get(i) == null) assertSame("Vertica Record serialized value " + i + " is null", values.get(i), new_values.get(i));
      else if(values.get(i).getClass().isArray()) {
View Full Code Here

Examples of org.apache.hadoop.yarn.security.ContainerTokenIdentifier.readFields()

    DataInputBuffer di = new DataInputBuffer();
    di.reset(identifierBytes, identifierBytes.length);

    ContainerTokenIdentifier dummyIdentifier = new ContainerTokenIdentifier();
    dummyIdentifier.readFields(di);

    // Malice user modifies the resource amount
    Resource modifiedResource = BuilderUtils.newResource(2048);
    ContainerTokenIdentifier modifiedIdentifier =
        new ContainerTokenIdentifier(dummyIdentifier.getContainerID(),
View Full Code Here

Examples of org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier.readFields()

      try {
        if (childNodeName.startsWith(DELEGATION_TOKEN_PREFIX)) {
          RMDelegationTokenIdentifier identifier =
              new RMDelegationTokenIdentifier();
          identifier.readFields(fsIn);
          long renewDate = fsIn.readLong();
          rmState.rmSecretManagerState.delegationTokenState.put(identifier,
              renewDate);
        }
      } finally {
View Full Code Here

Examples of org.apache.hadoop.yarn.security.client.TimelineDelegationTokenIdentifier.readFields()

    throws IOException {
    ByteArrayInputStream buf = new ByteArrayInputStream(token.getIdentifier());
    DataInputStream dis = new DataInputStream(buf);
    TimelineDelegationTokenIdentifier id = new TimelineDelegationTokenIdentifier();
    try {
      id.readFields(dis);
      secretManager.verifyToken(id, token.getPassword());
    } finally {
      dis.close();
    }
    return id.getUser();
View Full Code Here

Examples of org.apache.hadoop.zebra.io.ColumnGroup.Reader.CGRangeSplit.readFields()

       */
      @Override
      public void readFields(DataInput in) throws IOException {
        for (int nx = 0; nx < 1; nx++) {
          CGRangeSplit cgrs = new CGRangeSplit();
          cgrs.readFields(in);
          slice = cgrs;
        }
      }

      /**
 
View Full Code Here

Examples of org.apache.hadoop.zebra.io.ColumnGroup.Reader.CGRowSplit.readFields()

       */
      @Override
      public void readFields(DataInput in) throws IOException {
        this.cgIndex = Utils.readVInt(in);
        CGRowSplit cgrs = new CGRowSplit();
        cgrs.readFields(in);
        this.slice = cgrs;
      }

      /**
       * @see Writable#write(DataOutput)
View Full Code Here

Examples of org.apache.hama.bsp.ClusterStatus.readFields()

    status1.write(out);

    in.reset(out.getData(), out.getLength());

    ClusterStatus status2 = new ClusterStatus();
    status2.readFields(in);

    Map<String, String> grooms_s = new HashMap<String, String>(status1
        .getActiveGroomNames());
    Map<String, String> grooms_o = new HashMap<String, String>(status2
        .getActiveGroomNames());
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.