예제 #1
0
 @Override
 public void readFields(BufferReaderWriter reader) {
   run = reader.readString();
   queryid = reader.readInt();
   recall = reader.readDouble();
   precision = reader.readDouble();
 }
 /**
  * @param id
  * @return the offset in the datafile of the record(group) that contains the record with the given
  *     ID.
  */
 public long getOffset(int id) {
   long offset = -1;
   try {
     int marker = getMarkerOffset(id);
     int jumpindex = getJumpIndex(id);
     residenttable.setOffset(marker);
     offset = residenttable.readInt();
     for (int i = 0; i < jumpindex; i++) {
       offset += residenttable.readByte();
     }
     // log.info("getOffset() bucketindex %d marker %d jumpindex %d offset %d", bucketindex,
     // marker, jumpindex, offset);
   } catch (EOCException ex) {
     log.fatalexception(ex, "getOffset( %d ) residenttable %s", id, residenttable);
   }
   return offset;
 }