hunk.code_window:                 tmp.append(batch)
               batches = tmp
               for batch in batches:
                   self.replay_buffer.append(batch)
                   self.num_steps_sampled += batch.count
                   self.buffer_size += batch.count
  
hunk.labels: keep keep keep add keep keep keep
hunk.after_edit:                 if batch.count > self.max_buffer_size:
                       raise ValueError(
                           "The size of a single sample batch exceeds the replay "
                           "buffer size ({} > {})".format(batch.count,
                                                          self.max_buffer_size))
  
hunk.file_path: python/ray/rllib/optimizers/sync_batch_replay_optimizer.py
hunk.type: add
file: package org.ray.streaming.core.runtime.context;
  
  import java.io.Serializable;
  import java.util.Map;
  import org.ray.streaming.core.graph.ExecutionGraph;
  
  /**
   * Encapsulate the context information for worker initialization.
   */
  public class WorkerContext implements Serializable {
  
    private int taskId;
    private ExecutionGraph executionGraph;
    private Map<String, Object> config;
  
    public WorkerContext(int taskId, ExecutionGraph executionGraph, Map<String, Object> jobConfig) {
      this.taskId = taskId;
      this.executionGraph = executionGraph;
      this.config = jobConfig;
    }
  
    public int getTaskId() {
      return taskId;
    }
  
    public void setTaskId(int taskId) {
      this.taskId = taskId;
    }
  
    public ExecutionGraph getExecutionGraph() {
      return executionGraph;
    }
  
    public void setExecutionGraph(ExecutionGraph executionGraph) {
      this.executionGraph = executionGraph;
    }
  
    public Map<String, Object> getConfig() {
      return config;
    }
  }
  