Package org.commoncrawl.util.shared

Examples of org.commoncrawl.util.shared.FlexBuffer


      // ok set count in underlying object
      stringBytes.setLength(utfLen);
      // now if length != 0
      if (utfLen != 0) {
        // access the underlying buffer object
        FlexBuffer buffer = stringBytes.getBuffer();
        // make sure copy on write status
        buffer.copyOnWrite();
        // ok read in buytes
        in.readFully(buffer.get(), buffer.getOffset(), utfLen);
      }
    }
    // ok read in new way
    else {
      stringBytes.readFields(in);
View Full Code Here


      queryDetails.setQueryDataClassType(_queryData.getClass().getName());
      // marshall data buffer
      DataOutputBuffer outputBuffer = new DataOutputBuffer();
      _queryData.serialize(outputBuffer,new BinaryProtocol());
      // and add it to query details
      queryDetails.setQueryDataBuffer(new FlexBuffer(outputBuffer.getData(),0,outputBuffer.getLength(),true));
      // set shard id
      queryDetails.setShardId(split.getShardId());
     
      // allocate a new query status
      QueryStatus queryStatus = new QueryStatus();
View Full Code Here

TOP

Related Classes of org.commoncrawl.util.shared.FlexBuffer

Copyright © 2018 www.massapicom. 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.