Package edu.berkeley.sparrow.thrift

Examples of edu.berkeley.sparrow.thrift.TFullTaskId$TFullTaskIdTupleScheme


    assertEquals("2", task.requestId);
    task = scheduler.getNextTask();
    assertEquals("2", task.requestId);
    /* Make a list of task ids to use in every call to tasksFinished, and just update the request
     * id for each call. */
    TFullTaskId fullTaskId = new TFullTaskId();
    fullTaskId.taskId = "";
    List<TFullTaskId> completedTasks = Lists.newArrayList();
    completedTasks.add(fullTaskId);

    // Have a few tasks complete before the last runnable task is removed from the queue.
View Full Code Here


    /* Make sure that as tasks finish (and space is freed up) new tasks are added to the runqueue
     * in round-robin order.
     * Make a list of task ids to use in every call to tasksFinished, and just update the request
     * id. */
    TFullTaskId fullTaskId = new TFullTaskId();
    fullTaskId.taskId = "";
    List<TFullTaskId> completedTasks = Lists.newArrayList();
    completedTasks.add(fullTaskId);
    fullTaskId.requestId = "1";

View Full Code Here

    assertEquals("6", user2Task.requestId);
    assertEquals(0, scheduler.runnableTasks());

    // The scheduler should resume round-robin from user 1 (and not start the round-robin
    // again after user 2).
    TFullTaskId fullTaskId = new TFullTaskId();
    fullTaskId.taskId = "";
    List<TFullTaskId> completedTasks = Lists.newArrayList();
    completedTasks.add(fullTaskId);
    fullTaskId.requestId = "1";
View Full Code Here

    assertEquals(0, scheduler.runnableTasks());

    /* Make sure that as tasks finish, new tasks are added to the runqueue in strictly priority
     * order.
     */
    TFullTaskId fullTaskId = new TFullTaskId();
    fullTaskId.taskId = "";
    List<TFullTaskId> completedTasks = Lists.newArrayList();
    completedTasks.add(fullTaskId);
    fullTaskId.requestId = "1";

View Full Code Here

          return;
        }
      }
      BackendService.Client backendClient = backendClients.get(task.appBackendAddress);
      THostPort schedulerHostPort = Network.socketAddressToThrift(task.schedulerAddress);
      TFullTaskId taskId = new TFullTaskId(task.taskSpec.getTaskId(), task.requestId,
          task.appId, schedulerHostPort);
      try {
        backendClient.launchTask(task.taskSpec.bufferForMessage(), taskId, task.user);
      } catch (TException e) {
        LOG.error("Unable to launch task on backend " + task.appBackendAddress + ":" + e);
View Full Code Here

  private class TasksFinishedRpcRunnable implements Runnable {
    @Override
    public void run() {
      while (true) {
        try {
          TFullTaskId task = finishedTasks.take();
          client.tasksFinished(Lists.newArrayList(task));
        } catch (InterruptedException e) {
          LOG.error("Error taking a task from the queue: " + e.getMessage());
        } catch (TException e) {
          LOG.error("Error with tasksFinished() RPC:" + e.getMessage());
View Full Code Here

  private class TasksFinishedRpcRunnable implements Runnable {
    @Override
    public void run() {
      while (true) {
        try {
          TFullTaskId task = finishedTasks.take();
          client.tasksFinished(Lists.newArrayList(task));
        } catch (InterruptedException e) {
          LOG.error("Error taking a task from the queue: " + e.getMessage());
        } catch (TException e) {
          LOG.error("Error with tasksFinished() RPC:" + e.getMessage());
View Full Code Here

TOP

Related Classes of edu.berkeley.sparrow.thrift.TFullTaskId$TFullTaskIdTupleScheme

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.