Examples of readFields()


Examples of org.apache.hadoop.io.Text.readFields()

  public void readFields(DataInput in) throws IOException {
    int version = in.readByte();
    if (version < 6) {
      if (version <= 2) {
        Text t = new Text();
        t.readFields(in);
        this.name = t.getBytes();
//        if(KeyValue.getFamilyDelimiterIndex(this.name, 0, this.name.length)
//            > 0) {
//          this.name = stripColon(this.name);
//        }
View Full Code Here

Examples of org.apache.hadoop.io.UTF8.readFields()

          Call call = (Call)calls.remove(new Integer(id));
          boolean isError = in.readBoolean();     // read if error
          if (isError) {
            UTF8 utf8 = new UTF8();
            utf8.readFields(in);                  // read error string
            call.setResult(null, utf8.toString());
          } else {
            Writable value = makeValue();
            try {
              readingCall = call;
View Full Code Here

Examples of org.apache.hadoop.io.VIntWritable.readFields()

    VIntWritable vInt = new VIntWritable();
    VLongWritable vLong = new VLongWritable();
   
    if (representedAsList) {
      transactionSet = new ArrayList<Pair<List<Integer>,Long>>();
      vInt.readFields(in);
      int numTransactions = vInt.get();
      for (int i = 0; i < numTransactions; i++) {
        vLong.readFields(in);
        Long support = vLong.get();
       
View Full Code Here

Examples of org.apache.hadoop.io.VLongWritable.readFields()

    if (representedAsList) {
      transactionSet = new ArrayList<Pair<List<Integer>,Long>>();
      vInt.readFields(in);
      int numTransactions = vInt.get();
      for (int i = 0; i < numTransactions; i++) {
        vLong.readFields(in);
        Long support = vLong.get();
       
        vInt.readFields(in);
        int length = vInt.get();
       
View Full Code Here

Examples of org.apache.hadoop.io.WritableComparable.readFields()

                    + ", while attempting to de-serialize it. (no default constructor ?)";
            throw new IOException(msg, e);
        }

        // read the fields of the object from DataInput
        writable.readFields(in);
        return writable;
    }

    /*
     * (non-Javadoc)
 
View Full Code Here

Examples of org.apache.hadoop.ipc.ProtobufRpcEngine.RpcResponseMessageWrapper.readFields()

    boolean done = false;
    do {
      int totalLen = inStream.readInt();
      RpcResponseMessageWrapper responseWrapper =
          new RpcResponseMessageWrapper();
      responseWrapper.readFields(inStream);
      RpcResponseHeaderProto header = responseWrapper.getMessageHeader();
      switch (header.getStatus()) {
        case ERROR: // might get a RPC error during
        case FATAL:
          throw new RemoteException(header.getExceptionClassName(),
View Full Code Here

Examples of org.apache.hadoop.lib.service.DelegationTokenIdentifier.readFields()

    throws DelegationTokenManagerException {
    ByteArrayInputStream buf = new ByteArrayInputStream(token.getIdentifier());
    DataInputStream dis = new DataInputStream(buf);
    DelegationTokenIdentifier id = new DelegationTokenIdentifier();
    try {
      id.readFields(dis);
      dis.close();
      secretManager.verifyToken(id, token.getPassword());
    } catch (Exception ex) {
      throw new DelegationTokenManagerException(
        DelegationTokenManagerException.ERROR.DT01, ex.toString(), ex);
View Full Code Here

Examples of org.apache.hadoop.mapred.ClusterStatus.BlackListInfo.readFields()

    info.setTrackerName("trackerName");
    ByteArrayOutputStream byteOut = new ByteArrayOutputStream();
    DataOutput out = new DataOutputStream(byteOut);
    info.write(out);
    BlackListInfo info2 = new BlackListInfo();
    info2.readFields(new DataInputStream(new ByteArrayInputStream(byteOut
        .toByteArray())));
    assertEquals(info, info);
    assertEquals(info.toString(), info.toString());
    assertEquals(info.getTrackerName(), "trackerName");
    assertEquals(info.getReasonForBlackListing(), "reasonForBlackListing");
View Full Code Here

Examples of org.apache.hadoop.mapred.Counters.readFields()

     */
    Counters actualCounters = new Counters();

    DataInputStream countersStream = FileSystem.get(job).open(crush.getCounters());

    actualCounters.readFields(countersStream);

    countersStream.close();

    assertThat(actualCounters, equalTo(expectedCounters));
  }
View Full Code Here

Examples of org.apache.hadoop.mapred.InputSplit.readFields()

    try {
      split = ReflectionUtils.newInstance(clazz, conf);
    } catch (Exception e) {
      throw new TezUncheckedException(e);
    }
    split.readFields(in);
    return split;
  }
 
  @Override
  public long getLength() throws IOException {
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.