hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allen Wittenauer (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-2161) Fix build on macosx: YARN parts
Date Tue, 23 Sep 2014 23:09:34 GMT

    [ https://issues.apache.org/jira/browse/YARN-2161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14145585#comment-14145585

Allen Wittenauer commented on YARN-2161:

Looks good for the most part!  A few minor things:

+#if defined(__MACH__)
+  // only those fds are opened assuming no bug
+  fclose(LOGFILE);
+  fclose(ERRORFILE);
+  fclose(stdin);
+  fclose(stdout);
+  fclose(stderr);

It would probably be better to detect if fcloseall is a valid function.  If not, then use
the manual fclose.  This would allow the code to run on not just OS X but other systems as

+#if defined(__FreeBSD__) || defined(__MACH__)
+  fprintf(LOGFILE, "Failed to mount cgroup controller, not supported\n");
+  return -1;

I sort of prefer the fix from YARN-1327 here, where it does +#ifndef __linux instead.

+#if !defined(__MACH__) // macosx do not have user bin
   if (check_user("bin") == NULL) {
     printf("FAIL: failed check for whitelisted system user bin\n");

Rather than ignore this test completely, can we chose a different user instead?

Also, can you incorporate the other changes from YARN-1327 so that we can do one commit?


> Fix build on macosx: YARN parts
> -------------------------------
>                 Key: YARN-2161
>                 URL: https://issues.apache.org/jira/browse/YARN-2161
>             Project: Hadoop YARN
>          Issue Type: Bug
>            Reporter: Binglin Chang
>            Assignee: Binglin Chang
>         Attachments: YARN-2161.v1.patch
> When compiling on macosx with -Pnative, there are several warning and errors, fix this
would help hadoop developers with macosx env. 

This message was sent by Atlassian JIRA

View raw message