IMPALA-5652: deprecate unlimited process mem_limit Testing: Started cluster locally with:
start-impala-cluster.py --impalad_args=--mem_limit=-1 Checked that the warning showed up in the logs: W0808 17:01:36.528360 6251 exec-env.cc:237] Configured with unlimited process memory limit (--mem_limit='-1'). Starting in the next Impala release, a process memory limit must always be specified. See IMPALA-5653. Change-Id: I42509a6a9ed49e3752931c82310dfda841dd97df Reviewed-on: http://gerrit.cloudera.org:8080/7622 Reviewed-by: Matthew Jacobs <[email protected]> Tested-by: Impala Public Jenkins Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/d30f5f4e Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/d30f5f4e Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/d30f5f4e Branch: refs/heads/master Commit: d30f5f4e302845132e346263aaf3dfb8c0bb5e1e Parents: 7007cd8 Author: Tim Armstrong <[email protected]> Authored: Tue Aug 8 16:58:03 2017 -0700 Committer: Impala Public Jenkins <[email protected]> Committed: Wed Aug 9 05:48:34 2017 +0000 ---------------------------------------------------------------------- be/src/runtime/exec-env.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/d30f5f4e/be/src/runtime/exec-env.cc ---------------------------------------------------------------------- diff --git a/be/src/runtime/exec-env.cc b/be/src/runtime/exec-env.cc index 8239a68..3427c30 100644 --- a/be/src/runtime/exec-env.cc +++ b/be/src/runtime/exec-env.cc @@ -206,7 +206,7 @@ Status ExecEnv::StartServices() { // memory limit either based on the available physical memory, or if overcommitting // is turned off, we use the memory commit limit from /proc/meminfo (see // IMPALA-1690). - // --mem_limit="" means no memory limit. TODO: IMPALA-5652: deprecate this mode + // --mem_limit="" means no memory limit. TODO: IMPALA-5653: remove this mode int64_t bytes_limit = 0; bool is_percent; int64_t system_mem; @@ -231,8 +231,13 @@ Status ExecEnv::StartServices() { system_mem = MemInfo::physical_mem(); bytes_limit = ParseUtil::ParseMemSpec(FLAGS_mem_limit, &is_percent, system_mem); } - // ParseMemSpec returns 0 to mean unlimited. TODO: IMPALA-5652: deprecate this mode. + // ParseMemSpec returns 0 to mean unlimited. bool no_process_mem_limit = bytes_limit == 0; + if (no_process_mem_limit) { + LOG(WARNING) << "Configured with unlimited process memory limit (--mem_limit='" + << FLAGS_mem_limit << "'). Starting in the next Impala release, " + << "a process memory limit must always be specified. See IMPALA-5653."; + } if (bytes_limit < 0) { return Status("Failed to parse mem limit from '" + FLAGS_mem_limit + "'."); }
