> On July 29, 2016, 10:26 a.m., Dmytro Grinenko wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/HiveLog4jMetricsAction.java,
> >  line 73
> > <https://reviews.apache.org/r/50532/diff/3/?file=1456907#file1456907line73>
> >
> >     please use regexp, as 
> > log4j.logger.com.github.joshelser.dropwizard.metrics.hadoop   property can 
> > be already defined with different set of values or can be present without 
> > an coment.
> >     
> >     
> >     for an example 
> > "^\s*log4j.logger.com.github.joshelser.dropwizard.metrics.hadoop\s*=\s*(.*)$"
> 
> Dmytro Grinenko wrote:
>     
> ^\s*log4j\.logger\.com\.github\.joshelser\.dropwizard\.metrics\.hadoop\s*=\s*(.*)$
>  , that nice code formatting on rb
> 
> Aravindan Vijayan wrote:
>     Good catch Dmytro. But, this package does not exist in HDP 2.4 (or HDP 
> 2.3). Hence, the hive-log4j content ideally can never have this line. The 
> only way it might have it is through this Upgrade action. 
>     
>     Also, in the rare case that the user had actually set the log level of 
> this package to a specific value, I feel we should not change it. Hence, can 
> we just look for the string 
> "log4j.logger.com.github.joshelser.dropwizard.metrics.hadoop" instead of 
> pattern? What do you suggest?

yep, it would be enought just to check that this property doen't exist without 
cary about value.

I understand that it could be too much, but since user able to change that 
configuration manully on his own, we should assume that property could be 
already present.


- Dmytro


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/50532/#review144072
-----------------------------------------------------------


On July 29, 2016, 5:19 p.m., Aravindan Vijayan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/50532/
> -----------------------------------------------------------
> 
> (Updated July 29, 2016, 5:19 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Dmytro Grinenko, Jonathan 
> Hurley, Nate Cole, Sumit Mohanty, and Sid Wagle.
> 
> 
> Bugs: AMBARI-17949
>     https://issues.apache.org/jira/browse/AMBARI-17949
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> In hive-log4j content, the following needs to be added during HDP upgrades to 
> 2.5.
> 
> # Silence HadoopMetrics2Reporter INFO logs
> log4j.logger.com.github.joshelser.dropwizard.metrics.hadoop=WARN,DRFA
> 
> 
> Diffs
> -----
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/HiveLog4jMetricsAction.java
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml
>  9daced9 
>   ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.5.xml 
> 7a3a19e 
>   
> ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml
>  64c58d8 
>   ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.5.xml 
> 2168868 
>   
> ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/HiveLog4jMetricsActionTest.java
>  PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/50532/diff/
> 
> 
> Testing
> -------
> 
> Added unit tests.
> Tested EU from HDP 2.4 to 2.5.
> Tested RU from HDP 2.3 to 2.5
> 
> 
> Thanks,
> 
> Aravindan Vijayan
> 
>

Reply via email to