diff --git hcatalog/webhcat/svr/src/main/config/webhcat-default.xml hcatalog/webhcat/svr/src/main/config/webhcat-default.xml index fa8dbf8..8ef8a0a 100644 --- hcatalog/webhcat/svr/src/main/config/webhcat-default.xml +++ hcatalog/webhcat/svr/src/main/config/webhcat-default.xml @@ -371,4 +371,14 @@ in all PUT/POST requests, and rejects requests that do not have these. + + templeton.log.environment.enabled + true + + Dumping every environment variable value and the entire configuration to the + log could be damaging, so this parameter makes it possible to explicitly turn it off + by setting its value to false. + + + diff --git hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/AppConfig.java hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/AppConfig.java index dd1208b..da36ca4 100644 --- hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/AppConfig.java +++ hcatalog/webhcat/svr/src/main/java/org/apache/hive/hcatalog/templeton/AppConfig.java @@ -110,6 +110,7 @@ public static final String MAPPER_MEMORY_MB = "templeton.mapper.memory.mb"; public static final String MR_AM_MEMORY_MB = "templeton.mr.am.memory.mb"; public static final String TEMPLETON_JOBSLIST_ORDER = "templeton.jobs.listorder"; + public static final String TEMPLETON_LOG_ENVIRONMENT = "templeton.log.environment.enabled"; /** * see webhcat-default.xml @@ -192,7 +193,11 @@ private void init() { } ProxyUserSupport.processProxyuserConfig(this); handleHiveProperties(); - LOG.info(dumpEnvironent()); + if (getBoolean(TEMPLETON_LOG_ENVIRONMENT, true)) { + if (LOG.isInfoEnabled()) { + LOG.info(dumpEnvironent()); + } + } } /** * When auto-shipping hive tar (for example when hive query or pig script