You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Sid Wagle <sw...@hortonworks.com> on 2015/12/16 23:14:57 UTC

Review Request 41471: Add ability to restart all host components with stale_configs=true with one API request

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

Review request for Ambari, Alejandro Fernandez, Aravindan Vijayan, Dmytro Sen, and Sumit Mohanty.


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


Repository: ambari


Description
-------

Provide ability to filter host components using a predicate that allows bulk ops like RESTART of stale configs with a simple API call.

Example:
{code}
{
  "RequestInfo": {
    "context": "Restart stale",
    "operational_level": "host_component",
    "command": "RESTART"
  },
  "Requests/resource_filters": [
    {
      "hosts_predicate": "HostRoles/stale_configs=true"
    }
  ]
}
{code}

This API call should allow user to perform custom command restart on all host components with stale configurations.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java 44b9a15 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java d79fed4 
  ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/PredicateBuilder.java ccadc43 
  ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java b2a8485 
  ambari-server/src/test/java/org/apache/ambari/server/api/predicate/QueryLexerTest.java 8caa821 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java 9377493 
  ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProviderTest.java 3c72dbf 

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


Testing
-------

Manual testing done.
Unit test passes.


Thanks,

Sid Wagle


Re: Review Request 41471: Add ability to restart all host components with stale_configs=true with one API request

Posted by Sid Wagle <sw...@hortonworks.com>.

> On Dec. 16, 2015, 10:40 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java, line 477
> > <https://reviews.apache.org/r/41471/diff/2/?file=1167091#file1167091line477>
> >
> >     Can the component name be optional?

Yes, it is ok to be null.


> On Dec. 16, 2015, 10:40 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java, line 535
> > <https://reviews.apache.org/r/41471/diff/2/?file=1167091#file1167091line535>
> >
> >     Tuple can be of any length.

Updating.


- Sid


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


