You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by Verdan Mahmood <ve...@gmail.com> on 2020/12/14 21:12:34 UTC

Review Request 73085: [ATLAS-4080] : Implements the admin metrics endpoint for Python Client

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

Review request for atlas, Madhan Neethiraj, Pinal Shah, and Sarath Subramanian.


Repository: atlas


Description
-------

This review request implements the admin metrics endpoint, and also bumps the version of python client to "0.0.3"

**Usage:**

from apache_atlas.client.base_client import AtlasClient

client = AtlasClient('http://localhost:21000', ('admin', 'admin'))

client.admin.get_metrics()


Diffs
-----

  intg/src/main/python/apache_atlas/client/admin.py PRE-CREATION 
  intg/src/main/python/apache_atlas/client/base_client.py 3e6002db8cc40530e6deef182114bdc176d6c7ef 
  intg/src/main/python/apache_atlas/model/metrics.py 636a3ea265cf6f216ed8b653d594652ac35de35a 
  intg/src/main/python/setup.py ed33ebefc84acde17b75c109bc3b797b4499d124 


Diff: https://reviews.apache.org/r/73085/diff/1/


Testing
-------


Thanks,

Verdan Mahmood


Re: Review Request 73085: [ATLAS-4080] : Implements the admin metrics endpoint for Python Client

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73085/#review222344
-----------------------------------------------------------


Ship it!




Ship It!

- Madhan Neethiraj


