[ https://issues.apache.org/jira/browse/YARN-7705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16321317#comment-16321317 ]
Miklos Szegedi commented on YARN-7705: -------------------------------------- Thank you for the patch [~yufeigu]! {code} 1068 if (container_log_dir == NULL) { {code} I would log here that concatenation failed and what were the parameters. It helps with supporting the feature. {code} 1064 char *any_one_container_log_dir = NULL; {code} Just the fact that a log dir was would is represented by this variable. I would replace it with a boolean (int). This will help to eliminate the extra logic on free(). {code} 1072 if (create_directory_for_user(container_log_dir) != 0) { 1073 free(container_log_dir); 1074 return -1; {code} Please add some extra logging here as well. {code} 370 cmd_input.container_id = argv[optind++]; {code} This requires a bump in the argument number check above to avoid buffer overflows. {code} 822 if (access(container_dir, R_OK) != 0) { {code} I would add a check that it is non NULL. > Create the container log directory with correct sticky bit in C code > -------------------------------------------------------------------- > > Key: YARN-7705 > URL: https://issues.apache.org/jira/browse/YARN-7705 > Project: Hadoop YARN > Issue Type: Bug > Components: nodemanager > Affects Versions: 3.0.0, 3.1.0 > Reporter: Yufei Gu > Assignee: Yufei Gu > Attachments: YARN-7705.001.patch, YARN-7705.002.patch > > > YARN-7363 created the container log directory in Java, which isn't able to > set the correct sticky bit because of Java language limitation. Wrong sticky > bit of log directory causes failure of reading log files inside the > directory. To solve that, we need to do it in C code. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org