ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject ambari git commit: AMBARI-13633. Express Upgrade Fails When Starting Standby NameNode (ncole)
Date Thu, 29 Oct 2015 20:40:24 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 ade69a111 -> aae4955f4


AMBARI-13633. Express Upgrade Fails When Starting Standby NameNode (ncole)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/aae4955f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/aae4955f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/aae4955f

Branch: refs/heads/branch-2.1
Commit: aae4955f457ed1e03ffb4e5f788a681427d824fb
Parents: ade69a1
Author: Nate Cole <ncole@hortonworks.com>
Authored: Thu Oct 29 16:40:12 2015 -0400
Committer: Nate Cole <ncole@hortonworks.com>
Committed: Thu Oct 29 16:40:12 2015 -0400

----------------------------------------------------------------------
 .../2.1.0.2.0/package/scripts/hdfs_namenode.py  |  14 +-
 .../python/stacks/2.0.6/HDFS/test_namenode.py   |  24 ++
 .../stacks/2.0.6/configs/nn_eu_standby.json     | 293 +++++++++++++++++++
 3 files changed, 326 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/aae4955f/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py
b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py
index 72bf2c4..f941164 100644
--- a/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py
+++ b/ambari-server/src/main/resources/common-services/HDFS/2.1.0.2.0/package/scripts/hdfs_namenode.py
@@ -38,7 +38,6 @@ from resource_management.core.logger import Logger
 
 from utils import service, safe_zkfc_op, is_previous_fs_image
 from setup_ranger_hdfs import setup_ranger_hdfs
-from namenode_ha_state import NAMENODE_STATE, NamenodeHAState
 
 
 @OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT)
@@ -100,7 +99,9 @@ def namenode(action=None, hdfs_binary=None, do_format=True, upgrade_type=None,
e
           options = "" if is_previous_image_dir else "-upgrade"
 
         if params.desired_namenode_role == "standby":
-          options = "-bootstrapStandby -force"
+          # bootstrap NN separately before starting the daemon
+          bootstrap_standby_namenode(params, use_path=True)
+
       else:
         # Both Primary and Secondary NameNode can use the same command.
         options = "" if is_previous_image_dir else "-upgrade"
@@ -409,17 +410,20 @@ def decommission():
   Execute(nn_refresh_cmd, user=hdfs_user)
 
 
-def bootstrap_standby_namenode(params):
+def bootstrap_standby_namenode(params, use_path=False):
+
+  bin_path = os.path.join(params.hadoop_bin_dir, '') if use_path else ""
+
   try:
     iterations = 50
-    bootstrap_cmd = "hdfs namenode -bootstrapStandby -nonInteractive"
+    bootstrap_cmd = format("{bin_path}hdfs namenode -bootstrapStandby -nonInteractive")
     # Blue print based deployments start both NN in parallel and occasionally
     # the first attempt to bootstrap may fail. Depending on how it fails the
     # second attempt may not succeed (e.g. it may find the folder and decide that
     # bootstrap succeeded). The solution is to call with -force option but only
     # during initial start
     if params.command_phase == "INITIAL_START":
-      bootstrap_cmd = "hdfs namenode -bootstrapStandby -nonInteractive -force"
+      bootstrap_cmd = format("{bin_path}hdfs namenode -bootstrapStandby -nonInteractive -force")
     Logger.info("Boostrapping standby namenode: %s" % (bootstrap_cmd))
     for i in range(iterations):
       Logger.info('Try %d out of %d' % (i+1, iterations))

http://git-wip-us.apache.org/repos/asf/ambari/blob/aae4955f/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py
index a825926..10cf0e8 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/HDFS/test_namenode.py
@@ -1264,6 +1264,30 @@ class TestNamenode(RMFTestCase):
                      hdp_stack_version = self.STACK_VERSION,
                      target = RMFTestCase.TARGET_COMMON_SERVICES)
 
