You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Dmitro Lisnichenko <dl...@hortonworks.com> on 2015/04/14 18:18:09 UTC

Review Request 33173: RU TODO : Get rid of the UPGRADE_FORCE_DOWNGRADE property

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

Review request for Ambari and Tom Beerbower.


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


Repository: ambari


Description
-------

org.apache.ambari.server.controller.internal.UpgradeResourceProvider
  // TODO : Get rid of the UPGRADE_FORCE_DOWNGRADE property... should use downgrade create directive
  protected static final String UPGRADE_FORCE_DOWNGRADE = "Upgrade/force_downgrade";
  
  
initailly there was an UPGRADE_FORCE_DOWNGRADE property for the upgrade resource. This property would be set to true and passed in the body of a POST to create an upgrade to indicate that the upgrade was really a downgrade. It was suggested that instead of having a property on the resource that it would be better to use a create directive of 'downgrade' in the POST when the resource was first created. When I added the directive, I didn't immediately remove the property since it would have broken the existing users (Ambari UI) of the API. Instead I added the TODO.
Right now the code looks for the directive first and then checks for the property. As long as nobody is still creating the upgrade resource with the UPGRADE_FORCE_DOWNGRADE property, it should be safe to just remove it and the little bit of related code.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java 9c16b10 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java e02b917 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java d2f7f80 
  ambari-web/app/utils/ajax/ajax.js 407a1b7 

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


Testing
-------

mvn clean test


Thanks,

Dmitro Lisnichenko


Re: Review Request 33173: RU TODO : Get rid of the UPGRADE_FORCE_DOWNGRADE property

Posted by Tom Beerbower <tb...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33173/#review80051
-----------------------------------------------------------

Ship it!


Ship It!

- Tom Beerbower


On April 14, 2015, 4:56 p.m., Dmitro Lisnichenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33173/
> -----------------------------------------------------------
> 
> (Updated April 14, 2015, 4:56 p.m.)
> 
> 
> Review request for Ambari and Tom Beerbower.
> 
> 
> Bugs: AMBARI-10466
>     https://issues.apache.org/jira/browse/AMBARI-10466
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> org.apache.ambari.server.controller.internal.UpgradeResourceProvider
>   // TODO : Get rid of the UPGRADE_FORCE_DOWNGRADE property... should use downgrade create directive
>   protected static final String UPGRADE_FORCE_DOWNGRADE = "Upgrade/force_downgrade";
>   
>   
> initailly there was an UPGRADE_FORCE_DOWNGRADE property for the upgrade resource. This property would be set to true and passed in the body of a POST to create an upgrade to indicate that the upgrade was really a downgrade. It was suggested that instead of having a property on the resource that it would be better to use a create directive of 'downgrade' in the POST when the resource was first created. When I added the directive, I didn't immediately remove the property since it would have broken the existing users (Ambari UI) of the API. Instead I added the TODO.
> Right now the code looks for the directive first and then checks for the property. As long as nobody is still creating the upgrade resource with the UPGRADE_FORCE_DOWNGRADE property, it should be safe to just remove it and the little bit of related code.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java 9c16b10 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java e02b917 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java d2f7f80 
>   ambari-web/app/utils/ajax/ajax.js 407a1b7 
> 
> Diff: https://reviews.apache.org/r/33173/diff/
> 
> 
> Testing
> -------
> 
> Results :
> 
> Tests run: 2855, Failures: 0, Errors: 0, Skipped: 16
> 
> 
> Thanks,
> 
> Dmitro Lisnichenko
> 
>


Re: Review Request 33173: RU TODO : Get rid of the UPGRADE_FORCE_DOWNGRADE property

Posted by Dmitro Lisnichenko <dl...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33173/
-----------------------------------------------------------

(Updated April 14, 2015, 4:56 p.m.)


Review request for Ambari and Tom Beerbower.


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


Repository: ambari


Description
-------

org.apache.ambari.server.controller.internal.UpgradeResourceProvider
  // TODO : Get rid of the UPGRADE_FORCE_DOWNGRADE property... should use downgrade create directive
  protected static final String UPGRADE_FORCE_DOWNGRADE = "Upgrade/force_downgrade";
  
  
initailly there was an UPGRADE_FORCE_DOWNGRADE property for the upgrade resource. This property would be set to true and passed in the body of a POST to create an upgrade to indicate that the upgrade was really a downgrade. It was suggested that instead of having a property on the resource that it would be better to use a create directive of 'downgrade' in the POST when the resource was first created. When I added the directive, I didn't immediately remove the property since it would have broken the existing users (Ambari UI) of the API. Instead I added the TODO.
Right now the code looks for the directive first and then checks for the property. As long as nobody is still creating the upgrade resource with the UPGRADE_FORCE_DOWNGRADE property, it should be safe to just remove it and the little bit of related code.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionScheduler.java 9c16b10 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java e02b917 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java d2f7f80 
  ambari-web/app/utils/ajax/ajax.js 407a1b7 

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


Testing (updated)
-------

Results :

Tests run: 2855, Failures: 0, Errors: 0, Skipped: 16


Thanks,

Dmitro Lisnichenko