add task id
This commit is contained in:
@@ -34,6 +34,9 @@ void AllreduceBase::Init(void) {
|
|||||||
// setup from enviroment variables
|
// setup from enviroment variables
|
||||||
{// handling for hadoop
|
{// handling for hadoop
|
||||||
const char *task_id = getenv("mapred_tip_id");
|
const char *task_id = getenv("mapred_tip_id");
|
||||||
|
if (task_id == NULL) {
|
||||||
|
task_id = getenv("mapreduce_task_id");
|
||||||
|
}
|
||||||
if (hadoop_mode != 0) {
|
if (hadoop_mode != 0) {
|
||||||
utils::Check(task_id != NULL, "hadoop_mode is set but cannot find mapred_task_id");
|
utils::Check(task_id != NULL, "hadoop_mode is set but cannot find mapred_task_id");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user