Get the total number of bytes written by every {@link Fork}s of this {@link Task}.

@return the number of bytes written by every {@link Fork}s of this {@link Task}
348130
private long getBytesWritten() {
    long bytesWritten = 0;
    for (Optional<Fork> fork : this.forks.keySet()) {
      bytesWritten += fork.get().getBytesWritten();
    }
    return bytesWritten;
  }
88223
public long getTaskCount() {
        final ReentrantLock mainLock = this.mainLock;
        mainLock.lock();
        try {
            long n = completedTaskCount;
            for (Worker w : workers) {
                n += w.completedTasks;
                if (w.isLocked())
                    ++n;
            }
            return n + workQueue.size();
        } finally {
            mainLock.unlock();
        }
    }
1275174
public int incrementCount() {
        // get the logging recursion stack depth for the current thread
        int depth = stackDepth.get();
        depth = depth + 1;
        stackDepth.set(depth);
        return depth;
    }
696708
@Override
  public long getAllocatedMemory() {
    long sum = 0;
    for (MapInternals m : segments) {
      sum += m.getAllocatedMemory();
    }
    return sum;
  }
1006218
@Nullable
	public SerializedValue<TaskInformation> getSerializedTaskInformation() {
		if (serializedTaskInformation instanceof NonOffloaded) {
			NonOffloaded<TaskInformation> taskInformation =
				(NonOffloaded<TaskInformation>) serializedTaskInformation;
			return taskInformation.serializedValue;
		} else {
			throw new IllegalStateException(
				"Trying to work with offloaded serialized job information.");
		}
	}
217876
public long getMemoryUsageBytes() {
    long total = 0;
    for (int i = 0; i < maps_.length; i++) {
      if (maps_[i] != null) {
        total += maps_[i].getMemoryUsageBytes();
      }
    }
    return total;
  }
238980
public Task getTaskToRun(String taskTracker) {

    // Create the 'taskid'; do not count the 'killed' tasks against the job!
    TaskAttemptID taskid = null;
    if (nextTaskId < (MAX_TASK_EXECS + maxTaskAttempts + numKilledTasks)) {
      // Make sure that the attempts are unqiue across restarts
      int attemptId = job.getNumRestarts() * NUM_ATTEMPTS_PER_RESTART + nextTaskId;
      taskid = new TaskAttemptID( id, attemptId);
      ++nextTaskId;
    } else {
      LOG.warn("Exceeded limit of " + (MAX_TASK_EXECS + maxTaskAttempts) +
              " (plus " + numKilledTasks + " killed)"  + 
              " attempts for the tip '" + getTIPId() + "'");
      return null;
    }
    //keep track of the last time we started an attempt at this TIP
    //used to calculate the progress rate of this TIP
    setDispatchTime(taskid, JobTracker.getClock().getTime());
    if (0 == execStartTime){
      // assume task starts running now
      execStartTime = JobTracker.getClock().getTime();
    }
    return addRunningTask(taskid, taskTracker);
  }
1166703
public static double getSystemMemoryInfo() throws Exception {
        int total = 0;
        Process process = Runtime.getRuntime().exec("tasklist");
        String result = IOUtils.read(process.getInputStream(), Charset.defaultCharset().name());
        String[] results = result.split("\\n");
        for (String str : results) {
            Pattern pattern = Pattern.compile(".*\\s([0-9]{0,},[0-9]+)\\sK.*");
            Matcher matcher = pattern.matcher(str);
            if (matcher.find()) {
                String memorySizeStr = matcher.group(1).replace(",", "");
                int memorySize = Integer.parseInt(memorySizeStr);
                total += memorySize;
            }
        }
        return (double) total / 1024;
    }
1024399
public ReceivedMessageTask getTaskToProcess() {
        ReceivedMessageTask task = tasks.peek();
        if (task != null && task.setProcessing()) {
            return task;
        }
        return null;
    }
1126379
public static synchronized List<String> getTaskList() {
        List<String> tasks;

        if (uploadTasksMap.isEmpty()) {
            tasks = new ArrayList<>(1);
        } else {
            tasks = new ArrayList<>(uploadTasksMap.size());
            tasks.addAll(uploadTasksMap.keySet());
        }

        return tasks;
    }
934526
public static long getProcessedCount(List<TaskState> taskStates) {
    long value = 0;

    for (TaskState taskState : taskStates) {
      value += taskState.getPropAsLong(ConfigurationKeys.WRITER_RECORDS_WRITTEN, 0);
    }

    return value;
  }
684964
synchronized List<TaskStatus> getRunningTaskStatuses() {
    List<TaskStatus> result = new ArrayList<TaskStatus>(runningTasks.size());
    for(TaskInProgress tip: runningTasks.values()) {
      result.add(tip.getStatus());
    }
    return result;
  }
335183
private List<Write> getWritesToExecute() {
        // Calculate how much estimated space there is in the current ledger.
        final long maxTotalSize = this.config.getBkLedgerMaxSize() - getWriteLedger().ledger.getLength();

        // Get the writes to execute from the queue.
        List<Write> toExecute = this.writes.getWritesToExecute(maxTotalSize);

        // Check to see if any writes executed on closed ledgers, in which case they either need to be failed (if deemed
        // appropriate, or retried).
        if (handleClosedLedgers(toExecute)) {
            // If any changes were made to the Writes in the list, re-do the search to get a more accurate list of Writes
            // to execute (since some may have changed Ledgers, more writes may not be eligible for execution).
            toExecute = this.writes.getWritesToExecute(maxTotalSize);
        }

        return toExecute;
    }
812215
def total_write_throughput(self):
        
        total = self.write_throughput
        for index in itervalues(self.global_indexes):
            total += index.write_throughput
        return total
1268374
public long getKeyMemoryUsageBytes() {
    long total = 0;
    for (int i = 0; i < maps_.length; i++) {
      if (maps_[i] != null) {
        total += (long) (maps_[i].getActiveEntries()) * keySizeBytes_;
      }
    }
    return total;
  }
852480
private void writeTask(Task task) throws IOException
   {
      writeFields(null, task, TaskField.values());
      for (Task child : task.getChildTasks())
      {
         writeTask(child);
      }
   }
263241
public Task<Long> count() {
    return dispatcher.dispatchTask(new Callable<Long>() {
      @Override
      public Long call() {
        return proxy.count();
      }
    });
  }