Examples of CamusRequest


Examples of com.linkedin.camus.workallocater.CamusRequest

        long earliestOffset = earliestOffsetResponse.offsets(
            topicAndPartition.topic(),
            topicAndPartition.partition())[0];
       
        //TODO: factor out kafka specific request functionality
        CamusRequest etlRequest = new EtlRequest(context,
            topicAndPartition.topic(), Integer.toString(leader
                .getLeaderId()), topicAndPartition.partition(),
            leader.getUri());
        etlRequest.setLatestOffset(latestOffset);
        etlRequest.setEarliestOffset(earliestOffset);
        finalRequests.add(etlRequest);
      }
    }
    return finalRequests;
  }
View Full Code Here

Examples of com.linkedin.camus.workallocater.CamusRequest

        SequenceFile.Reader reader = new SequenceFile.Reader(fs,
            f.getPath(), context.getConfiguration());
        EtlKey key = new EtlKey();
        while (reader.next(key, NullWritable.get())) {
        //TODO: factor out kafka specific request functionality
          CamusRequest request = new EtlRequest(context,
              key.getTopic(), key.getLeaderId(),
              key.getPartition());
          if (offsetKeysMap.containsKey(request)) {

            EtlKey oldKey = offsetKeysMap.get(request);
View Full Code Here

Examples of com.linkedin.camus.workallocater.CamusRequest

  @Override
  public void readFields(DataInput in) throws IOException {
    int size = in.readInt();
    for (int i = 0; i < size; i++) {
      CamusRequest r = new EtlRequest();
      r.readFields(in);
      requests.add(r);
      length += r.estimateDataSize();
    }
  }
View Full Code Here

Examples of com.linkedin.camus.workallocater.CamusRequest

      for (int i = 0; i < requests.size(); i++) {
        // return all request for each topic before returning another topic
        if (requests.get(i).getTopic().equals(currentTopic))
          return requests.remove(i);
      }
      CamusRequest cr = requests.remove(requests.size() - 1);
      currentTopic = cr.getTopic();
      return cr;
    }
    else
      return null;
  }
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.