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/05/07 02:45:12 UTC

Review Request 33923: Error loading deferred resources when making metric API requests with null padding

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

Review request for Ambari, Alejandro Fernandez, Mahadev Konar, Sumit Mohanty, and Tom Beerbower.


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


Repository: ambari


Description
-------

If I add &params/padding=nulls to the metrics API request

/api/v1/clusters/c1/hosts/c6401.ambari.apache.org/host_components/NAMENODE?fields=metrics/cpu/cpu_system[1430833471,1430837071,15],metrics/cpu/cpu_user[1430833471,1430837071,15],metrics/cpu/cpu_nice[1430833471,1430837071,15],metrics/cpu/cpu_idle[1430833471,1430837071,15],metrics/cpu/cpu_wio[1430833471,1430837071,15],metrics/memory/mem_total[1430833471,1430837071,15],metrics/memory/mem_free[1430833471,1430837071,15],metrics/memory/mem_cached[1430833471,1430837071,15]&params/padding=nulls

fails:

{
  "status" : 500,
  "message" : "org.apache.ambari.server.controller.spi.SystemException: Error loading deferred resources"
}


Diffs
-----

  ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java e27d9a9 
  ambari-server/src/main/java/org/apache/ambari/server/api/query/render/MetricsPaddingRenderer.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/api/resources/BaseResourceDefinition.java e63f7eb 
  ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsDownsamplingMethodFactory.java a53e26d 
  ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPropertyProvider.java 8360f5e 
  ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPropertyProviderProxy.java 24f1851 
  ambari-server/src/test/java/org/apache/ambari/server/api/query/render/MetricsPaddingRendererTest.java PRE-CREATION 

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


Testing
-------

Manually verified.
Related unit tests: ClusterControllerImplTest, All Renderer tests pass.


Thanks,

Sid Wagle


Re: Review Request 33923: Error loading deferred resources when making metric API requests with null padding

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

> On May 7, 2015, 1:26 p.m., Tom Beerbower wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPropertyProviderProxy.java, lines 87-95
> > <https://reviews.apache.org/r/33923/diff/2/?file=951820#file951820line87>
> >
> >     This is good but a little unfortunate that it's required.  
> >     
> >     It's a little hacky to pass the padding info through a property id since we aren't really requesting a property of that name.  
> >     
> >     It would have been nice if the renderer had a way to set a request info property through finalizeProperties().  Then we wouldn't have to worry about this check and you could simply get the padding info through Request.getRequestInfoProperties().
> >     
> >     I think that way would be cleaner but might require a change to the Renderer interface and updates to all the existing Renderer impls.
> >     
> >     Up to you... if you want to give it a shot.  Otherwise this approach is fine.

Agree with you on doing this through requestInfoProperties. I haven't made those changes for the sake of getting this patch in lieu of time contraints.


> On May 7, 2015, 1:26 p.m., Tom Beerbower wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/api/resources/BaseResourceDefinition.java, line 129
> > <https://reviews.apache.org/r/33923/diff/2/?file=951817#file951817line129>
> >
> >     Might want to be explicit here and have two cases (null_padding and no_padding).  Otherwise if someone adds another renderer that happens to contain the word '_padding', they will have to come and change this code.  They might not even realize this is here if they aren't adding the renderer to the BaseResourceDefinition.

Made these changes.


- Sid


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


