Re: Review Request 51514: [ATLAS-1144] Create/update entity API call should return more definitions

2016-08-30 Thread Vimal Sharma

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




webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java (line 
186)


It would make sense to add the first entity definition to definitionList



webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java (line 
203)


Entity definition of first entity will get repeated since the first one has 
already been added in DEFINITION


- Vimal Sharma


On Aug. 30, 2016, 6:32 a.m., Apoorv Naik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51514/
> ---
> 
> (Updated Aug. 30, 2016, 6:32 a.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj and Suma Shivaprasad.
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> The bug states that the API response only shows one entity definition in the 
> response of an update/create call wherease the expectation seems to be of 
> getting the entire list of the entities that were created/updated.
> 
> The fix adds the required capability by the means of a query parameter 
> responseType with the value as "full", if the API call is made with this 
> extra parameter, the response would contain an additional field called 
> "definitionList" which is of type JsonArray. If the parameter is unspecified, 
> the API response remains unaffected.
> 
> 
> Diffs
> -
> 
>   webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java 
> 82016d0 
> 
> Diff: https://reviews.apache.org/r/51514/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>



Re: Review Request 51514: [ATLAS-1144] Create/update entity API call should return more definitions

2016-08-30 Thread Vimal Sharma


> On Aug. 30, 2016, 7:02 a.m., Vimal Sharma wrote:
> >

Please generate the patch from atlas repo root. This patch is not applying 
successfully since it has been created from inside webapp directory.


- Vimal


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


On Aug. 30, 2016, 6:32 a.m., Apoorv Naik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51514/
> ---
> 
> (Updated Aug. 30, 2016, 6:32 a.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj and Suma Shivaprasad.
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> The bug states that the API response only shows one entity definition in the 
> response of an update/create call wherease the expectation seems to be of 
> getting the entire list of the entities that were created/updated.
> 
> The fix adds the required capability by the means of a query parameter 
> responseType with the value as "full", if the API call is made with this 
> extra parameter, the response would contain an additional field called 
> "definitionList" which is of type JsonArray. If the parameter is unspecified, 
> the API response remains unaffected.
> 
> 
> Diffs
> -
> 
>   webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java 
> 82016d0 
> 
> Diff: https://reviews.apache.org/r/51514/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>



Re: Review Request 51514: [ATLAS-1144] Create/update entity API call should return more definitions

2016-08-30 Thread Apoorv Naik

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

(Updated Aug. 30, 2016, 3:44 p.m.)


Review request for atlas, Madhan Neethiraj and Suma Shivaprasad.


Repository: atlas


Description
---

The bug states that the API response only shows one entity definition in the 
response of an update/create call wherease the expectation seems to be of 
getting the entire list of the entities that were created/updated.

The fix adds the required capability by the means of a query parameter 
responseType with the value as "full", if the API call is made with this extra 
parameter, the response would contain an additional field called 
"definitionList" which is of type JsonArray. If the parameter is unspecified, 
the API response remains unaffected.


Diffs (updated)
-

  webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java 
82016d0 

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


Testing
---


Thanks,

Apoorv Naik



Re: Review Request 51514: [ATLAS-1144] Create/update entity API call should return more definitions

2016-08-30 Thread Apoorv Naik


> On Aug. 30, 2016, 7:02 a.m., Vimal Sharma wrote:
> >
> 
> Vimal Sharma wrote:
> Please generate the patch from atlas repo root. This patch is not 
> applying successfully since it has been created from inside webapp directory.

Generated the new patch from the Atlas root repo.


> On Aug. 30, 2016, 7:02 a.m., Vimal Sharma wrote:
> > webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java, 
> > line 186
> > 
> >
> > It would make sense to add the first entity definition to definitionList

The reason we're duplicating the entity definition is to maintain backward 
compatibility and make sure that any existing code doesn't break because of 
this.


> On Aug. 30, 2016, 7:02 a.m., Vimal Sharma wrote:
> > webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java, 
> > line 203
> > 
> >
> > Entity definition of first entity will get repeated since the first one 
> > has already been added in DEFINITION

Same as above


- Apoorv


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


On Aug. 30, 2016, 3:44 p.m., Apoorv Naik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51514/
> ---
> 
> (Updated Aug. 30, 2016, 3:44 p.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj and Suma Shivaprasad.
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> The bug states that the API response only shows one entity definition in the 
> response of an update/create call wherease the expectation seems to be of 
> getting the entire list of the entities that were created/updated.
> 
> The fix adds the required capability by the means of a query parameter 
> responseType with the value as "full", if the API call is made with this 
> extra parameter, the response would contain an additional field called 
> "definitionList" which is of type JsonArray. If the parameter is unspecified, 
> the API response remains unaffected.
> 
> 
> Diffs
> -
> 
>   webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java 
> 82016d0 
> 
> Diff: https://reviews.apache.org/r/51514/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>



Re: Review Request 51514: [ATLAS-1144] Create/update entity API call should return more definitions

2016-08-30 Thread Vimal Sharma

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


Ship it!




- Vimal Sharma


On Aug. 30, 2016, 3:44 p.m., Apoorv Naik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51514/
> ---
> 
> (Updated Aug. 30, 2016, 3:44 p.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj and Suma Shivaprasad.
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> The bug states that the API response only shows one entity definition in the 
> response of an update/create call wherease the expectation seems to be of 
> getting the entire list of the entities that were created/updated.
> 
> The fix adds the required capability by the means of a query parameter 
> responseType with the value as "full", if the API call is made with this 
> extra parameter, the response would contain an additional field called 
> "definitionList" which is of type JsonArray. If the parameter is unspecified, 
> the API response remains unaffected.
> 
> 
> Diffs
> -
> 
>   webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java 
> 82016d0 
> 
> Diff: https://reviews.apache.org/r/51514/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>



Re: Review Request 51514: [ATLAS-1144] Create/update entity API call should return more definitions

2016-08-30 Thread Madhan Neethiraj

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




webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java (line 
197)


Does every request have its own 'uriInfo' object? If not, how does this 
method differentiate requests that include "responseType" query parameter from 
the ones that don't?


- Madhan Neethiraj


On Aug. 30, 2016, 3:44 p.m., Apoorv Naik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51514/
> ---
> 
> (Updated Aug. 30, 2016, 3:44 p.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj and Suma Shivaprasad.
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> The bug states that the API response only shows one entity definition in the 
> response of an update/create call wherease the expectation seems to be of 
> getting the entire list of the entities that were created/updated.
> 
> The fix adds the required capability by the means of a query parameter 
> responseType with the value as "full", if the API call is made with this 
> extra parameter, the response would contain an additional field called 
> "definitionList" which is of type JsonArray. If the parameter is unspecified, 
> the API response remains unaffected.
> 
> 
> Diffs
> -
> 
>   webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java 
> 82016d0 
> 
> Diff: https://reviews.apache.org/r/51514/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>



Re: Review Request 51514: [ATLAS-1144] Create/update entity API call should return more definitions

2016-08-30 Thread Apoorv Naik


> On Aug. 31, 2016, 5:22 a.m., Madhan Neethiraj wrote:
> > webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java, 
> > line 197
> > 
> >
> > Does every request have its own 'uriInfo' object? If not, how does this 
> > method differentiate requests that include "responseType" query parameter 
> > from the ones that don't?

Yes, every request has it's own UriInfo object.


- Apoorv


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


On Aug. 30, 2016, 3:44 p.m., Apoorv Naik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51514/
> ---
> 
> (Updated Aug. 30, 2016, 3:44 p.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj and Suma Shivaprasad.
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> The bug states that the API response only shows one entity definition in the 
> response of an update/create call wherease the expectation seems to be of 
> getting the entire list of the entities that were created/updated.
> 
> The fix adds the required capability by the means of a query parameter 
> responseType with the value as "full", if the API call is made with this 
> extra parameter, the response would contain an additional field called 
> "definitionList" which is of type JsonArray. If the parameter is unspecified, 
> the API response remains unaffected.
> 
> 
> Diffs
> -
> 
>   webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java 
> 82016d0 
> 
> Diff: https://reviews.apache.org/r/51514/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>



Re: Review Request 51514: [ATLAS-1144] Create/update entity API call should return more definitions

2016-08-30 Thread Madhan Neethiraj


> On Aug. 31, 2016, 5:22 a.m., Madhan Neethiraj wrote:
> > webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java, 
> > line 197
> > 
> >
> > Does every request have its own 'uriInfo' object? If not, how does this 
> > method differentiate requests that include "responseType" query parameter 
> > from the ones that don't?
> 
> Apoorv Naik wrote:
> Yes, every request has it's own UriInfo object.

ok. EntityResource class is marked as @Singlton. Hence my question. If multiple 
requests arrive simultaneously, would each call execution get its own uriInfo 
member? (if yes, how does this work?). Please validate.


- Madhan


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


On Aug. 30, 2016, 3:44 p.m., Apoorv Naik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51514/
> ---
> 
> (Updated Aug. 30, 2016, 3:44 p.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj and Suma Shivaprasad.
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> The bug states that the API response only shows one entity definition in the 
> response of an update/create call wherease the expectation seems to be of 
> getting the entire list of the entities that were created/updated.
> 
> The fix adds the required capability by the means of a query parameter 
> responseType with the value as "full", if the API call is made with this 
> extra parameter, the response would contain an additional field called 
> "definitionList" which is of type JsonArray. If the parameter is unspecified, 
> the API response remains unaffected.
> 
> 
> Diffs
> -
> 
>   webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java 
> 82016d0 
> 
> Diff: https://reviews.apache.org/r/51514/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>



Re: Review Request 51514: [ATLAS-1144] Create/update entity API call should return more definitions

2016-08-31 Thread Apoorv Naik


> On Aug. 31, 2016, 5:22 a.m., Madhan Neethiraj wrote:
> > webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java, 
> > line 197
> > 
> >
> > Does every request have its own 'uriInfo' object? If not, how does this 
> > method differentiate requests that include "responseType" query parameter 
> > from the ones that don't?
> 
> Apoorv Naik wrote:
> Yes, every request has it's own UriInfo object.
> 
> Madhan Neethiraj wrote:
> ok. EntityResource class is marked as @Singlton. Hence my question. If 
> multiple requests arrive simultaneously, would each call execution get its 
> own uriInfo member? (if yes, how does this work?). Please validate.

The @Context annotation allows you to inject instances of 
javax.ws.rs.core.HttpHeaders, javax.ws.rs.core.UriInfo, 
javax.ws.rs.core.Request, javax.servlet.HttpServletRequest, 
javax.servlet.HttpServletResponse, javax.servlet.ServletConfig, 
javax.servlet.ServletContext, and javax.ws.rs.core.SecurityContext objects. So 
these are treated specially and allows injection into singletons. The container 
will have a proxy of the Singleton class and hence the server is able to handle 
multiple requests simultaneously while allowing such injection.


- Apoorv


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


On Aug. 30, 2016, 3:44 p.m., Apoorv Naik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51514/
> ---
> 
> (Updated Aug. 30, 2016, 3:44 p.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj and Suma Shivaprasad.
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> The bug states that the API response only shows one entity definition in the 
> response of an update/create call wherease the expectation seems to be of 
> getting the entire list of the entities that were created/updated.
> 
> The fix adds the required capability by the means of a query parameter 
> responseType with the value as "full", if the API call is made with this 
> extra parameter, the response would contain an additional field called 
> "definitionList" which is of type JsonArray. If the parameter is unspecified, 
> the API response remains unaffected.
> 
> 
> Diffs
> -
> 
>   webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java 
> 82016d0 
> 
> Diff: https://reviews.apache.org/r/51514/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>



Re: Review Request 51514: [ATLAS-1144] Create/update entity API call should return more definitions

2016-08-31 Thread Madhan Neethiraj


> On Aug. 31, 2016, 5:22 a.m., Madhan Neethiraj wrote:
> > webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java, 
> > line 197
> > 
> >
> > Does every request have its own 'uriInfo' object? If not, how does this 
> > method differentiate requests that include "responseType" query parameter 
> > from the ones that don't?
> 
> Apoorv Naik wrote:
> Yes, every request has it's own UriInfo object.
> 
> Madhan Neethiraj wrote:
> ok. EntityResource class is marked as @Singlton. Hence my question. If 
> multiple requests arrive simultaneously, would each call execution get its 
> own uriInfo member? (if yes, how does this work?). Please validate.
> 
> Apoorv Naik wrote:
> The @Context annotation allows you to inject instances of 
> javax.ws.rs.core.HttpHeaders, javax.ws.rs.core.UriInfo, 
> javax.ws.rs.core.Request, javax.servlet.HttpServletRequest, 
> javax.servlet.HttpServletResponse, javax.servlet.ServletConfig, 
> javax.servlet.ServletContext, and javax.ws.rs.core.SecurityContext objects. 
> So these are treated specially and allows injection into singletons. The 
> container will have a proxy of the Singleton class and hence the server is 
> able to handle multiple requests simultaneously while allowing such injection.

Apoorv - thanks for the details. Sounds good.


- Madhan


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


On Aug. 30, 2016, 3:44 p.m., Apoorv Naik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51514/
> ---
> 
> (Updated Aug. 30, 2016, 3:44 p.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj and Suma Shivaprasad.
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> The bug states that the API response only shows one entity definition in the 
> response of an update/create call wherease the expectation seems to be of 
> getting the entire list of the entities that were created/updated.
> 
> The fix adds the required capability by the means of a query parameter 
> responseType with the value as "full", if the API call is made with this 
> extra parameter, the response would contain an additional field called 
> "definitionList" which is of type JsonArray. If the parameter is unspecified, 
> the API response remains unaffected.
> 
> 
> Diffs
> -
> 
>   webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java 
> 82016d0 
> 
> Diff: https://reviews.apache.org/r/51514/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>



Re: Review Request 51514: [ATLAS-1144] Create/update entity API call should return more definitions

2016-08-31 Thread Madhan Neethiraj

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


Ship it!




Ship It!

- Madhan Neethiraj


On Aug. 30, 2016, 3:44 p.m., Apoorv Naik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51514/
> ---
> 
> (Updated Aug. 30, 2016, 3:44 p.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj and Suma Shivaprasad.
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> The bug states that the API response only shows one entity definition in the 
> response of an update/create call wherease the expectation seems to be of 
> getting the entire list of the entities that were created/updated.
> 
> The fix adds the required capability by the means of a query parameter 
> responseType with the value as "full", if the API call is made with this 
> extra parameter, the response would contain an additional field called 
> "definitionList" which is of type JsonArray. If the parameter is unspecified, 
> the API response remains unaffected.
> 
> 
> Diffs
> -
> 
>   webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java 
> 82016d0 
> 
> Diff: https://reviews.apache.org/r/51514/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>



Re: Review Request 51514: [ATLAS-1144] Create/update entity API call should return more definitions

2016-08-31 Thread Apoorv Naik


> On Aug. 31, 2016, 5:30 p.m., Madhan Neethiraj wrote:
> > Ship It!

Hold onto shipping it, looks like the uploaded patch is stale. I'm uploading a 
new patch


- Apoorv


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


On Aug. 30, 2016, 3:44 p.m., Apoorv Naik wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51514/
> ---
> 
> (Updated Aug. 30, 2016, 3:44 p.m.)
> 
> 
> Review request for atlas, Madhan Neethiraj and Suma Shivaprasad.
> 
> 
> Repository: atlas
> 
> 
> Description
> ---
> 
> The bug states that the API response only shows one entity definition in the 
> response of an update/create call wherease the expectation seems to be of 
> getting the entire list of the entities that were created/updated.
> 
> The fix adds the required capability by the means of a query parameter 
> responseType with the value as "full", if the API call is made with this 
> extra parameter, the response would contain an additional field called 
> "definitionList" which is of type JsonArray. If the parameter is unspecified, 
> the API response remains unaffected.
> 
> 
> Diffs
> -
> 
>   webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java 
> 82016d0 
> 
> Diff: https://reviews.apache.org/r/51514/diff/
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Apoorv Naik
> 
>



Re: Review Request 51514: [ATLAS-1144] Create/update entity API call should return more definitions

2016-08-31 Thread Apoorv Naik

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

(Updated Aug. 31, 2016, 7:26 p.m.)


Review request for atlas, Madhan Neethiraj and Suma Shivaprasad.


Changes
---

Uploading the latest patch, looks like I uploaded an old patch


Repository: atlas


Description
---

The bug states that the API response only shows one entity definition in the 
response of an update/create call wherease the expectation seems to be of 
getting the entire list of the entities that were created/updated.

The fix adds the required capability by the means of a query parameter 
responseType with the value as "full", if the API call is made with this extra 
parameter, the response would contain an additional field called 
"definitionList" which is of type JsonArray. If the parameter is unspecified, 
the API response remains unaffected.


Diffs (updated)
-

  webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java 
82016d0 

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


Testing
---


Thanks,

Apoorv Naik