You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Alejandro Fernandez <af...@hortonworks.com> on 2016/02/17 01:04:46 UTC
Review Request 43640: RU/EU can't start if hosts have name in
MixedCASE in configs for NameNode, HBASE Master, ResourceManager
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43640/
-----------------------------------------------------------
Review request for Ambari, Dmytro Grinenko, Dmitro Lisnichenko, Jonathan Hurley, and Nate Cole.
Bugs: AMBARI-15064
https://issues.apache.org/jira/browse/AMBARI-15064
Repository: ambari
Description
-------
RU/EU tries to resolve the hostnames for NameNode, HBASE Master, and ResourceManager by using MasterHostResolver.java, which queries configs and then JMX.
Ambari DB stores the hostnames in all lowercase, so if the configs or JMX store the hostnames in a different case, then Ambari will throw an exception that the host could not be found.
To fix this, convert all hostnames to lowercase.
Diffs
-----
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java 795dfa7
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java 70440fc
ambari-server/src/main/java/org/apache/ambari/server/stack/JmxQuery.java PRE-CREATION
ambari-server/src/main/java/org/apache/ambari/server/stack/MasterHostResolver.java 561350b
ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java eb5bf62
Diff: https://reviews.apache.org/r/43640/diff/
Testing
-------
Ran unit tests in UpgradeHelperTest.java
Waiting for full set of unit tests to run.
Thanks,
Alejandro Fernandez
Re: Review Request 43640: RU/EU can't start if hosts have name in
MixedCASE in configs for NameNode, HBASE Master, ResourceManager
Posted by Dmitro Lisnichenko <dl...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43640/#review119614
-----------------------------------------------------------
Ship it!
Ship It!
- Dmitro Lisnichenko
On Feb. 17, 2016, 9:25 p.m., Alejandro Fernandez wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43640/
> -----------------------------------------------------------
>
> (Updated Feb. 17, 2016, 9:25 p.m.)
>
>
> Review request for Ambari, Dmytro Grinenko, Dmitro Lisnichenko, Jonathan Hurley, and Nate Cole.
>
>
> Bugs: AMBARI-15064
> https://issues.apache.org/jira/browse/AMBARI-15064
>
>
> Repository: ambari
>
>
> Description
> -------
>
> RU/EU tries to resolve the hostnames for NameNode, HBASE Master, and ResourceManager by using MasterHostResolver.java, which queries configs and then JMX.
>
> Ambari DB stores the hostnames in all lowercase, so if the configs or JMX store the hostnames in a different case, then Ambari will throw an exception that the host could not be found.
>
> To fix this, convert all hostnames to lowercase.
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java 795dfa7
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java 70440fc
> ambari-server/src/main/java/org/apache/ambari/server/stack/MasterHostResolver.java 561350b
> ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java eb5bf62
>
> Diff: https://reviews.apache.org/r/43640/diff/
>
>
> Testing
> -------
>
> Ran unit tests in UpgradeHelperTest.java
> Verified that was able to start Express Upgrade.
>
> Waiting for full set of unit tests to run.
>
>
> Thanks,
>
> Alejandro Fernandez
>
>
Re: Review Request 43640: RU/EU can't start if hosts have name in
MixedCASE in configs for NameNode, HBASE Master, ResourceManager
Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43640/#review119607
-----------------------------------------------------------
Ship it!
Ship It!
- Jonathan Hurley
On Feb. 17, 2016, 2:25 p.m., Alejandro Fernandez wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43640/
> -----------------------------------------------------------
>
> (Updated Feb. 17, 2016, 2:25 p.m.)
>
>
> Review request for Ambari, Dmytro Grinenko, Dmitro Lisnichenko, Jonathan Hurley, and Nate Cole.
>
>
> Bugs: AMBARI-15064
> https://issues.apache.org/jira/browse/AMBARI-15064
>
>
> Repository: ambari
>
>
> Description
> -------
>
> RU/EU tries to resolve the hostnames for NameNode, HBASE Master, and ResourceManager by using MasterHostResolver.java, which queries configs and then JMX.
>
> Ambari DB stores the hostnames in all lowercase, so if the configs or JMX store the hostnames in a different case, then Ambari will throw an exception that the host could not be found.
>
> To fix this, convert all hostnames to lowercase.
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java 795dfa7
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java 70440fc
> ambari-server/src/main/java/org/apache/ambari/server/stack/MasterHostResolver.java 561350b
> ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java eb5bf62
>
> Diff: https://reviews.apache.org/r/43640/diff/
>
>
> Testing
> -------
>
> Ran unit tests in UpgradeHelperTest.java
> Verified that was able to start Express Upgrade.
>
> Waiting for full set of unit tests to run.
>
>
> Thanks,
>
> Alejandro Fernandez
>
>
Re: Review Request 43640: RU/EU can't start if hosts have name in
MixedCASE in configs for NameNode, HBASE Master, ResourceManager
Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43640/#review119516
-----------------------------------------------------------
ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java (line 1345)
<https://reviews.apache.org/r/43640/#comment180872>
Extended MasterHostResolver in order to override the queryJmxBeanValue method.
- Alejandro Fernandez
On Feb. 17, 2016, 7:25 p.m., Alejandro Fernandez wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43640/
> -----------------------------------------------------------
>
> (Updated Feb. 17, 2016, 7:25 p.m.)
>
>
> Review request for Ambari, Dmytro Grinenko, Dmitro Lisnichenko, Jonathan Hurley, and Nate Cole.
>
>
> Bugs: AMBARI-15064
> https://issues.apache.org/jira/browse/AMBARI-15064
>
>
> Repository: ambari
>
>
> Description
> -------
>
> RU/EU tries to resolve the hostnames for NameNode, HBASE Master, and ResourceManager by using MasterHostResolver.java, which queries configs and then JMX.
>
> Ambari DB stores the hostnames in all lowercase, so if the configs or JMX store the hostnames in a different case, then Ambari will throw an exception that the host could not be found.
>
> To fix this, convert all hostnames to lowercase.
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java 795dfa7
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java 70440fc
> ambari-server/src/main/java/org/apache/ambari/server/stack/MasterHostResolver.java 561350b
> ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java eb5bf62
>
> Diff: https://reviews.apache.org/r/43640/diff/
>
>
> Testing
> -------
>
> Ran unit tests in UpgradeHelperTest.java
> Verified that was able to start Express Upgrade.
>
> Waiting for full set of unit tests to run.
>
>
> Thanks,
>
> Alejandro Fernandez
>
>
Re: Review Request 43640: RU/EU can't start if hosts have name in
MixedCASE in configs for NameNode, HBASE Master, ResourceManager
Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43640/
-----------------------------------------------------------
(Updated Feb. 17, 2016, 7:25 p.m.)
Review request for Ambari, Dmytro Grinenko, Dmitro Lisnichenko, Jonathan Hurley, and Nate Cole.
Changes
-------
Addressed comments.
Bugs: AMBARI-15064
https://issues.apache.org/jira/browse/AMBARI-15064
Repository: ambari
Description
-------
RU/EU tries to resolve the hostnames for NameNode, HBASE Master, and ResourceManager by using MasterHostResolver.java, which queries configs and then JMX.
Ambari DB stores the hostnames in all lowercase, so if the configs or JMX store the hostnames in a different case, then Ambari will throw an exception that the host could not be found.
To fix this, convert all hostnames to lowercase.
Diffs (updated)
-----
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java 795dfa7
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java 70440fc
ambari-server/src/main/java/org/apache/ambari/server/stack/MasterHostResolver.java 561350b
ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java eb5bf62
Diff: https://reviews.apache.org/r/43640/diff/
Testing
-------
Ran unit tests in UpgradeHelperTest.java
Verified that was able to start Express Upgrade.
Waiting for full set of unit tests to run.
Thanks,
Alejandro Fernandez
Re: Review Request 43640: RU/EU can't start if hosts have name in
MixedCASE in configs for NameNode, HBASE Master, ResourceManager
Posted by Dmitro Lisnichenko <dl...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43640/#review119440
-----------------------------------------------------------
Ship it!
Ship It!
- Dmitro Lisnichenko
On Feb. 17, 2016, 2:43 a.m., Alejandro Fernandez wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43640/
> -----------------------------------------------------------
>
> (Updated Feb. 17, 2016, 2:43 a.m.)
>
>
> Review request for Ambari, Dmytro Grinenko, Dmitro Lisnichenko, Jonathan Hurley, and Nate Cole.
>
>
> Bugs: AMBARI-15064
> https://issues.apache.org/jira/browse/AMBARI-15064
>
>
> Repository: ambari
>
>
> Description
> -------
>
> RU/EU tries to resolve the hostnames for NameNode, HBASE Master, and ResourceManager by using MasterHostResolver.java, which queries configs and then JMX.
>
> Ambari DB stores the hostnames in all lowercase, so if the configs or JMX store the hostnames in a different case, then Ambari will throw an exception that the host could not be found.
>
> To fix this, convert all hostnames to lowercase.
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java 795dfa7
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java 70440fc
> ambari-server/src/main/java/org/apache/ambari/server/stack/JmxQuery.java PRE-CREATION
> ambari-server/src/main/java/org/apache/ambari/server/stack/MasterHostResolver.java 561350b
> ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java eb5bf62
>
> Diff: https://reviews.apache.org/r/43640/diff/
>
>
> Testing
> -------
>
> Ran unit tests in UpgradeHelperTest.java
> Verified that was able to start Express Upgrade.
>
> Waiting for full set of unit tests to run.
>
>
> Thanks,
>
> Alejandro Fernandez
>
>
Re: Review Request 43640: RU/EU can't start if hosts have name in
MixedCASE in configs for NameNode, HBASE Master, ResourceManager
Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43640/#review119476
-----------------------------------------------------------
ambari-server/src/main/java/org/apache/ambari/server/stack/JmxQuery.java (lines 33 - 37)
<https://reviews.apache.org/r/43640/#comment180843>
A whole new class for one method? Could just change the methods from MasterHostResolver. You can even make the methods protected and extend it for mocking out test cases.
- Nate Cole
On Feb. 16, 2016, 7:43 p.m., Alejandro Fernandez wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43640/
> -----------------------------------------------------------
>
> (Updated Feb. 16, 2016, 7:43 p.m.)
>
>
> Review request for Ambari, Dmytro Grinenko, Dmitro Lisnichenko, Jonathan Hurley, and Nate Cole.
>
>
> Bugs: AMBARI-15064
> https://issues.apache.org/jira/browse/AMBARI-15064
>
>
> Repository: ambari
>
>
> Description
> -------
>
> RU/EU tries to resolve the hostnames for NameNode, HBASE Master, and ResourceManager by using MasterHostResolver.java, which queries configs and then JMX.
>
> Ambari DB stores the hostnames in all lowercase, so if the configs or JMX store the hostnames in a different case, then Ambari will throw an exception that the host could not be found.
>
> To fix this, convert all hostnames to lowercase.
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java 795dfa7
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java 70440fc
> ambari-server/src/main/java/org/apache/ambari/server/stack/JmxQuery.java PRE-CREATION
> ambari-server/src/main/java/org/apache/ambari/server/stack/MasterHostResolver.java 561350b
> ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java eb5bf62
>
> Diff: https://reviews.apache.org/r/43640/diff/
>
>
> Testing
> -------
>
> Ran unit tests in UpgradeHelperTest.java
> Verified that was able to start Express Upgrade.
>
> Waiting for full set of unit tests to run.
>
>
> Thanks,
>
> Alejandro Fernandez
>
>
Re: Review Request 43640: RU/EU can't start if hosts have name in
MixedCASE in configs for NameNode, HBASE Master, ResourceManager
Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43640/#review119451
-----------------------------------------------------------
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java (line 265)
<https://reviews.apache.org/r/43640/#comment180818>
Always use the log parameterization, especially when using the DEBUG level. This will always invoke the string rendering even when the log level is not DEBUG.
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java (line 269)
<https://reviews.apache.org/r/43640/#comment180819>
Same as above; don't use String.format()
ambari-server/src/main/java/org/apache/ambari/server/stack/JmxQuery.java (lines 33 - 37)
<https://reviews.apache.org/r/43640/#comment180820>
Why not make it a singleton then and inject it?
ambari-server/src/main/java/org/apache/ambari/server/stack/JmxQuery.java (lines 78 - 79)
<https://reviews.apache.org/r/43640/#comment180821>
DEBUG enabled should log to DEBUG, not INFO.
ambari-server/src/main/java/org/apache/ambari/server/stack/MasterHostResolver.java (line 51)
<https://reviews.apache.org/r/43640/#comment180822>
Inject instead?
- Jonathan Hurley
On Feb. 16, 2016, 7:43 p.m., Alejandro Fernandez wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43640/
> -----------------------------------------------------------
>
> (Updated Feb. 16, 2016, 7:43 p.m.)
>
>
> Review request for Ambari, Dmytro Grinenko, Dmitro Lisnichenko, Jonathan Hurley, and Nate Cole.
>
>
> Bugs: AMBARI-15064
> https://issues.apache.org/jira/browse/AMBARI-15064
>
>
> Repository: ambari
>
>
> Description
> -------
>
> RU/EU tries to resolve the hostnames for NameNode, HBASE Master, and ResourceManager by using MasterHostResolver.java, which queries configs and then JMX.
>
> Ambari DB stores the hostnames in all lowercase, so if the configs or JMX store the hostnames in a different case, then Ambari will throw an exception that the host could not be found.
>
> To fix this, convert all hostnames to lowercase.
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java 795dfa7
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java 70440fc
> ambari-server/src/main/java/org/apache/ambari/server/stack/JmxQuery.java PRE-CREATION
> ambari-server/src/main/java/org/apache/ambari/server/stack/MasterHostResolver.java 561350b
> ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java eb5bf62
>
> Diff: https://reviews.apache.org/r/43640/diff/
>
>
> Testing
> -------
>
> Ran unit tests in UpgradeHelperTest.java
> Verified that was able to start Express Upgrade.
>
> Waiting for full set of unit tests to run.
>
>
> Thanks,
>
> Alejandro Fernandez
>
>
Re: Review Request 43640: RU/EU can't start if hosts have name in
MixedCASE in configs for NameNode, HBASE Master, ResourceManager
Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43640/
-----------------------------------------------------------
(Updated Feb. 17, 2016, 12:43 a.m.)
Review request for Ambari, Dmytro Grinenko, Dmitro Lisnichenko, Jonathan Hurley, and Nate Cole.
Bugs: AMBARI-15064
https://issues.apache.org/jira/browse/AMBARI-15064
Repository: ambari
Description
-------
RU/EU tries to resolve the hostnames for NameNode, HBASE Master, and ResourceManager by using MasterHostResolver.java, which queries configs and then JMX.
Ambari DB stores the hostnames in all lowercase, so if the configs or JMX store the hostnames in a different case, then Ambari will throw an exception that the host could not be found.
To fix this, convert all hostnames to lowercase.
Diffs
-----
ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java 795dfa7
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java 70440fc
ambari-server/src/main/java/org/apache/ambari/server/stack/JmxQuery.java PRE-CREATION
ambari-server/src/main/java/org/apache/ambari/server/stack/MasterHostResolver.java 561350b
ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java eb5bf62
Diff: https://reviews.apache.org/r/43640/diff/
Testing (updated)
-------
Ran unit tests in UpgradeHelperTest.java
Verified that was able to start Express Upgrade.
Waiting for full set of unit tests to run.
Thanks,
Alejandro Fernandez
Re: Review Request 43640: RU/EU can't start if hosts have name in
MixedCASE in configs for NameNode, HBASE Master, ResourceManager
Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43640/#review119391
-----------------------------------------------------------
ambari-server/src/main/java/org/apache/ambari/server/stack/MasterHostResolver.java (line 294)
<https://reviews.apache.org/r/43640/#comment180727>
This was the fix.
ambari-server/src/main/java/org/apache/ambari/server/stack/MasterHostResolver.java (line 331)
<https://reviews.apache.org/r/43640/#comment180728>
More fixes here.
- Alejandro Fernandez
On Feb. 17, 2016, 12:04 a.m., Alejandro Fernandez wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43640/
> -----------------------------------------------------------
>
> (Updated Feb. 17, 2016, 12:04 a.m.)
>
>
> Review request for Ambari, Dmytro Grinenko, Dmitro Lisnichenko, Jonathan Hurley, and Nate Cole.
>
>
> Bugs: AMBARI-15064
> https://issues.apache.org/jira/browse/AMBARI-15064
>
>
> Repository: ambari
>
>
> Description
> -------
>
> RU/EU tries to resolve the hostnames for NameNode, HBASE Master, and ResourceManager by using MasterHostResolver.java, which queries configs and then JMX.
>
> Ambari DB stores the hostnames in all lowercase, so if the configs or JMX store the hostnames in a different case, then Ambari will throw an exception that the host could not be found.
>
> To fix this, convert all hostnames to lowercase.
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java 795dfa7
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java 70440fc
> ambari-server/src/main/java/org/apache/ambari/server/stack/JmxQuery.java PRE-CREATION
> ambari-server/src/main/java/org/apache/ambari/server/stack/MasterHostResolver.java 561350b
> ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java eb5bf62
>
> Diff: https://reviews.apache.org/r/43640/diff/
>
>
> Testing
> -------
>
> Ran unit tests in UpgradeHelperTest.java
> Waiting for full set of unit tests to run.
>
>
> Thanks,
>
> Alejandro Fernandez
>
>