  This paper investigates a data-locality-aware task assignment and scheduling
problem aimed at minimizing job completion times for distributed job
executions. Without prior knowledge of future job arrivals, we propose an
optimal balanced task assignment algorithm (OBTA) that minimizes the completion
time of each arriving job. We significantly reduce OBTA's computational
overhead by narrowing the search space of potential solutions. Additionally, we
extend an approximate algorithm known as water-filling (WF) and nontrivially
prove that its approximation factor equals the number of task groups in the job
assignment. We also design a novel heuristic, replica-deletion (RD), which
outperforms WF. To further reduce the completion time of each job, we expand
the problem to include job reordering, where we adjust the order of outstanding
jobs following the shortest-estimated-time-first policy. Extensive trace-driven
evaluations validate the performance and efficiency of the proposed algorithms.