On Dec. 16, 2015, 10:21 p.m., Sid Wagle wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41471/
> -----------------------------------------------------------
> 
> (Updated Dec. 16, 2015, 10:21 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Aravindan Vijayan, Dmytro Sen, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-14394
>     https://issues.apache.org/jira/browse/AMBARI-14394
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Provide ability to filter host components using a predicate that allows bulk ops like RESTART of stale configs with a simple API call.
> 
> Example:
> {code}
> {
>   "RequestInfo": {
>     "context": "Restart stale",
>     "operational_level": "host_component",
>     "command": "RESTART"
>   },
>   "Requests/resource_filters": [
>     {
>       "hosts_predicate": "HostRoles/stale_configs=true"
>     }
>   ]
> }
> {code}
> 
> This API call should allow user to perform custom command restart on all host components with stale configurations.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java 44b9a15 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java d79fed4 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/PredicateBuilder.java ccadc43 
>   ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java b2a8485 
>   ambari-server/src/test/java/org/apache/ambari/server/api/predicate/QueryLexerTest.java 8caa821 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java 9377493 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProviderTest.java 3c72dbf 
> 
> Diff: https://reviews.apache.org/r/41471/diff/
> 
> 
> Testing
> -------
> 
> Manual testing done.
> Unit test passes.
> 
> 
> Thanks,
> 
> Sid Wagle
> 
>


Re: Review Request 41471: Add ability to restart all host components with stale_configs=true with one API request

Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41471/#review110775
-----------------------------------------------------------



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java (line 451)
<https://reviews.apache.org/r/41471/#comment170781>

    Can the component name be optional?



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java (line 509)
<https://reviews.apache.org/r/41471/#comment170782>

    Tuple can be of any length.


- Alejandro Fernandez


On Dec. 16, 2015, 10:21 p.m., Sid Wagle wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41471/
> -----------------------------------------------------------
> 
> (Updated Dec. 16, 2015, 10:21 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Aravindan Vijayan, Dmytro Sen, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-14394
>     https://issues.apache.org/jira/browse/AMBARI-14394
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Provide ability to filter host components using a predicate that allows bulk ops like RESTART of stale configs with a simple API call.
> 
> Example:
> {code}
> {
>   "RequestInfo": {
>     "context": "Restart stale",
>     "operational_level": "host_component",
>     "command": "RESTART"
>   },
>   "Requests/resource_filters": [
>     {
>       "hosts_predicate": "HostRoles/stale_configs=true"
>     }
>   ]
> }
> {code}
> 
> This API call should allow user to perform custom command restart on all host components with stale configurations.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java 44b9a15 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java d79fed4 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/PredicateBuilder.java ccadc43 
>   ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java b2a8485 
>   ambari-server/src/test/java/org/apache/ambari/server/api/predicate/QueryLexerTest.java 8caa821 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java 9377493 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProviderTest.java 3c72dbf 
> 
> Diff: https://reviews.apache.org/r/41471/diff/
> 
> 
> Testing
> -------
> 
> Manual testing done.
> Unit test passes.
> 
> 
> Thanks,
> 
> Sid Wagle
> 
>


Re: Review Request 41471: Add ability to restart all host components with stale_configs=true with one API request

Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41471/#review110806
-----------------------------------------------------------

Ship it!


Ship It!

- Alejandro Fernandez


On Dec. 16, 2015, 10:50 p.m., Sid Wagle wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41471/
> -----------------------------------------------------------
> 
> (Updated Dec. 16, 2015, 10:50 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Aravindan Vijayan, Dmytro Sen, and Sumit Mohanty.
> 
> 
> Bugs: AMBARI-14394
>     https://issues.apache.org/jira/browse/AMBARI-14394
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Provide ability to filter host components using a predicate that allows bulk ops like RESTART of stale configs with a simple API call.
> 
> Example:
> {code}
> {
>   "RequestInfo": {
>     "context": "Restart stale",
>     "operational_level": "host_component",
>     "command": "RESTART"
>   },
>   "Requests/resource_filters": [
>     {
>       "hosts_predicate": "HostRoles/stale_configs=true"
>     }
>   ]
> }
> {code}
> 
> This API call should allow user to perform custom command restart on all host components with stale configurations.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java 44b9a15 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java d79fed4 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/PredicateBuilder.java ccadc43 
>   ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java b2a8485 
>   ambari-server/src/test/java/org/apache/ambari/server/api/predicate/QueryLexerTest.java 8caa821 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java 9377493 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProviderTest.java 3c72dbf 
> 
> Diff: https://reviews.apache.org/r/41471/diff/
> 
> 
> Testing
> -------
> 
> Manual testing done.
> Unit test passes.
> 
> 
> Thanks,
> 
> Sid Wagle
> 
>


Re: Review Request 41471: Add ability to restart all host components with stale_configs=true with one API request

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

(Updated Dec. 17, 2015, 2:53 a.m.)


Review request for Ambari, Alejandro Fernandez, Aravindan Vijayan, Dmytro Sen, and Sumit Mohanty.


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


Repository: ambari


Description
-------

Provide ability to filter host components using a predicate that allows bulk ops like RESTART of stale configs with a simple API call.

Example:
{code}
{
  "RequestInfo": {
    "context": "Restart stale",
    "operational_level": "host_component",
    "command": "RESTART"
  },
  "Requests/resource_filters": [
    {
      "hosts_predicate": "HostRoles/stale_configs=true"
    }
  ]
}
{code}

This API call should allow user to perform custom command restart on all host components with stale configurations.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java 44b9a15 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java d79fed4 
  ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/PredicateBuilder.java ccadc43 
  ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java b2a8485 
  ambari-server/src/test/java/org/apache/ambari/server/api/predicate/QueryLexerTest.java 8caa821 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java 9377493 
  ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProviderTest.java 3c72dbf 

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


Testing (updated)
-------

Manual testing done.
Unit test passes.

Results :

Tests run: 3583, Failures: 0, Errors: 0, Skipped: 29


Thanks,

Sid Wagle


Re: Review Request 41471: Add ability to restart all host components with stale_configs=true with one API request

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

(Updated Dec. 16, 2015, 10:50 p.m.)


Review request for Ambari, Alejandro Fernandez, Aravindan Vijayan, Dmytro Sen, and Sumit Mohanty.


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


Repository: ambari


Description
-------

Provide ability to filter host components using a predicate that allows bulk ops like RESTART of stale configs with a simple API call.

Example:
{code}
{
  "RequestInfo": {
    "context": "Restart stale",
    "operational_level": "host_component",
    "command": "RESTART"
  },
  "Requests/resource_filters": [
    {
      "hosts_predicate": "HostRoles/stale_configs=true"
    }
  ]
}
{code}

This API call should allow user to perform custom command restart on all host components with stale configurations.


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java 44b9a15 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java d79fed4 
  ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/PredicateBuilder.java ccadc43 
  ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java b2a8485 
  ambari-server/src/test/java/org/apache/ambari/server/api/predicate/QueryLexerTest.java 8caa821 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java 9377493 
  ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProviderTest.java 3c72dbf 

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


Testing
-------

Manual testing done.
Unit test passes.


Thanks,

Sid Wagle


Re: Review Request 41471: Add ability to restart all host components with stale_configs=true with one API request

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

(Updated Dec. 16, 2015, 10:21 p.m.)


Review request for Ambari, Alejandro Fernandez, Aravindan Vijayan, Dmytro Sen, and Sumit Mohanty.


Changes
-------

Removed a method never called.


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


Repository: ambari


Description
-------

Provide ability to filter host components using a predicate that allows bulk ops like RESTART of stale configs with a simple API call.

Example:
{code}
{
  "RequestInfo": {
    "context": "Restart stale",
    "operational_level": "host_component",
    "command": "RESTART"
  },
  "Requests/resource_filters": [
    {
      "hosts_predicate": "HostRoles/stale_configs=true"
    }
  ]
}
{code}

This API call should allow user to perform custom command restart on all host components with stale configurations.


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java 44b9a15 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java d79fed4 
  ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/PredicateBuilder.java ccadc43 
  ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java b2a8485 
  ambari-server/src/test/java/org/apache/ambari/server/api/predicate/QueryLexerTest.java 8caa821 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java 9377493 
  ambari-server/src/test/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProviderTest.java 3c72dbf 

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


Testing
-------

Manual testing done.
Unit test passes.


Thanks,

Sid Wagle