On May 7, 2015, 5:35 p.m., Sid Wagle wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33923/
> -----------------------------------------------------------
> 
> (Updated May 7, 2015, 5:35 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Mahadev Konar, Sumit Mohanty, and Tom Beerbower.
> 
> 
> Bugs: AMBARI-10987
>     https://issues.apache.org/jira/browse/AMBARI-10987
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> If I add &params/padding=nulls to the metrics API request
> 
> /api/v1/clusters/c1/hosts/c6401.ambari.apache.org/host_components/NAMENODE?fields=metrics/cpu/cpu_system[1430833471,1430837071,15],metrics/cpu/cpu_user[1430833471,1430837071,15],metrics/cpu/cpu_nice[1430833471,1430837071,15],metrics/cpu/cpu_idle[1430833471,1430837071,15],metrics/cpu/cpu_wio[1430833471,1430837071,15],metrics/memory/mem_total[1430833471,1430837071,15],metrics/memory/mem_free[1430833471,1430837071,15],metrics/memory/mem_cached[1430833471,1430837071,15]&params/padding=nulls
> 
> fails:
> 
> {
>   "status" : 500,
>   "message" : "org.apache.ambari.server.controller.spi.SystemException: Error loading deferred resources"
> }
> 
> 
> Diffs
> -----
> 
>   ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java e27d9a9 
>   ambari-server/src/main/java/org/apache/ambari/server/api/query/render/MetricsPaddingRenderer.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/BaseResourceDefinition.java e63f7eb 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsDownsamplingMethodFactory.java a53e26d 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPropertyProvider.java 8360f5e 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPropertyProviderProxy.java 24f1851 
>   ambari-server/src/test/java/org/apache/ambari/server/api/query/render/MetricsPaddingRendererTest.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/33923/diff/
> 
> 
> Testing
> -------
> 
> Manually verified.
> Related unit tests: ClusterControllerImplTest, All Renderer tests pass.
> 
> 
> Thanks,
> 
> Sid Wagle
> 
>


Re: Review Request 33923: Error loading deferred resources when making metric API requests with null padding

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

Ship it!


Looks good.  A couple comments ...


ambari-server/src/main/java/org/apache/ambari/server/api/resources/BaseResourceDefinition.java
<https://reviews.apache.org/r/33923/#comment133649>

    Might want to be explicit here and have two cases (null_padding and no_padding).  Otherwise if someone adds another renderer that happens to contain the word '_padding', they will have to come and change this code.  They might not even realize this is here if they aren't adding the renderer to the BaseResourceDefinition.



ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPropertyProviderProxy.java
<https://reviews.apache.org/r/33923/#comment133650>

    This is good but a little unfortunate that it's required.  
    
    It's a little hacky to pass the padding info through a property id since we aren't really requesting a property of that name.  
    
    It would have been nice if the renderer had a way to set a request info property through finalizeProperties().  Then we wouldn't have to worry about this check and you could simply get the padding info through Request.getRequestInfoProperties().
    
    I think that way would be cleaner but might require a change to the Renderer interface and updates to all the existing Renderer impls.
    
    Up to you... if you want to give it a shot.  Otherwise this approach is fine.


- Tom Beerbower


On May 7, 2015, 12:48 a.m., Sid Wagle wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33923/
> -----------------------------------------------------------
> 
> (Updated May 7, 2015, 12:48 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Mahadev Konar, Sumit Mohanty, and Tom Beerbower.
> 
> 
> Bugs: AMBARI-10987
>     https://issues.apache.org/jira/browse/AMBARI-10987
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> If I add &params/padding=nulls to the metrics API request
> 
> /api/v1/clusters/c1/hosts/c6401.ambari.apache.org/host_components/NAMENODE?fields=metrics/cpu/cpu_system[1430833471,1430837071,15],metrics/cpu/cpu_user[1430833471,1430837071,15],metrics/cpu/cpu_nice[1430833471,1430837071,15],metrics/cpu/cpu_idle[1430833471,1430837071,15],metrics/cpu/cpu_wio[1430833471,1430837071,15],metrics/memory/mem_total[1430833471,1430837071,15],metrics/memory/mem_free[1430833471,1430837071,15],metrics/memory/mem_cached[1430833471,1430837071,15]&params/padding=nulls
> 
> fails:
> 
> {
>   "status" : 500,
>   "message" : "org.apache.ambari.server.controller.spi.SystemException: Error loading deferred resources"
> }
> 
> 
> Diffs
> -----
> 
>   ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java e27d9a9 
>   ambari-server/src/main/java/org/apache/ambari/server/api/query/render/MetricsPaddingRenderer.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/BaseResourceDefinition.java e63f7eb 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsDownsamplingMethodFactory.java a53e26d 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPropertyProvider.java 8360f5e 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPropertyProviderProxy.java 24f1851 
>   ambari-server/src/test/java/org/apache/ambari/server/api/query/render/MetricsPaddingRendererTest.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/33923/diff/
> 
> 
> Testing
> -------
> 
> Manually verified.
> Related unit tests: ClusterControllerImplTest, All Renderer tests pass.
> 
> 
> Thanks,
> 
> Sid Wagle
> 
>


Re: Review Request 33923: Error loading deferred resources when making metric API requests with null padding

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

Ship it!


Ship It!

- Alejandro Fernandez


On May 12, 2015, 11:14 p.m., Sid Wagle wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33923/
> -----------------------------------------------------------
> 
> (Updated May 12, 2015, 11:14 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Mahadev Konar, Sumit Mohanty, and Tom Beerbower.
> 
> 
> Bugs: AMBARI-10987
>     https://issues.apache.org/jira/browse/AMBARI-10987
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> If I add &params/padding=nulls to the metrics API request
> 
> /api/v1/clusters/c1/hosts/c6401.ambari.apache.org/host_components/NAMENODE?fields=metrics/cpu/cpu_system[1430833471,1430837071,15],metrics/cpu/cpu_user[1430833471,1430837071,15],metrics/cpu/cpu_nice[1430833471,1430837071,15],metrics/cpu/cpu_idle[1430833471,1430837071,15],metrics/cpu/cpu_wio[1430833471,1430837071,15],metrics/memory/mem_total[1430833471,1430837071,15],metrics/memory/mem_free[1430833471,1430837071,15],metrics/memory/mem_cached[1430833471,1430837071,15]&params/padding=nulls
> 
> fails:
> 
> {
>   "status" : 500,
>   "message" : "org.apache.ambari.server.controller.spi.SystemException: Error loading deferred resources"
> }
> 
> 
> Diffs
> -----
> 
>   ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java e27d9a9 
>   ambari-server/src/main/java/org/apache/ambari/server/api/query/render/MetricsPaddingRenderer.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/BaseResourceDefinition.java e63f7eb 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsDownsamplingMethodFactory.java a53e26d 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPropertyProvider.java 8360f5e 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPropertyProviderProxy.java 24f1851 
>   ambari-server/src/test/java/org/apache/ambari/server/api/query/render/MetricsPaddingRendererTest.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/33923/diff/
> 
> 
> Testing
> -------
> 
> Manually verified.
> Related unit tests: ClusterControllerImplTest, All Renderer tests pass.
> 
> 
> File Attachments
> ----------------
> 
> Fix for NPE.
>   https://reviews.apache.org/media/uploaded/files/2015/05/12/b6c883ff-daa8-4769-ad56-674b4ee1ff5f__AMBARI-10987-1.patch
> 
> 
> Thanks,
> 
> Sid Wagle
> 
>


Re: Review Request 33923: Error loading deferred resources when making metric API requests with null padding

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

(Updated May 12, 2015, 11:14 p.m.)


Review request for Ambari, Alejandro Fernandez, Mahadev Konar, Sumit Mohanty, and Tom Beerbower.


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


Repository: ambari


Description
-------

If I add &params/padding=nulls to the metrics API request

/api/v1/clusters/c1/hosts/c6401.ambari.apache.org/host_components/NAMENODE?fields=metrics/cpu/cpu_system[1430833471,1430837071,15],metrics/cpu/cpu_user[1430833471,1430837071,15],metrics/cpu/cpu_nice[1430833471,1430837071,15],metrics/cpu/cpu_idle[1430833471,1430837071,15],metrics/cpu/cpu_wio[1430833471,1430837071,15],metrics/memory/mem_total[1430833471,1430837071,15],metrics/memory/mem_free[1430833471,1430837071,15],metrics/memory/mem_cached[1430833471,1430837071,15]&params/padding=nulls

fails:

{
  "status" : 500,
  "message" : "org.apache.ambari.server.controller.spi.SystemException: Error loading deferred resources"
}


Diffs
-----

  ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java e27d9a9 
  ambari-server/src/main/java/org/apache/ambari/server/api/query/render/MetricsPaddingRenderer.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/api/resources/BaseResourceDefinition.java e63f7eb 
  ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsDownsamplingMethodFactory.java a53e26d 
  ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPropertyProvider.java 8360f5e 
  ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPropertyProviderProxy.java 24f1851 
  ambari-server/src/test/java/org/apache/ambari/server/api/query/render/MetricsPaddingRendererTest.java PRE-CREATION 

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


Testing
-------

Manually verified.
Related unit tests: ClusterControllerImplTest, All Renderer tests pass.


File Attachments (updated)
----------------

Fix for NPE.
  https://reviews.apache.org/media/uploaded/files/2015/05/12/b6c883ff-daa8-4769-ad56-674b4ee1ff5f__AMBARI-10987-1.patch


Thanks,

Sid Wagle


Re: Review Request 33923: Error loading deferred resources when making metric API requests with null padding

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

(Updated May 7, 2015, 5:35 p.m.)


Review request for Ambari, Alejandro Fernandez, Mahadev Konar, Sumit Mohanty, and Tom Beerbower.


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


Repository: ambari


Description
-------

If I add &params/padding=nulls to the metrics API request

/api/v1/clusters/c1/hosts/c6401.ambari.apache.org/host_components/NAMENODE?fields=metrics/cpu/cpu_system[1430833471,1430837071,15],metrics/cpu/cpu_user[1430833471,1430837071,15],metrics/cpu/cpu_nice[1430833471,1430837071,15],metrics/cpu/cpu_idle[1430833471,1430837071,15],metrics/cpu/cpu_wio[1430833471,1430837071,15],metrics/memory/mem_total[1430833471,1430837071,15],metrics/memory/mem_free[1430833471,1430837071,15],metrics/memory/mem_cached[1430833471,1430837071,15]&params/padding=nulls

fails:

{
  "status" : 500,
  "message" : "org.apache.ambari.server.controller.spi.SystemException: Error loading deferred resources"
}


Diffs (updated)
-----

  ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java e27d9a9 
  ambari-server/src/main/java/org/apache/ambari/server/api/query/render/MetricsPaddingRenderer.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/api/resources/BaseResourceDefinition.java e63f7eb 
  ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsDownsamplingMethodFactory.java a53e26d 
  ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPropertyProvider.java 8360f5e 
  ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPropertyProviderProxy.java 24f1851 
  ambari-server/src/test/java/org/apache/ambari/server/api/query/render/MetricsPaddingRendererTest.java PRE-CREATION 

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


Testing
-------

Manually verified.
Related unit tests: ClusterControllerImplTest, All Renderer tests pass.


Thanks,

Sid Wagle


Re: Review Request 33923: Error loading deferred resources when making metric API requests with null padding

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

Ship it!


Ship It!

- Alejandro Fernandez


On May 7, 2015, 12:48 a.m., Sid Wagle wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33923/
> -----------------------------------------------------------
> 
> (Updated May 7, 2015, 12:48 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Mahadev Konar, Sumit Mohanty, and Tom Beerbower.
> 
> 
> Bugs: AMBARI-10987
>     https://issues.apache.org/jira/browse/AMBARI-10987
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> If I add &params/padding=nulls to the metrics API request
> 
> /api/v1/clusters/c1/hosts/c6401.ambari.apache.org/host_components/NAMENODE?fields=metrics/cpu/cpu_system[1430833471,1430837071,15],metrics/cpu/cpu_user[1430833471,1430837071,15],metrics/cpu/cpu_nice[1430833471,1430837071,15],metrics/cpu/cpu_idle[1430833471,1430837071,15],metrics/cpu/cpu_wio[1430833471,1430837071,15],metrics/memory/mem_total[1430833471,1430837071,15],metrics/memory/mem_free[1430833471,1430837071,15],metrics/memory/mem_cached[1430833471,1430837071,15]&params/padding=nulls
> 
> fails:
> 
> {
>   "status" : 500,
>   "message" : "org.apache.ambari.server.controller.spi.SystemException: Error loading deferred resources"
> }
> 
> 
> Diffs
> -----
> 
>   ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java e27d9a9 
>   ambari-server/src/main/java/org/apache/ambari/server/api/query/render/MetricsPaddingRenderer.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/BaseResourceDefinition.java e63f7eb 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsDownsamplingMethodFactory.java a53e26d 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPropertyProvider.java 8360f5e 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPropertyProviderProxy.java 24f1851 
>   ambari-server/src/test/java/org/apache/ambari/server/api/query/render/MetricsPaddingRendererTest.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/33923/diff/
> 
> 
> Testing
> -------
> 
> Manually verified.
> Related unit tests: ClusterControllerImplTest, All Renderer tests pass.
> 
> 
> Thanks,
> 
> Sid Wagle
> 
>


Re: Review Request 33923: Error loading deferred resources when making metric API requests with null padding

Posted by Sumit Mohanty <sm...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/33923/#review82782
-----------------------------------------------------------

Ship it!


Ship It!

- Sumit Mohanty


On May 7, 2015, 12:48 a.m., Sid Wagle wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/33923/
> -----------------------------------------------------------
> 
> (Updated May 7, 2015, 12:48 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Mahadev Konar, Sumit Mohanty, and Tom Beerbower.
> 
> 
> Bugs: AMBARI-10987
>     https://issues.apache.org/jira/browse/AMBARI-10987
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> If I add &params/padding=nulls to the metrics API request
> 
> /api/v1/clusters/c1/hosts/c6401.ambari.apache.org/host_components/NAMENODE?fields=metrics/cpu/cpu_system[1430833471,1430837071,15],metrics/cpu/cpu_user[1430833471,1430837071,15],metrics/cpu/cpu_nice[1430833471,1430837071,15],metrics/cpu/cpu_idle[1430833471,1430837071,15],metrics/cpu/cpu_wio[1430833471,1430837071,15],metrics/memory/mem_total[1430833471,1430837071,15],metrics/memory/mem_free[1430833471,1430837071,15],metrics/memory/mem_cached[1430833471,1430837071,15]&params/padding=nulls
> 
> fails:
> 
> {
>   "status" : 500,
>   "message" : "org.apache.ambari.server.controller.spi.SystemException: Error loading deferred resources"
> }
> 
> 
> Diffs
> -----
> 
>   ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java e27d9a9 
>   ambari-server/src/main/java/org/apache/ambari/server/api/query/render/MetricsPaddingRenderer.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/BaseResourceDefinition.java e63f7eb 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsDownsamplingMethodFactory.java a53e26d 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPropertyProvider.java 8360f5e 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPropertyProviderProxy.java 24f1851 
>   ambari-server/src/test/java/org/apache/ambari/server/api/query/render/MetricsPaddingRendererTest.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/33923/diff/
> 
> 
> Testing
> -------
> 
> Manually verified.
> Related unit tests: ClusterControllerImplTest, All Renderer tests pass.
> 
> 
> Thanks,
> 
> Sid Wagle
> 
>


Re: Review Request 33923: Error loading deferred resources when making metric API requests with null padding

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

(Updated May 7, 2015, 12:48 a.m.)


Review request for Ambari, Alejandro Fernandez, Mahadev Konar, Sumit Mohanty, and Tom Beerbower.


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


Repository: ambari


Description
-------

If I add &params/padding=nulls to the metrics API request

/api/v1/clusters/c1/hosts/c6401.ambari.apache.org/host_components/NAMENODE?fields=metrics/cpu/cpu_system[1430833471,1430837071,15],metrics/cpu/cpu_user[1430833471,1430837071,15],metrics/cpu/cpu_nice[1430833471,1430837071,15],metrics/cpu/cpu_idle[1430833471,1430837071,15],metrics/cpu/cpu_wio[1430833471,1430837071,15],metrics/memory/mem_total[1430833471,1430837071,15],metrics/memory/mem_free[1430833471,1430837071,15],metrics/memory/mem_cached[1430833471,1430837071,15]&params/padding=nulls

fails:

{
  "status" : 500,
  "message" : "org.apache.ambari.server.controller.spi.SystemException: Error loading deferred resources"
}


Diffs (updated)
-----

  ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/PhoenixHBaseAccessor.java e27d9a9 
  ambari-server/src/main/java/org/apache/ambari/server/api/query/render/MetricsPaddingRenderer.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/api/resources/BaseResourceDefinition.java e63f7eb 
  ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsDownsamplingMethodFactory.java a53e26d 
  ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPropertyProvider.java 8360f5e 
  ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/MetricsPropertyProviderProxy.java 24f1851 
  ambari-server/src/test/java/org/apache/ambari/server/api/query/render/MetricsPaddingRendererTest.java PRE-CREATION 

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


Testing
-------

Manually verified.
Related unit tests: ClusterControllerImplTest, All Renderer tests pass.


Thanks,

Sid Wagle