You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Sumit Mohanty <sm...@hortonworks.com> on 2014/01/28 00:36:43 UTC

Review Request 17429: Add support for hbase decommission (without draining)

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

Review request for Ambari, Andrew Onischuk and Sid Wagle.


Bugs: AMBARI-4441
    https://issues.apache.org/jira/browse/AMBARI-4441


Repository: ambari


Description
-------

See the attached JIRA.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java 5baa72e 
  ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HBASE/package/scripts/hbase_decommission.py PRE-CREATION 
  ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HBASE/package/scripts/hbase_master.py d94b4b4 
  ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HBASE/package/scripts/params.py b830412 
  ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HBASE/package/scripts/hbase_decommission.py PRE-CREATION 
  ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HBASE/package/scripts/hbase_master.py d94b4b4 
  ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HBASE/package/scripts/params.py 8205971 
  ambari-server/src/test/python/stacks/1.3.3/HBASE/test_hbase_master.py 6566415 
  ambari-server/src/test/python/stacks/1.3.3/configs/default.json 556853a 
  ambari-server/src/test/python/stacks/1.3.3/configs/secured.json fac4974 
  ambari-server/src/test/python/stacks/2.1.1/HBASE/test_hbase_master.py 12fb388 
  ambari-server/src/test/python/stacks/2.1.1/configs/default.json 7d4e9a6 
  ambari-server/src/test/python/stacks/2.1.1/configs/secured.json 6ad9e32 

Diff: https://reviews.apache.org/r/17429/diff/


Testing
-------

Unit tests passed for the decommission script.


Thanks,

Sumit Mohanty


Re: Review Request 17429: Add support for hbase decommission (without draining)

Posted by Sid Wagle <sw...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/17429/#review32913
-----------------------------------------------------------

Ship it!


ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java

- Line 536: isDrainOnlyRequest.equals("true") || isDrainOnlyRequest.equals("false"): Can be simplified as, Boolean.parseBoolean(isDrainOnlyRequest)

Rest looks good.

- Sid Wagle


On Jan. 27, 2014, 11:36 p.m., Sumit Mohanty wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/17429/
> -----------------------------------------------------------
> 
> (Updated Jan. 27, 2014, 11:36 p.m.)
> 
> 
> Review request for Ambari, Andrew Onischuk and Sid Wagle.
> 
> 
> Bugs: AMBARI-4441
>     https://issues.apache.org/jira/browse/AMBARI-4441
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> See the attached JIRA.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java 5baa72e 
>   ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HBASE/package/scripts/hbase_decommission.py PRE-CREATION 
>   ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HBASE/package/scripts/hbase_master.py d94b4b4 
>   ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HBASE/package/scripts/params.py b830412 
>   ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HBASE/package/scripts/hbase_decommission.py PRE-CREATION 
>   ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HBASE/package/scripts/hbase_master.py d94b4b4 
>   ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HBASE/package/scripts/params.py 8205971 
>   ambari-server/src/test/python/stacks/1.3.3/HBASE/test_hbase_master.py 6566415 
>   ambari-server/src/test/python/stacks/1.3.3/configs/default.json 556853a 
>   ambari-server/src/test/python/stacks/1.3.3/configs/secured.json fac4974 
>   ambari-server/src/test/python/stacks/2.1.1/HBASE/test_hbase_master.py 12fb388 
>   ambari-server/src/test/python/stacks/2.1.1/configs/default.json 7d4e9a6 
>   ambari-server/src/test/python/stacks/2.1.1/configs/secured.json 6ad9e32 
> 
> Diff: https://reviews.apache.org/r/17429/diff/
> 
> 
> Testing
> -------
> 
> Unit tests passed for the decommission script.
> 
> 
> Thanks,
> 
> Sumit Mohanty
> 
>


Re: Review Request 17429: Add support for hbase decommission (without draining)

Posted by Andrew Onischuk <ao...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/17429/#review32977
-----------------------------------------------------------


1)
hbase_excluded_hosts = default("/commandParams/excluded_hosts", "")
hbase_drain_only = default("/commandParams/mark_draining_only", "")
Please try to avoid using defaults, since it's hard to deal with, in cases we don't have some configuration (hard to find as a bug).

We decided to use this one scenario(lazy failing)
hbase_excluded_hosts = config['commandParams']['excluded_hosts']
hbase_drain_only = config['commandParams']['mark_draining_only']
So how it works. Imagine excluded_hosts for example is not in the config, but resrouce_management doesn't fail on these lines, it just puts UnknownConfiguration instance into a variables, and fails on the first reference in code. 
It's good in your case becase that config really should come if command is decommission, otherwise it doesn't matter since it's not referenced from other places.
The same we do for security, and other settings.
2)
It's seems I put somewhere elіe in hbase kninit_cmd too (service check probably). You can take out that as a common variable to params.py 

- Andrew Onischuk


On Jan. 27, 2014, 11:36 p.m., Sumit Mohanty wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/17429/
> -----------------------------------------------------------
> 
> (Updated Jan. 27, 2014, 11:36 p.m.)
> 
> 
> Review request for Ambari, Andrew Onischuk and Sid Wagle.
> 
> 
> Bugs: AMBARI-4441
>     https://issues.apache.org/jira/browse/AMBARI-4441
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> See the attached JIRA.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java 5baa72e 
>   ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HBASE/package/scripts/hbase_decommission.py PRE-CREATION 
>   ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HBASE/package/scripts/hbase_master.py d94b4b4 
>   ambari-server/src/main/resources/stacks/HDP/1.3.3/services/HBASE/package/scripts/params.py b830412 
>   ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HBASE/package/scripts/hbase_decommission.py PRE-CREATION 
>   ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HBASE/package/scripts/hbase_master.py d94b4b4 
>   ambari-server/src/main/resources/stacks/HDP/2.1.1/services/HBASE/package/scripts/params.py 8205971 
>   ambari-server/src/test/python/stacks/1.3.3/HBASE/test_hbase_master.py 6566415 
>   ambari-server/src/test/python/stacks/1.3.3/configs/default.json 556853a 
>   ambari-server/src/test/python/stacks/1.3.3/configs/secured.json fac4974 
>   ambari-server/src/test/python/stacks/2.1.1/HBASE/test_hbase_master.py 12fb388 
>   ambari-server/src/test/python/stacks/2.1.1/configs/default.json 7d4e9a6 
>   ambari-server/src/test/python/stacks/2.1.1/configs/secured.json 6ad9e32 
> 
> Diff: https://reviews.apache.org/r/17429/diff/
> 
> 
> Testing
> -------
> 
> Unit tests passed for the decommission script.
> 
> 
> Thanks,
> 
> Sumit Mohanty
> 
>