On Dec. 15, 2020, 12:19 p.m., Verdan Mahmood wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73085/
> -----------------------------------------------------------
> 
> (Updated Dec. 15, 2020, 12:19 p.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj, Pinal Shah, and Sarath Subramanian.
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> This review request implements the admin metrics endpoint, and also bumps the version of python client to "0.0.3"
> 
> **Usage:**
> 
> from apache_atlas.client.base_client import AtlasClient
> 
> client = AtlasClient('http://localhost:21000', ('admin', 'admin'))
> 
> client.admin.get_metrics()
> 
> 
> Diffs
> -----
> 
>   intg/src/main/python/apache_atlas/client/base_client.py 3e6002db8cc40530e6deef182114bdc176d6c7ef 
>   intg/src/main/python/apache_atlas/model/admin.py PRE-CREATION 
>   intg/src/main/python/apache_atlas/model/metrics.py 636a3ea265cf6f216ed8b653d594652ac35de35a 
>   intg/src/main/python/setup.py ed33ebefc84acde17b75c109bc3b797b4499d124 
> 
> 
> Diff: https://reviews.apache.org/r/73085/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Verdan Mahmood
> 
>


Re: Review Request 73085: [ATLAS-4080] : Implements the admin metrics endpoint for Python Client

Posted by Verdan Mahmood <ve...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73085/
-----------------------------------------------------------

(Updated Dec. 15, 2020, 12:19 p.m.)


Review request for atlas, Madhan Neethiraj, Pinal Shah, and Sarath Subramanian.


Changes
-------

Adds a new attribute for Admin metrics to support the system metrics.


Repository: atlas


Description
-------

This review request implements the admin metrics endpoint, and also bumps the version of python client to "0.0.3"

**Usage:**

from apache_atlas.client.base_client import AtlasClient

client = AtlasClient('http://localhost:21000', ('admin', 'admin'))

client.admin.get_metrics()


Diffs (updated)
-----

  intg/src/main/python/apache_atlas/client/base_client.py 3e6002db8cc40530e6deef182114bdc176d6c7ef 
  intg/src/main/python/apache_atlas/model/admin.py PRE-CREATION 
  intg/src/main/python/apache_atlas/model/metrics.py 636a3ea265cf6f216ed8b653d594652ac35de35a 
  intg/src/main/python/setup.py ed33ebefc84acde17b75c109bc3b797b4499d124 


Diff: https://reviews.apache.org/r/73085/diff/2/

Changes: https://reviews.apache.org/r/73085/diff/1-2/


Testing
-------


Thanks,

Verdan Mahmood


Re: Review Request 73085: [ATLAS-4080] : Implements the admin metrics endpoint for Python Client

Posted by Verdan Mahmood <ve...@gmail.com>.

> On Dec. 14, 2020, 11:27 p.m., Madhan Neethiraj wrote:
> > intg/src/main/python/apache_atlas/model/metrics.py
> > Lines 29 (patched)
> > <https://reviews.apache.org/r/73085/diff/1/?file=2243495#file2243495line29>
> >
> >     I suggest to retain self.data as well, since the metrics API sends additional keys - like system.
> >       self.data    = attrs.get('data', {})
> >       self.general = self.data.get('general', {})
> >       self.tag     = self.data.get('tag', {})
> >       self.entity  = self.data.get('entity', {})

I have added a separate attribute `self.system` instead of adding the complete data. Reason being: if I add data, that would duplicate the whole data + attribute values. Secondly, it will be eficient to write test cases with separate attributes instead of using `data` only.


- Verdan


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


On Dec. 15, 2020, 12:19 p.m., Verdan Mahmood wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73085/
> -----------------------------------------------------------
> 
> (Updated Dec. 15, 2020, 12:19 p.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj, Pinal Shah, and Sarath Subramanian.
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> This review request implements the admin metrics endpoint, and also bumps the version of python client to "0.0.3"
> 
> **Usage:**
> 
> from apache_atlas.client.base_client import AtlasClient
> 
> client = AtlasClient('http://localhost:21000', ('admin', 'admin'))
> 
> client.admin.get_metrics()
> 
> 
> Diffs
> -----
> 
>   intg/src/main/python/apache_atlas/client/base_client.py 3e6002db8cc40530e6deef182114bdc176d6c7ef 
>   intg/src/main/python/apache_atlas/model/admin.py PRE-CREATION 
>   intg/src/main/python/apache_atlas/model/metrics.py 636a3ea265cf6f216ed8b653d594652ac35de35a 
>   intg/src/main/python/setup.py ed33ebefc84acde17b75c109bc3b797b4499d124 
> 
> 
> Diff: https://reviews.apache.org/r/73085/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Verdan Mahmood
> 
>


Re: Review Request 73085: [ATLAS-4080] : Implements the admin metrics endpoint for Python Client

Posted by Madhan Neethiraj <ma...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/73085/#review222336
-----------------------------------------------------------




intg/src/main/python/apache_atlas/model/metrics.py
Lines 29 (patched)
<https://reviews.apache.org/r/73085/#comment311401>

    I suggest to retain self.data as well, since the metrics API sends additional keys - like system.
      self.data    = attrs.get('data', {})
      self.general = self.data.get('general', {})
      self.tag     = self.data.get('tag', {})
      self.entity  = self.data.get('entity', {})


- Madhan Neethiraj


On Dec. 14, 2020, 9:12 p.m., Verdan Mahmood wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/73085/
> -----------------------------------------------------------
> 
> (Updated Dec. 14, 2020, 9:12 p.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj, Pinal Shah, and Sarath Subramanian.
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> This review request implements the admin metrics endpoint, and also bumps the version of python client to "0.0.3"
> 
> **Usage:**
> 
> from apache_atlas.client.base_client import AtlasClient
> 
> client = AtlasClient('http://localhost:21000', ('admin', 'admin'))
> 
> client.admin.get_metrics()
> 
> 
> Diffs
> -----
> 
>   intg/src/main/python/apache_atlas/client/admin.py PRE-CREATION 
>   intg/src/main/python/apache_atlas/client/base_client.py 3e6002db8cc40530e6deef182114bdc176d6c7ef 
>   intg/src/main/python/apache_atlas/model/metrics.py 636a3ea265cf6f216ed8b653d594652ac35de35a 
>   intg/src/main/python/setup.py ed33ebefc84acde17b75c109bc3b797b4499d124 
> 
> 
> Diff: https://reviews.apache.org/r/73085/diff/1/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Verdan Mahmood
> 
>