[
https://issues.apache.org/jira/browse/AMBARI-4315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13873428#comment-13873428
]
Jeff Sposetti commented on AMBARI-4315:
---------------------------------------
Propose you tighten this up so it has less whitespace. The patch has this:
'%(asctime)s - %(levelname)s - %(message)s'
Propose this:
'%(asctime)s %(levelname)s %(message)s'
Or this:
'%(asctime)s [%(levelname)s] %(message)s'
> Proposed changes to new resource mgmt logging
> ---------------------------------------------
>
> Key: AMBARI-4315
> URL: https://issues.apache.org/jira/browse/AMBARI-4315
> Project: Ambari
> Issue Type: Bug
> Reporter: Andrew Onischuk
> Assignee: Andrew Onischuk
> Fix For: 1.5.0
>
> Attachments: AMBARI-4315.patch
>
>
> Here is a snippet of current logging.
> 1) Is the "resource_management" needed? Maybe for DEBUG, but for INFO as well?
> {code}
> 2014-01-10 00:51:02,168 - resource_management - DEBUG - Running resource
> Directory['/var/log/hadoop/hdfs']
> 2014-01-10 00:51:02,168 - resource_management - DEBUG - Performing action
> create on Directory['/var/log/hadoop/hdfs']
> 2014-01-10 00:51:02,168 - resource_management.resource - DEBUG - New resource
> Execute['true']: {}
> 2014-01-10 00:51:02,168 - resource_management - DEBUG - Running resource
> Execute['true']
> 2014-01-10 00:51:02,168 - resource_management - DEBUG - Performing action run
> on Execute['true']
> 2014-01-10 00:51:02,168 - resource_management.provider - INFO - Executing
> Execute['true']
> 2014-01-10 00:51:02,179 - resource_management.resource - DEBUG - New resource
> Execute['export HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec &&
> /usr/lib/hadoop/sbin/hadoop-daemon.sh --config /etc/hadoop/conf start
> datanode']: {'not_if': u'ls /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid
> >/dev/null 2>&1 && ps `cat /var/run/hadoop/hdfs/hadoop-hdfs-datanode.pid`
> >/dev/null 2>&1', 'user': u'hdfs'}
> 2014-01-10 00:51:02,179 - resource_management - DEBUG - Running resource
> Execute['export HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec &&
> /usr/lib/hadoop/sbin/hadoop-daemon.sh --config /etc/hadoop/conf start
> datanode']
> 2014-01-10 00:51:02,191 - resource_management - DEBUG - Performing action run
> on Execute['export HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec &&
> /usr/lib/hadoop/sbin/hadoop-daemon.sh --config /etc/hadoop/conf start
> datanode']
> 2014-01-10 00:51:02,191 - resource_management.provider - INFO - Executing
> Execute['export HADOOP_LIBEXEC_DIR=/usr/lib/hadoop/libexec &&
> /usr/lib/hadoop/sbin/hadoop-daemon.sh --config /etc/hadoop/conf start
> datanode']
> {code}
> 2) If not, maybe a reorg like this to remove some whitespace and tighten-up
> the layout.
> {code}
> 2014-01-06 23:48:18,627 DEBUG [resource_management] Performing action run on
> Execute['/etc/init.d/httpd stop']
> 2014-01-06 23:48:18,627 INFO Executing Execute['/etc/init.d/httpd stop']
> 2014-01-06 23:48:18,647 DEBUG [resource_management] New resource
> Execute['grep -E 'KeepAlive (On|Off)' /etc/httpd/conf/httpd.conf && sed -i
> 's/KeepAlive Off/KeepAlive On/' /etc/httpd/conf/httpd.conf || echo 'KeepAlive
> On' >> /etc/httpd/conf/httpd.conf']: {}
> 2014-01-06 23:48:18,647 DEBUG [resource_management] Running resource
> Execute['grep -E 'KeepAlive (On|Off)' /etc/httpd/conf/httpd.conf && sed -i
> 's/KeepAlive Off/KeepAlive On/' /etc/httpd/conf/httpd.conf || echo 'KeepAlive
> On' >> /etc/httpd/conf/httpd.conf']
> 2014-01-06 23:48:18,648 DEBUG [resource_management] Performing action run on
> Execute['grep -E 'KeepAlive (On|Off)' /etc/httpd/conf/httpd.conf && sed -i
> 's/KeepAlive Off/KeepAlive On/' /etc/httpd/conf/httpd.conf || echo 'KeepAlive
> On' >> /etc/httpd/conf/httpd.conf']
> 2014-01-06 23:48:18,648 INFO Executing Execute['grep -E 'KeepAlive (On|Off)'
> /etc/httpd/conf/httpd.conf && sed -i 's/KeepAlive Off/KeepAlive On/'
> /etc/httpd/conf/httpd.conf || echo 'KeepAlive On' >>
> /etc/httpd/conf/httpd.conf']
> 2014-01-06 23:48:18,663 DEBUG [resource_management] New resource
> Execute['/etc/init.d/httpd start']: {}
> 2014-01-06 23:48:18,663 DEBUG [resource_management] Running resource
> Execute['/etc/init.d/httpd start']
> 2014-01-06 23:48:18,663 DEBUG [resource_management] Performing action run on
> Execute['/etc/init.d/httpd start']
> 2014-01-06 23:48:18,663 INFO Executing Execute['/etc/init.d/httpd start']
> {code}
> 3) On the UI side, it would be great to turn off seeing debug. It's useful to
> be there in case you need those details, but optionally show/don't show in
> UI. Because then you would end up with this which is very manageable for a
> user to read (this is the above logging w/ DEBUG removed).
> {code}
> 2014-01-06 23:48:18,627 INFO Executing Execute['/etc/init.d/httpd stop']
> 2014-01-06 23:48:18,648 INFO Executing Execute['grep -E 'KeepAlive (On|Off)'
> /etc/httpd/conf/httpd.conf && sed -i 's/KeepAlive Off/KeepAlive On/'
> /etc/httpd/conf/httpd.conf || echo 'KeepAlive On' >>
> /etc/httpd/conf/httpd.conf']
> 2014-01-06 23:48:18,663 INFO Executing Execute['/etc/init.d/httpd start']
> {code}
> 4) Also I propose when you install a package, you also give the detail of the
> command used. That's useful to a user. Right now, we show this:
> {code}
> 2014-01-10 00:50:48,480 - resource_management.provider - INFO Installing
> package ambari-log4j
> {code}
> Would be good to give the actual + specific yum/zypper/etc command being
> called, even in INFO:
> {code}
> 2014-01-10 00:50:48,480 INFO Installing package ambari-log4j [ā/usr/bin/yum
> -d 0 -e 0 -y install ambari-log4jā]
> {code}
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)