Making the java driver apply resource constraints and limits

This commit is contained in:
Diptanu Choudhury 2016-02-05 10:55:03 -08:00
parent 1ba1baa9ac
commit f4ea6a15c8

View file

@ -162,6 +162,9 @@ func (d *JavaDriver) Start(ctx *ExecContext, task *structs.Task) (DriverHandle,
AllocDir: ctx.AllocDir,
TaskName: task.Name,
TaskResources: task.Resources,
FSIsolation: true,
ResourceLimits: true,
UnprivilegedUser: true,
}
ps, err := exec.LaunchCmd(&executor.ExecCommand{Cmd: "java", Args: args}, executorCtx)
if err != nil {