You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by dm...@apache.org on 2016/03/07 12:37:25 UTC

[2/2] ambari git commit: AMBARI-15315. kafka commands throw an error after upgrading to HDP 2.4 from HDP 2.3 (dlysnichenko)

AMBARI-15315. kafka commands throw an error after upgrading to HDP 2.4 from HDP 2.3 (dlysnichenko)


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

Branch: refs/heads/trunk
Commit: b4fe1b6605bd09566bc68ff4fb9ce0ebebb51e52
Parents: c2aec6f
Author: Lisnichenko Dmitro <dl...@hortonworks.com>
Authored: Mon Mar 7 13:36:55 2016 +0200
Committer: Lisnichenko Dmitro <dl...@hortonworks.com>
Committed: Mon Mar 7 13:37:56 2016 +0200

----------------------------------------------------------------------
 .../KAFKA/0.8.1.2.2/package/scripts/kafka.py    |  7 +++++++
 .../package/templates/tools-log4j.properties.j2 | 21 ++++++++++++++++++++
 2 files changed, 28 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/b4fe1b66/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka.py b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka.py
index 830d0ce..2556741 100644
--- a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka.py
+++ b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/scripts/kafka.py
@@ -131,6 +131,13 @@ def kafka(upgrade_type=None):
          content=Template("kafka.conf.j2")
     )
 
+    File(os.path.join(params.conf_dir, 'tools-log4j.properties'),
+         owner='root',
+         group='root',
+         mode=0644,
+         content=Template("tools-log4j.properties.j2")
+         )
+
     setup_symlink(params.kafka_managed_pid_dir, params.kafka_pid_dir)
     setup_symlink(params.kafka_managed_log_dir, params.kafka_log_dir)
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/b4fe1b66/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/templates/tools-log4j.properties.j2
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/templates/tools-log4j.properties.j2 b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/templates/tools-log4j.properties.j2
new file mode 100644
index 0000000..c4ad326
--- /dev/null
+++ b/ambari-server/src/main/resources/common-services/KAFKA/0.8.1.2.2/package/templates/tools-log4j.properties.j2
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+log4j.rootLogger=WARN, stderr
+
+log4j.appender.stderr=org.apache.log4j.ConsoleAppender
+log4j.appender.stderr.layout=org.apache.log4j.PatternLayout
+log4j.appender.stderr.layout.ConversionPattern=[%d] %p %m (%c)%n
+log4j.appender.stderr.Target=System.err
\ No newline at end of file