// Create a task description to pass back to Mesos
String name = "task " + mesosId + " (" + taskType + ")";
Map<String, String> params = new HashMap<String, String>();
params.put("cpus", "" + cpusPerTask);
params.put("mem", "" + memPerTask);
return new TaskDescription(mesosId, slaveId, name, params, new byte[0]);
}