{"action":"created","issue":{"url":"https://api.github.com/repos/cloudfoundry/java-buildpack/issues/160","labels_url":"https://api.github.com/repos/cloudfoundry/java-buildpack/issues/160/labels{/name}","comments_url":"https://api.github.com/repos/cloudfoundry/java-buildpack/issues/160/comments","events_url":"https://api.github.com/repos/cloudfoundry/java-buildpack/issues/160/events","html_url":"https://github.com/cloudfoundry/java-buildpack/pull/160","id":60294394,"number":160,"title":"Provide a way to set environment variables for the command and set MALLOC_ARENA_MAX=2 for all JVM apps to reduce the memory overhead","user":{"login":"lhotari","id":66864,"avatar_url":"https://avatars.githubusercontent.com/u/66864?v=3","gravatar_id":"","url":"https://api.github.com/users/lhotari","html_url":"https://github.com/lhotari","followers_url":"https://api.github.com/users/lhotari/followers","following_url":"https://api.github.com/users/lhotari/following{/other_user}","gists_url":"https://api.github.com/users/lhotari/gists{/gist_id}","starred_url":"https://api.github.com/users/lhotari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lhotari/subscriptions","organizations_url":"https://api.github.com/users/lhotari/orgs","repos_url":"https://api.github.com/users/lhotari/repos","events_url":"https://api.github.com/users/lhotari/events{/privacy}","received_events_url":"https://api.github.com/users/lhotari/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-03-09T03:35:35Z","updated_at":"2015-03-09T14:31:29Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cloudfoundry/java-buildpack/pulls/160","html_url":"https://github.com/cloudfoundry/java-buildpack/pull/160","diff_url":"https://github.com/cloudfoundry/java-buildpack/pull/160.diff","patch_url":"https://github.com/cloudfoundry/java-buildpack/pull/160.patch"},"body":"Provide a way to set environment variables for the command that is being built.\r\nAlso make it possible to set environment variables that apply to all container types in the Java buildpack.\r\n- example use case is setting the MALLOC_ARENA_MAX environment variable for all container types\r\n\r\nThe code in this pull request might be totally bad in style. I was more or less learning the internals of Java buildpack and how the toolchain works while doing the PR and perhaps something is useful here. Feel free to scrap the code in this PR. :)\r\n\r\nIt would be nice if the structure in Java buildpack would support the concept of environment variables that are passed on the command line to the command. This is very useful if we want to set some environment variables for all containers types that the Java buildpack supports.\r\n\r\nSetting MALLOC_ARENA_MAX for all JVM apps can help reduce the memory overhead in 64-bit JVM apps. \r\nReferences about MALLOC_ARENA_MAX:\r\nHeroku guide:\r\nhttps://devcenter.heroku.com/articles/tuning-glibc-memory-behavior#what-value-to-choose-for-malloc_arena_max\r\nHadoop issue:\r\nhttps://issues.apache.org/jira/browse/HADOOP-7154\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/cloudfoundry/java-buildpack/issues/comments/77863566","html_url":"https://github.com/cloudfoundry/java-buildpack/pull/160#issuecomment-77863566","issue_url":"https://api.github.com/repos/cloudfoundry/java-buildpack/issues/160","id":77863566,"user":{"login":"lhotari","id":66864,"avatar_url":"https://avatars.githubusercontent.com/u/66864?v=3","gravatar_id":"","url":"https://api.github.com/users/lhotari","html_url":"https://github.com/lhotari","followers_url":"https://api.github.com/users/lhotari/followers","following_url":"https://api.github.com/users/lhotari/following{/other_user}","gists_url":"https://api.github.com/users/lhotari/gists{/gist_id}","starred_url":"https://api.github.com/users/lhotari/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lhotari/subscriptions","organizations_url":"https://api.github.com/users/lhotari/orgs","repos_url":"https://api.github.com/users/lhotari/repos","events_url":"https://api.github.com/users/lhotari/events{/privacy}","received_events_url":"https://api.github.com/users/lhotari/received_events","type":"User","site_admin":false},"created_at":"2015-03-09T14:31:29Z","updated_at":"2015-03-09T14:31:29Z","body":"Also found https://issues.apache.org/jira/browse/MAPREDUCE-3068 "}}