diff --git a/drivers/java/driver.go b/drivers/java/driver.go index f94a55c67..2d700ba51 100644 --- a/drivers/java/driver.go +++ b/drivers/java/driver.go @@ -326,8 +326,8 @@ func (d *Driver) StartTask(cfg *drivers.TaskConfig) (*drivers.TaskHandle, *cstru User: cfg.User, ResourceLimits: true, Resources: &executor.Resources{ - CPU: int(cfg.Resources.LinuxResources.CPUShares), - MemoryMB: int(drivers.BytesToMB(cfg.Resources.LinuxResources.MemoryLimitBytes)), + CPU: cfg.Resources.NomadResources.CPU, + MemoryMB: cfg.Resources.NomadResources.MemoryMB, DiskMB: cfg.Resources.NomadResources.DiskMB, }, TaskDir: cfg.TaskDir().Dir,