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



ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_decommission.py
<https://reviews.apache.org/r/32884/#comment128022>

    This looks like common code, suggest moving it outside the if/else.



ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_decommission.py
<https://reviews.apache.org/r/32884/#comment128023>

    Ths specific code starts here. How about keeping the if+hosts=...+for+if 
host common, and use a specific function to handle the task? Something like:
    if params.hbase_drain_only == True:
      decommission_fn = decommission_drain_only
    else:
      decommission_fn = decommission_normal



ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_regionserver.py
<https://reviews.apache.org/r/32884/#comment128024>

    Seen this exact sequence copy-pasted many times. Isn't there a way to use 
metaclasses to skip writing this kind of repetitive code?


- Florian Barca


On April 6, 2015, 4:03 p.m., Artem Baranchuk wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/32884/
> -----------------------------------------------------------
> 
> (Updated April 6, 2015, 4:03 p.m.)
> 
> 
> Review request for Ambari, Eugene Chekanskiy, Florian Barca, and Jayush 
> Luniya.
> 
> 
> Bugs: AMBARI-10367
>     https://issues.apache.org/jira/browse/AMBARI-10367
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> [WinTP2] Merge HDPWIN HBASE package scripts to common services
> 
> 
> Diffs
> -----
> 
>   
> ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase.py
>  06e0481 
>   
> ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_client.py
>  f66ea16 
>   
> ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_decommission.py
>  a623927 
>   
> ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_master.py
>  21bd31d 
>   
> ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/hbase_regionserver.py
>  d7c5bf9 
>   
> ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params.py
>  98f0473 
>   
> ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_linux.py
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/params_windows.py
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/service_check.py
>  eea1cd1 
>   
> ambari-server/src/main/resources/common-services/HBASE/0.96.0.2.0/package/scripts/service_mapping.py
>  PRE-CREATION 
>   
> ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HBASE/package/files/draining_servers.rb
>  a3958a6 
>   
> ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HBASE/package/scripts/hbase.py
>  b0a52bb 
>   
> ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HBASE/package/scripts/hbase_client.py
>  bf2aad0 
>   
> ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HBASE/package/scripts/hbase_decommission.py
>  f2a2ad6 
>   
> ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HBASE/package/scripts/hbase_master.py
>  d3720d5 
>   
> ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HBASE/package/scripts/hbase_regionserver.py
>  e4777a4 
>   
> ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HBASE/package/scripts/params.py
>  cd9a74a 
>   
> ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HBASE/package/scripts/service_check.py
>  c12967b 
>   
> ambari-server/src/main/resources/stacks/HDPWIN/2.1/services/HBASE/package/scripts/service_mapping.py
>  186b64e 
> 
> Diff: https://reviews.apache.org/r/32884/diff/
> 
> 
> Testing
> -------
> 
> [INFO] Reactor Summary:
> [INFO]
> [INFO] Ambari Views ...................................... SUCCESS [4.603s]
> [INFO] Ambari Metrics Common ............................. SUCCESS [1.440s]
> [INFO] Ambari Server ..................................... SUCCESS [1:18.444s]
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] 
> ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Artem Baranchuk
> 
>

Reply via email to