+  @patch("utils.get_namenode_states")
+  def test_upgrade_restart_eu(self, get_namenode_states_mock):
+    active_namenodes = [('nn1', 'c6401.ambari.apache.org:50070')]
+    standby_namenodes = [('nn2', 'c6402.ambari.apache.org:50070')]
+    unknown_namenodes = []
+
+    mocks_dict = {}
+    get_namenode_states_mock.return_value = active_namenodes, standby_namenodes, unknown_namenodes
+    self.executeScript(self.COMMON_SERVICES_PACKAGE_DIR + "/scripts/namenode.py",
+                       classname = "NameNode",
+                       command = "restart",
+                       config_file = "nn_eu_standby.json",
+                       hdp_stack_version = self.STACK_VERSION,
+                       target = RMFTestCase.TARGET_COMMON_SERVICES,
+                       mocks_dict=mocks_dict)
+
+    # for now, just make sure hdfs bootstrap standby is called
+    found = False
+    for ca in mocks_dict['call'].call_args_list:
+      if str(ca[0][0]).startswith("/usr/hdp/2.3.2.0-2844/hadoop/bin/hdfs namenode -bootstrapStandby
-nonInteractive"):
+        found = True
+
+    self.assertTrue(found)
+
   def test_pre_upgrade_restart(self):
     config_file = self.get_src_folder()+"/test/python/stacks/2.0.6/configs/default.json"
     with open(config_file, "r") as f:

http://git-wip-us.apache.org/repos/asf/ambari/blob/aae4955f/ambari-server/src/test/python/stacks/2.0.6/configs/nn_eu_standby.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/configs/nn_eu_standby.json b/ambari-server/src/test/python/stacks/2.0.6/configs/nn_eu_standby.json
new file mode 100644
index 0000000..5d1f50f
--- /dev/null
+++ b/ambari-server/src/test/python/stacks/2.0.6/configs/nn_eu_standby.json
@@ -0,0 +1,293 @@
+{
+    "roleCommand": "CUSTOM_COMMAND", 
+    "forceRefreshConfigTagsBeforeExecution": [
+        "*"
+    ], 
+    "configuration_attributes": {
+        "ssl-client": {}, 
+        "ranger-hdfs-plugin-properties": {}, 
+        "ssl-server": {}, 
+        "hdfs-site": {}, 
+        "zoo.cfg": {}, 
+        "core-site": {}, 
+        "hadoop-policy": {}, 
+        "hdfs-log4j": {}, 
+        "hadoop-env": {}, 
+        "zookeeper-env": {}, 
+        "zookeeper-log4j": {}, 
+        "cluster-env": {}
+    }, 
+    "commandParams": {
+        "upgrade_direction": "upgrade", 
+        "service_package_folder": "common-services/HDFS/2.1.0.2.0/package", 
+        "script": "scripts/namenode.py", 
+        "hooks_folder": "HDP/2.0.6/hooks", 
+        "restart_type": "nonrolling_upgrade", 
+        "version": "2.3.2.0-2844", 
+        "forceRefreshConfigTagsBeforeExecution": "*", 
+        "original_stack": "HDP-2.2", 
+        "command_timeout": "1200", 
+        "target_stack": "HDP-2.3", 
+        "desired_namenode_role": "standby", 
+        "script_type": "PYTHON"
+    }, 
+    "stageId": 19, 
+    "kerberosCommandParams": [], 
+    "clusterName": "c1", 
+    "hostname": "c6402.ambari.apache.org", 
+    "hostLevelParams": {
+        "stack_name": "HDP", 
+        "group_list": "[\"hadoop\",\"users\"]", 
+        "host_sys_prepped": "false", 
+        "ambari_db_rca_username": "mapred", 
+        "current_version": "2.2.7.0-2816", 
+        "jdk_name": "jdk-7u45-linux-x64.tar.gz", 
+        "mysql_jdbc_url": "http://10.0.0.28:8080/resources//mysql-connector-java.jar", 
+        "repo_info": "[{\"baseUrl\":\"http://repos.ambari.apache.org/hdp/HDP-2.2.7.0-2816\",\"osType\":\"redhat6\",\"repoId\":\"HDP-2.2\",\"repoName\":\"HDP\",\"defaultBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.2.6.0\",\"latestBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP/centos6/2.x/updates/2.2.8.0\",\"baseSaved\":true},{\"baseUrl\":\"http://repos.ambari.apache.org/hdp/HDP-UTILS-1.1.0.20\",\"osType\":\"redhat6\",\"repoId\":\"HDP-UTILS-1.1.0.20\",\"repoName\":\"HDP-UTILS\",\"defaultBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos6\",\"latestBaseUrl\":\"http://public-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/centos6\",\"baseSaved\":true}]",

+        "custom_command": "RESTART", 
+        "stack_version": "2.3", 
+        "ambari_db_rca_driver": "org.postgresql.Driver", 
+        "java_home": "/usr/jdk64/jdk1.7.0_45", 
+        "jdk_location": "http://10.0.0.28:8080/resources/", 
+        "ambari_db_rca_url": "jdbc:postgresql://10.0.0.28/ambarirca", 
+        "java_version": "7", 
+        "oracle_jdbc_url": "http://10.0.0.28:8080/resources//ojdbc6.jar", 
+        "agentCacheDir": "/var/lib/ambari-agent/cache", 
+        "ambari_db_rca_password": "mapred", 
+        "jce_name": "UnlimitedJCEPolicyJDK7.zip", 
+        "db_name": "ambari", 
+        "db_driver_filename": "mysql-connector-java.jar", 
+        "user_list": "[\"ambari-qa\",\"zookeeper\",\"hdfs\"]"
+    }, 
+    "commandType": "EXECUTION_COMMAND", 
+    "roleParams": {
+        "component_category": "MASTER"
+    }, 
+    "serviceName": "HDFS", 
+    "role": "NAMENODE", 
+    "requestId": 22, 
+    "taskId": 147, 
+    "public_hostname": "c6402.ambari.apache.org", 
+    "configurations": {
+        "hdfs-site": {
+            "dfs.namenode.http-address.nn1.nn1": "c6401.ambari.apache.org:50070", 
+            "dfs.namenode.shared.edits.dir": "qjournal://c6401.ambari.apache.org:8485;c6402.ambari.apache.org:8485;c6403.ambari.apache.org:8485/nn1",

+            "dfs.namenode.http-address.nn1.nn2": "c6402.ambari.apache.org:50070", 
+            "dfs.namenode.startup.delay.block.deletion.sec": "3600", 
+            "dfs.namenode.checkpoint.txns": "1000000", 
+            "dfs.namenode.rpc-address.nn1.nn1": "c6401.ambari.apache.org:8020", 
+            "dfs.content-summary.limit": "5000", 
+            "dfs.support.append": "true", 
+            "dfs.namenode.rpc-address.nn1.nn2": "c6402.ambari.apache.org:8020", 
+            "dfs.cluster.administrators": " hdfs", 
+            "dfs.namenode.audit.log.async": "true", 
+            "dfs.datanode.balance.bandwidthPerSec": "6250000", 
+            "dfs.https.port": "50470", 
+            "dfs.namenode.safemode.threshold-pct": "0.99f", 
+            "dfs.namenode.checkpoint.edits.dir": "${dfs.namenode.checkpoint.dir}", 
+            "dfs.permissions.enabled": "true", 
+            "dfs.client.read.shortcircuit": "true", 
+            "dfs.ha.namenodes.nn1": "nn1,nn2", 
+            "dfs.namenode.https-address": "c6401.ambari.apache.org:50470", 
+            "dfs.ha.automatic-failover.enabled": "true", 
+            "dfs.blocksize": "134217728", 
+            "dfs.blockreport.initialDelay": "120", 
+            "dfs.journalnode.edits.dir": "/hadoop/hdfs/journal", 
+            "dfs.namenode.fslock.fair": "false", 
+            "dfs.datanode.max.transfer.threads": "4096", 
+            "dfs.heartbeat.interval": "3", 
+            "dfs.replication": "3", 
+            "dfs.namenode.handler.count": "25", 
+            "dfs.namenode.checkpoint.dir": "/hadoop/hdfs/namesecondary", 
+            "fs.permissions.umask-mode": "022", 
+            "dfs.namenode.stale.datanode.interval": "30000", 
+            "dfs.datanode.ipc.address": "0.0.0.0:8010", 
+            "dfs.namenode.name.dir": "/hadoop/hdfs/namenode", 
+            "dfs.nameservices": "nn1", 
+            "dfs.datanode.data.dir": "/hadoop/hdfs/data", 
+            "dfs.namenode.http-address": "c6401.ambari.apache.org:50070", 
+            "dfs.webhdfs.enabled": "true", 
+            "dfs.namenode.https-address.nn1.nn1": "c6401.ambari.apache.org:50470", 
+            "dfs.namenode.accesstime.precision": "0", 
+            "dfs.datanode.failed.volumes.tolerated": "0", 
+            "dfs.namenode.https-address.nn1.nn2": "c6402.ambari.apache.org:50470", 
+            "dfs.datanode.address": "0.0.0.0:50010", 
+            "dfs.datanode.https.address": "0.0.0.0:50475", 
+            "dfs.namenode.avoid.read.stale.datanode": "true", 
+            "dfs.client.failover.proxy.provider.nn1": "org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider",

+            "dfs.ha.fencing.methods": "shell(/bin/true)", 
+            "dfs.datanode.http.address": "0.0.0.0:50075", 
+            "dfs.datanode.du.reserved": "1073741824", 
+            "dfs.client.read.shortcircuit.streams.cache.size": "4096", 
+            "dfs.http.policy": "HTTP_ONLY", 
+            "dfs.block.access.token.enable": "true", 
+            "dfs.client.retry.policy.enabled": "false", 
+            "dfs.namenode.avoid.write.stale.datanode": "true", 
+            "dfs.encryption.key.provider.uri": "", 
+            "dfs.permissions.superusergroup": "hdfs", 
+            "dfs.journalnode.https-address": "0.0.0.0:8481", 
+            "dfs.journalnode.http-address": "0.0.0.0:8480", 
+            "dfs.domain.socket.path": "/var/lib/hadoop-hdfs/dn_socket", 
+            "dfs.namenode.write.stale.datanode.ratio": "1.0f", 
+            "dfs.hosts.exclude": "/etc/hadoop/conf/dfs.exclude", 
+            "dfs.datanode.data.dir.perm": "750", 
+            "dfs.namenode.name.dir.restore": "true", 
+            "dfs.replication.max": "50", 
+            "dfs.namenode.checkpoint.period": "21600"
+        }, 
+        "core-site": {
+            "io.serializations": "org.apache.hadoop.io.serializer.WritableSerialization",

+            "hadoop.security.auth_to_local": "DEFAULT", 
+            "fs.defaultFS": "hdfs://nn1", 
+            "fs.trash.interval": "360", 
+            "ha.failover-controller.active-standby-elector.zk.op.retries": "120", 
+            "hadoop.security.key.provider.path": "", 
+            "io.compression.codecs": "org.apache.hadoop.io.compress.GzipCodec,org.apache.hadoop.io.compress.DefaultCodec,org.apache.hadoop.io.compress.SnappyCodec",

+            "hadoop.security.authentication": "simple", 
+            "mapreduce.jobtracker.webinterface.trusted": "false", 
+            "hadoop.security.authorization": "false", 
+            "net.topology.script.file.name": "/etc/hadoop/conf/topology_script.py", 
+            "ipc.server.tcpnodelay": "true", 
+            "hadoop.http.authentication.simple.anonymous.allowed": "true", 
+            "hadoop.proxyuser.hdfs.groups": "*", 
+            "ipc.client.idlethreshold": "8000", 
+            "io.file.buffer.size": "131072", 
+            "hadoop.proxyuser.hdfs.hosts": "*", 
+            "ha.zookeeper.quorum": "c6401.ambari.apache.org:2181,c6402.ambari.apache.org:2181,c6403.ambari.apache.org:2181",

+            "ipc.client.connection.maxidletime": "30000", 
+            "ipc.client.connect.max.retries": "50"
+        }, 
+        "hadoop-policy": {
+            "security.job.client.protocol.acl": "*", 
+            "security.job.task.protocol.acl": "*", 
+            "security.datanode.protocol.acl": "*", 
+            "security.namenode.protocol.acl": "*", 
+            "security.client.datanode.protocol.acl": "*", 
+            "security.inter.tracker.protocol.acl": "*", 
+            "security.refresh.usertogroups.mappings.protocol.acl": "hadoop", 
+            "security.client.protocol.acl": "*", 
+            "security.refresh.policy.protocol.acl": "hadoop", 
+            "security.admin.operations.protocol.acl": "hadoop", 
+            "security.inter.datanode.protocol.acl": "*"
+        }, 
+        "hdfs-log4j": {
+            "content": "\n#\n# Licensed to the Apache Software Foundation (ASF) under one\n#
or more contributor license agreements.  See the NOTICE file\n# distributed with this work
for additional information\n# regarding copyright ownership.  The ASF licenses this file\n#
to you under the Apache License, Version 2.0 (the\n# \"License\"); you may not use this file
except in compliance\n# with the License.  You may obtain a copy of the License at\n#\n# 
http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed
to in writing,\n# software distributed under the License is distributed on an\n# \"AS IS\"
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n# KIND, either express or implied.  See the
License for the\n# specific language governing permissions and limitations\n# under the License.\n#\n\n\n#
Define some default values that can be overridden by system properties\n# To change daemon
root logger use hadoop_root_logger in hadoop-env\nhadoop.root.lo
 gger=INFO,console\nhadoop.log.dir=.\nhadoop.log.file=hadoop.log\n\n\n# Define the root logger
to the system property \"hadoop.root.logger\".\nlog4j.rootLogger=${hadoop.root.logger}, EventCounter\n\n#
Logging Threshold\nlog4j.threshhold=ALL\n\n#\n# Daily Rolling File Appender\n#\n\nlog4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.DRFA.File=${hadoop.log.dir}/${hadoop.log.file}\n\n#
Rollver at midnight\nlog4j.appender.DRFA.DatePattern=.yyyy-MM-dd\n\n# 30-day backup\n#log4j.appender.DRFA.MaxBackupIndex=30\nlog4j.appender.DRFA.layout=org.apache.log4j.PatternLayout\n\n#
Pattern format: Date LogLevel LoggerName LogMessage\nlog4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601}
%p %c: %m%n\n# Debugging Pattern format\n#log4j.appender.DRFA.layout.ConversionPattern=%d{ISO8601}
%-5p %c{2} (%F:%M(%L)) - %m%n\n\n\n#\n# console\n# Add \"console\" to rootlogger above if
you want to use this\n#\n\nlog4j.appender.console=org.apache.log4j.ConsoleAppender\nlog4j.appender
 .console.target=System.err\nlog4j.appender.console.layout=org.apache.log4j.PatternLayout\nlog4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd
HH:mm:ss} %p %c{2}: %m%n\n\n#\n# TaskLog Appender\n#\n\n#Default values\nhadoop.tasklog.taskid=null\nhadoop.tasklog.iscleanup=false\nhadoop.tasklog.noKeepSplits=4\nhadoop.tasklog.totalLogFileSize=100\nhadoop.tasklog.purgeLogSplits=true\nhadoop.tasklog.logsRetainHours=12\n\nlog4j.appender.TLA=org.apache.hadoop.mapred.TaskLogAppender\nlog4j.appender.TLA.taskId=${hadoop.tasklog.taskid}\nlog4j.appender.TLA.isCleanup=${hadoop.tasklog.iscleanup}\nlog4j.appender.TLA.totalLogFileSize=${hadoop.tasklog.totalLogFileSize}\n\nlog4j.appender.TLA.layout=org.apache.log4j.PatternLayout\nlog4j.appender.TLA.layout.ConversionPattern=%d{ISO8601}
%p %c: %m%n\n\n#\n#Security audit appender\n#\nhadoop.security.logger=INFO,console\nhadoop.security.log.maxfilesize=256MB\nhadoop.security.log.maxbackupindex=20\nlog4j.category.SecurityLogger=${hadoop.security.logg
 er}\nhadoop.security.log.file=SecurityAuth.audit\nlog4j.appender.DRFAS=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.DRFAS.File=${hadoop.log.dir}/${hadoop.security.log.file}\nlog4j.appender.DRFAS.layout=org.apache.log4j.PatternLayout\nlog4j.appender.DRFAS.layout.ConversionPattern=%d{ISO8601}
%p %c: %m%n\nlog4j.appender.DRFAS.DatePattern=.yyyy-MM-dd\n\nlog4j.appender.RFAS=org.apache.log4j.RollingFileAppender\nlog4j.appender.RFAS.File=${hadoop.log.dir}/${hadoop.security.log.file}\nlog4j.appender.RFAS.layout=org.apache.log4j.PatternLayout\nlog4j.appender.RFAS.layout.ConversionPattern=%d{ISO8601}
%p %c: %m%n\nlog4j.appender.RFAS.MaxFileSize=${hadoop.security.log.maxfilesize}\nlog4j.appender.RFAS.MaxBackupIndex=${hadoop.security.log.maxbackupindex}\n\n#\n#
hdfs audit logging\n#\nhdfs.audit.logger=INFO,console\nlog4j.logger.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=${hdfs.audit.logger}\nlog4j.additivity.org.apache.hadoop.hdfs.server.namenode.FSNamesystem.audit=
 false\nlog4j.appender.DRFAAUDIT=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.DRFAAUDIT.File=${hadoop.log.dir}/hdfs-audit.log\nlog4j.appender.DRFAAUDIT.layout=org.apache.log4j.PatternLayout\nlog4j.appender.DRFAAUDIT.layout.ConversionPattern=%d{ISO8601}
%p %c{2}: %m%n\nlog4j.appender.DRFAAUDIT.DatePattern=.yyyy-MM-dd\n\n#\n# NameNode metrics
logging.\n# The default is to retain two namenode-metrics.log files up to 64MB each.\n#\nnamenode.metrics.logger=INFO,NullAppender\nlog4j.logger.NameNodeMetricsLog=${namenode.metrics.logger}\nlog4j.additivity.NameNodeMetricsLog=false\nlog4j.appender.NNMETRICSRFA=org.apache.log4j.RollingFileAppender\nlog4j.appender.NNMETRICSRFA.File=${hadoop.log.dir}/namenode-metrics.log\nlog4j.appender.NNMETRICSRFA.layout=org.apache.log4j.PatternLayout\nlog4j.appender.NNMETRICSRFA.layout.ConversionPattern=%d{ISO8601}
%m%n\nlog4j.appender.NNMETRICSRFA.MaxBackupIndex=1\nlog4j.appender.NNMETRICSRFA.MaxFileSize=64MB\n\n#\n#
mapred audit logging\n#\nmapred
 .audit.logger=INFO,console\nlog4j.logger.org.apache.hadoop.mapred.AuditLogger=${mapred.audit.logger}\nlog4j.additivity.org.apache.hadoop.mapred.AuditLogger=false\nlog4j.appender.MRAUDIT=org.apache.log4j.DailyRollingFileAppender\nlog4j.appender.MRAUDIT.File=${hadoop.log.dir}/mapred-audit.log\nlog4j.appender.MRAUDIT.layout=org.apache.log4j.PatternLayout\nlog4j.appender.MRAUDIT.layout.ConversionPattern=%d{ISO8601}
%p %c{2}: %m%n\nlog4j.appender.MRAUDIT.DatePattern=.yyyy-MM-dd\n\n#\n# Rolling File Appender\n#\n\nlog4j.appender.RFA=org.apache.log4j.RollingFileAppender\nlog4j.appender.RFA.File=${hadoop.log.dir}/${hadoop.log.file}\n\n#
Logfile size and and 30-day backups\nlog4j.appender.RFA.MaxFileSize=256MB\nlog4j.appender.RFA.MaxBackupIndex=10\n\nlog4j.appender.RFA.layout=org.apache.log4j.PatternLayout\nlog4j.appender.RFA.layout.ConversionPattern=%d{ISO8601}
%-5p %c{2} - %m%n\nlog4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p %c{2} (%F:%M(%L))
- %m%n\n\n\n# Custom Logging leve
 ls\n\nhadoop.metrics.log.level=INFO\n#log4j.logger.org.apache.hadoop.mapred.JobTracker=DEBUG\n#log4j.logger.org.apache.hadoop.mapred.TaskTracker=DEBUG\n#log4j.logger.org.apache.hadoop.fs.FSNamesystem=DEBUG\nlog4j.logger.org.apache.hadoop.metrics2=${hadoop.metrics.log.level}\n\n#
Jets3t library\nlog4j.logger.org.jets3t.service.impl.rest.httpclient.RestS3Service=ERROR\n\n#\n#
Null Appender\n# Trap security logger on the hadoop client side\n#\nlog4j.appender.NullAppender=org.apache.log4j.varia.NullAppender\n\n#\n#
Event Counter Appender\n# Sends counts of logging messages at different severity levels to
Hadoop Metrics.\n#\nlog4j.appender.EventCounter=org.apache.hadoop.log.metrics.EventCounter\n\n#
Removes \"deprecated\" messages\nlog4j.logger.org.apache.hadoop.conf.Configuration.deprecation=WARN\n\n#\n#
HDFS block state change log from block manager\n#\n# Uncomment the following to suppress normal
block state change\n# messages from BlockManager in NameNode.\n#log4j.logger.BlockStateCh
 ange=WARN"
+        }, 
+        "hadoop-env": {
+            "namenode_opt_maxnewsize": "128m", 
+            "hadoop_root_logger": "INFO,RFA", 
+            "hdfs_log_dir_prefix": "/var/log/hadoop", 
+            "keyserver_host": " ", 
+            "namenode_heapsize": "1024m", 
+            "proxyuser_group": "users", 
+            "namenode_opt_maxpermsize": "256m", 
+            "content": "\n# Set Hadoop-specific environment variables here.\n\n# The only
required environment variable is JAVA_HOME.  All others are\n# optional.  When running a distributed
configuration it is best to\n# set JAVA_HOME in this file, so that it is correctly defined
on\n# remote nodes.\n\n# The java implementation to use.  Required.\nexport JAVA_HOME={{java_home}}\nexport
HADOOP_HOME_WARN_SUPPRESS=1\n\n# Hadoop home directory\nexport HADOOP_HOME=${HADOOP_HOME:-{{hadoop_home}}}\n\n#
Hadoop Configuration Directory\n\n{# this is different for HDP1 #}\n# Path to jsvc required
by secure HDP 2.0 datanode\nexport JSVC_HOME={{jsvc_path}}\n\n\n# The maximum amount of heap
to use, in MB. Default is 1000.\nexport HADOOP_HEAPSIZE=\"{{hadoop_heapsize}}\"\n\nexport
HADOOP_NAMENODE_INIT_HEAPSIZE=\"-Xms{{namenode_heapsize}}\"\n\n# Extra Java runtime options.
 Empty by default.\nexport HADOOP_OPTS=\"-Djava.net.preferIPv4Stack=true ${HADOOP_OPTS}\"\n\n#
Command specific options appende
 d to HADOOP_OPTS when specified\nHADOOP_JOBTRACKER_OPTS=\"-server -XX:ParallelGCThreads=8
-XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log -XX:NewSize={{jtnode_opt_newsize}}
-XX:MaxNewSize={{jtnode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date
+'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps
-Xmx{{jtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dmapred.audit.logger=INFO,MRAUDIT
-Dhadoop.mapreduce.jobsummary.logger=INFO,JSA ${HADOOP_JOBTRACKER_OPTS}\"\n\nHADOOP_TASKTRACKER_OPTS=\"-server
-Xmx{{ttnode_heapsize}} -Dhadoop.security.logger=ERROR,console -Dmapred.audit.logger=ERROR,console
${HADOOP_TASKTRACKER_OPTS}\"\n\n{% if java_version < 8 %}\nexport HADOOP_NAMENODE_OPTS=\"-server
-XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log
-XX:NewSize={{namenode_opt_newsize}} -XX:MaxNewSize={{namenode_opt_maxnewsize}} -XX:PermSiz
 e={{namenode_opt_permsize}} -XX:MaxPermSize={{namenode_opt_maxpermsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date
+'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps
-Xms{{namenode_heapsize}} -Xmx{{namenode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT
-Dnamenode.metrics.logger=INFO,NNMETRICSRFA -Dorg.mortbay.jetty.Request.maxFormContentSize=-1
${HADOOP_NAMENODE_OPTS}\"\nexport HADOOP_DATANODE_OPTS=\"-server -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC
-XX:ErrorFile=/var/log/hadoop/$USER/hs_err_pid%p.log -XX:NewSize=200m -XX:MaxNewSize=200m
-XX:PermSize=128m -XX:MaxPermSize=256m -Xloggc:/var/log/hadoop/$USER/gc.log-`date +'%Y%m%d%H%M'`
-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms{{dtnode_heapsize}}
-Xmx{{dtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT
${HADOOP_DATANODE_OPTS}\"\n\n# The following applies to multiple c
 ommands (fs, dfs, fsck, distcp etc)\nexport HADOOP_CLIENT_OPTS=\"-Xmx${HADOOP_HEAPSIZE}m
-XX:MaxPermSize=512m $HADOOP_CLIENT_OPTS\"\n\n{% else %}\nexport HADOOP_NAMENODE_OPTS=\"-server
-XX:ParallelGCThreads=8 -XX:+UseConcMarkSweepGC -XX:ErrorFile={{hdfs_log_dir_prefix}}/$USER/hs_err_pid%p.log
-XX:NewSize={{namenode_opt_newsize}} -XX:MaxNewSize={{namenode_opt_maxnewsize}} -Xloggc:{{hdfs_log_dir_prefix}}/$USER/gc.log-`date
+'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps
-Xms{{namenode_heapsize}} -Xmx{{namenode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT
-Dnamenode.metrics.logger=INFO,NNMETRICSRFA ${HADOOP_NAMENODE_OPTS} -Dorg.mortbay.jetty.Request.maxFormContentSize=-1\"\nexport
HADOOP_DATANODE_OPTS=\"-server -XX:ParallelGCThreads=4 -XX:+UseConcMarkSweepGC -XX:ErrorFile=/var/log/hadoop/$USER/hs_err_pid%p.log
-XX:NewSize=200m -XX:MaxNewSize=200m -Xloggc:/var/log/hadoop/$USER/gc.log-`date +'%Y%m%d%H%M'`
-
 verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps -Xms{{dtnode_heapsize}}
-Xmx{{dtnode_heapsize}} -Dhadoop.security.logger=INFO,DRFAS -Dhdfs.audit.logger=INFO,DRFAAUDIT
${HADOOP_DATANODE_OPTS}\"\n\n# The following applies to multiple commands (fs, dfs, fsck,
distcp etc)\nexport HADOOP_CLIENT_OPTS=\"-Xmx${HADOOP_HEAPSIZE}m $HADOOP_CLIENT_OPTS\"\n{%
endif %}\n\nHADOOP_BALANCER_OPTS=\"-server -Xmx{{hadoop_heapsize}}m ${HADOOP_BALANCER_OPTS}\"\n\nexport
HADOOP_SECONDARYNAMENODE_OPTS=$HADOOP_NAMENODE_OPTS\n\n# On secure datanodes, user to run
the datanode as after dropping privileges\nexport HADOOP_SECURE_DN_USER=${HADOOP_SECURE_DN_USER:-{{hadoop_secure_dn_user}}}\n\n#
Extra ssh options.  Empty by default.\nexport HADOOP_SSH_OPTS=\"-o ConnectTimeout=5 -o SendEnv=HADOOP_CONF_DIR\"\n\n#
Where log files are stored.  $HADOOP_HOME/logs by default.\nexport HADOOP_LOG_DIR={{hdfs_log_dir_prefix}}/$USER\n\n#
History server logs\nexport HADOOP_MAPRED_LOG_DIR={{mapred_log
 _dir_prefix}}/$USER\n\n# Where log files are stored in the secure data environment.\nexport
HADOOP_SECURE_DN_LOG_DIR={{hdfs_log_dir_prefix}}/$HADOOP_SECURE_DN_USER\n\n# File naming remote
slave hosts.  $HADOOP_HOME/conf/slaves by default.\n# export HADOOP_SLAVES=${HADOOP_HOME}/conf/slaves\n\n#
host:path where hadoop code should be rsync'd from.  Unset by default.\n# export HADOOP_MASTER=master:/home/$USER/src/hadoop\n\n#
Seconds to sleep between slave commands.  Unset by default.  This\n# can be useful in large
clusters, where, e.g., slave rsyncs can\n# otherwise arrive faster than the master can service
them.\n# export HADOOP_SLAVE_SLEEP=0.1\n\n# The directory where pid files are stored. /tmp
by default.\nexport HADOOP_PID_DIR={{hadoop_pid_dir_prefix}}/$USER\nexport HADOOP_SECURE_DN_PID_DIR={{hadoop_pid_dir_prefix}}/$HADOOP_SECURE_DN_USER\n\n#
History server pid\nexport HADOOP_MAPRED_PID_DIR={{mapred_pid_dir_prefix}}/$USER\n\nYARN_RESOURCEMANAGER_OPTS=\"-Dyarn.server.resourcemanage
 r.appsummary.logger=INFO,RMSUMMARY\"\n\n# A string representing this instance of hadoop.
$USER by default.\nexport HADOOP_IDENT_STRING=$USER\n\n# The scheduling priority for daemon
processes.  See 'man nice'.\n\n# export HADOOP_NICENESS=10\n\n# Use libraries from standard
classpath\nJAVA_JDBC_LIBS=\"\"\n#Add libraries required by mysql connector\nfor jarFile in
`ls /usr/share/java/*mysql* 2>/dev/null`\ndo\n  JAVA_JDBC_LIBS=${JAVA_JDBC_LIBS}:$jarFile\ndone\n#
Add libraries required by oracle connector\nfor jarFile in `ls /usr/share/java/*ojdbc* 2>/dev/null`\ndo\n
 JAVA_JDBC_LIBS=${JAVA_JDBC_LIBS}:$jarFile\ndone\n\n\nexport HADOOP_CLASSPATH=${HADOOP_CLASSPATH}${JAVA_JDBC_LIBS}\n\n#
added to the HADOOP_CLASSPATH\nif [ -d \"/usr/hdp/current/tez-client\" ]; then\n  if [ -d
\"/etc/tez/conf/\" ]; then\n    # When using versioned RPMs, the tez-client will be a symlink
to the current folder of tez in HDP.\n    export HADOOP_CLASSPATH=${HADOOP_CLASSPATH}\n  fi\nfi\n\n\n#
Setting path to hdfs 
 command line\nexport HADOOP_LIBEXEC_DIR={{hadoop_libexec_dir}}\n\n# Mostly required for hadoop
2.0\nexport JAVA_LIBRARY_PATH=${JAVA_LIBRARY_PATH}\n\nexport HADOOP_OPTS=\"-Dhdp.version=$HDP_VERSION
$HADOOP_OPTS\"\n\n{% if is_datanode_max_locked_memory_set %}\n# Fix temporary bug, when ulimit
from conf files is not picked up, without full relogin. \n# Makes sense to fix only when runing
DN as root \nif [ \"$command\" == \"datanode\" ] && [ \"$EUID\" -eq 0 ] &&
[ -n \"$HADOOP_SECURE_DN_USER\" ]; then\n  ulimit -l {{datanode_max_locked_memory}}\nfi\n{%
endif %}", 
+            "hdfs_user": "hdfs", 
+            "hdfs_user_nproc_limit": "65536", 
+            "namenode_opt_newsize": "128m", 
+            "keyserver_port": "", 
+            "dtnode_heapsize": "1024m", 
+            "hadoop_pid_dir_prefix": "/var/run/hadoop", 
+            "hadoop_heapsize": "1024", 
+            "hdfs_user_nofile_limit": "128000", 
+            "namenode_opt_permsize": "128m"
+        }, 
+        "cluster-env": {
+            "security_enabled": "false", 
+            "smokeuser_keytab": "/etc/security/keytabs/smokeuser.headless.keytab", 
+            "ignore_groupsusers_create": "false", 
+            "override_uid": "true", 
+            "kerberos_domain": "EXAMPLE.COM", 
+            "repo_suse_rhel_template": "[{{repo_id}}]\nname={{repo_id}}\n{% if mirror_list
%}mirrorlist={{mirror_list}}{% else %}baseurl={{base_url}}{% endif %}\n\npath=/\nenabled=1\ngpgcheck=0",

+            "user_group": "hadoop", 
+            "smokeuser": "ambari-qa", 
+            "repo_ubuntu_template": "{{package_type}} {{base_url}} {{components}}"
+        }
+    }, 
+    "configurationTags": {
+        "ssl-client": {
+            "tag": "version1"
+        }, 
+        "ranger-hdfs-plugin-properties": {
+            "tag": "version1446068341745"
+        }, 
+        "ssl-server": {
+            "tag": "version1"
+        }, 
+        "hdfs-site": {
+            "tag": "version1446041633836"
+        }, 
+        "zoo.cfg": {
+            "tag": "version1"
+        }, 
+        "core-site": {
+            "tag": "version1446041633836"
+        }, 
+        "hadoop-policy": {
+            "tag": "version1"
+        }, 
+        "hdfs-log4j": {
+            "tag": "version1"
+        }, 
+        "hadoop-env": {
+            "tag": "version1446068339668"
+        }, 
+        "zookeeper-env": {
+            "tag": "version1"
+        }, 
+        "zookeeper-log4j": {
+            "tag": "version1"
+        }, 
+        "cluster-env": {
+            "tag": "version1"
+        }
+    }, 
+    "commandId": "22-19", 
+    "forceRefreshConfigTags": [], 
+    "clusterHostInfo": {
+        "zkfc_hosts": [
+            "c6401.ambari.apache.org", 
+            "c6402.ambari.apache.org"
+        ], 
+        "all_ping_ports": [
+            "8670", 
+            "8670", 
+            "8670"
+        ], 
+        "journalnode_hosts": [
+            "c6403.ambari.apache.org", 
+            "c6401.ambari.apache.org", 
+            "c6402.ambari.apache.org"
+        ], 
+        "all_hosts": [
+            "c6403.ambari.apache.org", 
+            "c6401.ambari.apache.org", 
+            "c6402.ambari.apache.org"
+        ], 
+        "slave_hosts": [
+            "c6403.ambari.apache.org"
+        ], 
+        "namenode_host": [
+            "c6401.ambari.apache.org", 
+            "c6402.ambari.apache.org"
+        ], 
+        "all_racks": [
+            "/default-rack", 
+            "/default-rack", 
+            "/default-rack"
+        ], 
+        "all_ipv4_ips": [
+            "192.168.64.103", 
+            "192.168.64.101", 
+            "192.168.64.102"
+        ], 
+        "ambari_server_host": [
+            "10.0.0.28"
+        ], 
+        "zookeeper_hosts": [
+            "c6403.ambari.apache.org", 
+            "c6401.ambari.apache.org", 
+            "c6402.ambari.apache.org"
+        ]
+    }
+}


Mime
View raw message