Re: Review Request 46962: Hive View and Pig View : one user overriding job details of other user in database

2016-05-19 Thread Rohit Choudhary

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



Can we used TypedQuery instead of list and subsequent conversions?

- Rohit Choudhary


On May 19, 2016, 6:43 p.m., Nitiraj Rathore wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46962/
> ---
> 
> (Updated May 19, 2016, 6:43 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, DIPAYAN BHOWMICK, Gaurav 
> Nagar, Rohit Choudhary, and Ashwin Rajeev.
> 
> 
> Bugs: AMBARI-16242
> https://issues.apache.org/jira/browse/AMBARI-16242
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Earlier : 
> the id for dynamic entity was created in the application with the use of 
> instance data for that view. This data is dependent on users and created 
> separate sequences for each user. So the id for one user was also generated 
> for other user. Hence the data in db of one user was getting overriden by 
> other user. 
> 
> In this patch : 
> Now the id is generated using table_sequence techique of JPA. table for 
> sequence is ambari_sequence. UpgradeCatalog240.java will add the current 
> sequence number for existing tables and for new table the sequence name will 
> be added automatically. As sequence size of 50 is provided for better 
> performances
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
>  41f538e 
>   
> ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java
>  0ed260d 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/persistence/DataStoreStorage.java
>  1e8f07f 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/JobService.java
>  f7f883b 
>   
> contrib/views/pig/src/main/java/org/apache/ambari/view/pig/persistence/DataStoreStorage.java
>  7ae7721 
> 
> Diff: https://reviews.apache.org/r/46962/diff/
> 
> 
> Testing
> ---
> 
> Following manual testing has been done.
> 1. upgrade script creates correct current sequences. Done by manually 
> upgrading old ambari with existing views. Next job will allocate 50 more ids
> 2. for new tables the entry in ambari_sequence is automatically added and the 
> ids will start from 1.
> 
> 
> Thanks,
> 
> Nitiraj Rathore
> 
>



Re: Review Request 46962: Hive View and Pig View : one user overriding job details of other user in database

2016-05-19 Thread Nitiraj Rathore

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

(Updated May 19, 2016, 6:43 p.m.)


Review request for Ambari, Alejandro Fernandez, DIPAYAN BHOWMICK, Gaurav Nagar, 
Rohit Choudhary, and Ashwin Rajeev.


Changes
---

did further changes as per review comments.


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


Repository: ambari


Description
---

Earlier : 
the id for dynamic entity was created in the application with the use of 
instance data for that view. This data is dependent on users and created 
separate sequences for each user. So the id for one user was also generated for 
other user. Hence the data in db of one user was getting overriden by other 
user. 

In this patch : 
Now the id is generated using table_sequence techique of JPA. table for 
sequence is ambari_sequence. UpgradeCatalog240.java will add the current 
sequence number for existing tables and for new table the sequence name will be 
added automatically. As sequence size of 50 is provided for better performances


Diffs (updated)
-

  
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
 41f538e 
  
ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java
 0ed260d 
  
contrib/views/hive/src/main/java/org/apache/ambari/view/hive/persistence/DataStoreStorage.java
 1e8f07f 
  
contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/JobService.java
 f7f883b 
  
contrib/views/pig/src/main/java/org/apache/ambari/view/pig/persistence/DataStoreStorage.java
 7ae7721 

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


Testing
---

Following manual testing has been done.
1. upgrade script creates correct current sequences. Done by manually upgrading 
old ambari with existing views. Next job will allocate 50 more ids
2. for new tables the entry in ambari_sequence is automatically added and the 
ids will start from 1.


Thanks,

Nitiraj Rathore



Re: Review Request 46962: Hive View and Pig View : one user overriding job details of other user in database

2016-05-19 Thread Alejandro Fernandez

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


Fix it, then Ship it!





ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
 (line 266)


Please remove redundant spaces.
Your IDE can format this to change,

"if( x ) {"   =>  "if (x) {"

"}catch" => "} catch"

etc.



ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
 (line 312)


Catch NumberFormatException instead


- Alejandro Fernandez


On May 17, 2016, 10:10 a.m., Nitiraj Rathore wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46962/
> ---
> 
> (Updated May 17, 2016, 10:10 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, DIPAYAN BHOWMICK, Gaurav 
> Nagar, Rohit Choudhary, and Ashwin Rajeev.
> 
> 
> Bugs: AMBARI-16242
> https://issues.apache.org/jira/browse/AMBARI-16242
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Earlier : 
> the id for dynamic entity was created in the application with the use of 
> instance data for that view. This data is dependent on users and created 
> separate sequences for each user. So the id for one user was also generated 
> for other user. Hence the data in db of one user was getting overriden by 
> other user. 
> 
> In this patch : 
> Now the id is generated using table_sequence techique of JPA. table for 
> sequence is ambari_sequence. UpgradeCatalog240.java will add the current 
> sequence number for existing tables and for new table the sequence name will 
> be added automatically. As sequence size of 50 is provided for better 
> performances
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
>  1f3b1d3 
>   
> ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java
>  0ed260d 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/persistence/DataStoreStorage.java
>  1e8f07f 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/JobService.java
>  f7f883b 
>   
> contrib/views/pig/src/main/java/org/apache/ambari/view/pig/persistence/DataStoreStorage.java
>  7ae7721 
> 
> Diff: https://reviews.apache.org/r/46962/diff/
> 
> 
> Testing
> ---
> 
> Following manual testing has been done.
> 1. upgrade script creates correct current sequences. Done by manually 
> upgrading old ambari with existing views. Next job will allocate 50 more ids
> 2. for new tables the entry in ambari_sequence is automatically added and the 
> ids will start from 1.
> 
> 
> Thanks,
> 
> Nitiraj Rathore
> 
>



Re: Review Request 46962: Hive View and Pig View : one user overriding job details of other user in database

2016-05-19 Thread Ashwin Rajeev

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


Ship it!




Ship It!

- Ashwin Rajeev


On May 17, 2016, 10:10 a.m., Nitiraj Rathore wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46962/
> ---
> 
> (Updated May 17, 2016, 10:10 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, DIPAYAN BHOWMICK, Gaurav 
> Nagar, Rohit Choudhary, and Ashwin Rajeev.
> 
> 
> Bugs: AMBARI-16242
> https://issues.apache.org/jira/browse/AMBARI-16242
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Earlier : 
> the id for dynamic entity was created in the application with the use of 
> instance data for that view. This data is dependent on users and created 
> separate sequences for each user. So the id for one user was also generated 
> for other user. Hence the data in db of one user was getting overriden by 
> other user. 
> 
> In this patch : 
> Now the id is generated using table_sequence techique of JPA. table for 
> sequence is ambari_sequence. UpgradeCatalog240.java will add the current 
> sequence number for existing tables and for new table the sequence name will 
> be added automatically. As sequence size of 50 is provided for better 
> performances
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
>  1f3b1d3 
>   
> ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java
>  0ed260d 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/persistence/DataStoreStorage.java
>  1e8f07f 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/JobService.java
>  f7f883b 
>   
> contrib/views/pig/src/main/java/org/apache/ambari/view/pig/persistence/DataStoreStorage.java
>  7ae7721 
> 
> Diff: https://reviews.apache.org/r/46962/diff/
> 
> 
> Testing
> ---
> 
> Following manual testing has been done.
> 1. upgrade script creates correct current sequences. Done by manually 
> upgrading old ambari with existing views. Next job will allocate 50 more ids
> 2. for new tables the entry in ambari_sequence is automatically added and the 
> ids will start from 1.
> 
> 
> Thanks,
> 
> Nitiraj Rathore
> 
>



Re: Review Request 46962: Hive View and Pig View : one user overriding job details of other user in database

2016-05-17 Thread Nitiraj Rathore

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

(Updated May 17, 2016, 10:10 a.m.)


Review request for Ambari, Alejandro Fernandez, DIPAYAN BHOWMICK, Gaurav Nagar, 
Rohit Choudhary, and Ashwin Rajeev.


Changes
---

did the correction suggested in the code reviews.


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


Repository: ambari


Description
---

Earlier : 
the id for dynamic entity was created in the application with the use of 
instance data for that view. This data is dependent on users and created 
separate sequences for each user. So the id for one user was also generated for 
other user. Hence the data in db of one user was getting overriden by other 
user. 

In this patch : 
Now the id is generated using table_sequence techique of JPA. table for 
sequence is ambari_sequence. UpgradeCatalog240.java will add the current 
sequence number for existing tables and for new table the sequence name will be 
added automatically. As sequence size of 50 is provided for better performances


Diffs (updated)
-

  
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
 1f3b1d3 
  
ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java
 0ed260d 
  
contrib/views/hive/src/main/java/org/apache/ambari/view/hive/persistence/DataStoreStorage.java
 1e8f07f 
  
contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/JobService.java
 f7f883b 
  
contrib/views/pig/src/main/java/org/apache/ambari/view/pig/persistence/DataStoreStorage.java
 7ae7721 

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


Testing
---

Following manual testing has been done.
1. upgrade script creates correct current sequences. Done by manually upgrading 
old ambari with existing views. Next job will allocate 50 more ids
2. for new tables the entry in ambari_sequence is automatically added and the 
ids will start from 1.


Thanks,

Nitiraj Rathore



Re: Review Request 46962: Hive View and Pig View : one user overriding job details of other user in database

2016-05-17 Thread Nitiraj Rathore


> On May 16, 2016, 4:48 p.m., Ajit Kumar wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java,
> >  line 320
> > 
> >
> > Is maxId == 0 valid?

yes it is valid. the id of first entity will be 1. verified.


- Nitiraj


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


On May 16, 2016, 1:59 p.m., Nitiraj Rathore wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46962/
> ---
> 
> (Updated May 16, 2016, 1:59 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, DIPAYAN BHOWMICK, Gaurav 
> Nagar, Rohit Choudhary, and Ashwin Rajeev.
> 
> 
> Bugs: AMBARI-16242
> https://issues.apache.org/jira/browse/AMBARI-16242
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Earlier : 
> the id for dynamic entity was created in the application with the use of 
> instance data for that view. This data is dependent on users and created 
> separate sequences for each user. So the id for one user was also generated 
> for other user. Hence the data in db of one user was getting overriden by 
> other user. 
> 
> In this patch : 
> Now the id is generated using table_sequence techique of JPA. table for 
> sequence is ambari_sequence. UpgradeCatalog240.java will add the current 
> sequence number for existing tables and for new table the sequence name will 
> be added automatically. As sequence size of 50 is provided for better 
> performances
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
>  dc8d9b7 
>   
> ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java
>  0ed260d 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/persistence/DataStoreStorage.java
>  1e8f07f 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/JobService.java
>  f7f883b 
>   
> contrib/views/pig/src/main/java/org/apache/ambari/view/pig/persistence/DataStoreStorage.java
>  7ae7721 
> 
> Diff: https://reviews.apache.org/r/46962/diff/
> 
> 
> Testing
> ---
> 
> Following manual testing has been done.
> 1. upgrade script creates correct current sequences. Done by manually 
> upgrading old ambari with existing views. Next job will allocate 50 more ids
> 2. for new tables the entry in ambari_sequence is automatically added and the 
> ids will start from 1.
> 
> 
> Thanks,
> 
> Nitiraj Rathore
> 
>



Re: Review Request 46962: Hive View and Pig View : one user overriding job details of other user in database

2016-05-16 Thread Alejandro Fernandez

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




ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
 (line 44)


Use explicit imports.



ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
 (line 267)


Use standard formatting with only a single space.



ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
 (line 277)


Use javadoc instead of // comments.

Also, the formatting in this function is not consistent in terms of spaces, 
especially near parentheses and curly braces.



ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
 (line 312)


Catch NumberFormatException instead



contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/JobService.java
 (line 441)


Space after ","
Same in 2 LOG statements below.


- Alejandro Fernandez


On May 16, 2016, 1:59 p.m., Nitiraj Rathore wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46962/
> ---
> 
> (Updated May 16, 2016, 1:59 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, DIPAYAN BHOWMICK, Gaurav 
> Nagar, Rohit Choudhary, and Ashwin Rajeev.
> 
> 
> Bugs: AMBARI-16242
> https://issues.apache.org/jira/browse/AMBARI-16242
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Earlier : 
> the id for dynamic entity was created in the application with the use of 
> instance data for that view. This data is dependent on users and created 
> separate sequences for each user. So the id for one user was also generated 
> for other user. Hence the data in db of one user was getting overriden by 
> other user. 
> 
> In this patch : 
> Now the id is generated using table_sequence techique of JPA. table for 
> sequence is ambari_sequence. UpgradeCatalog240.java will add the current 
> sequence number for existing tables and for new table the sequence name will 
> be added automatically. As sequence size of 50 is provided for better 
> performances
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
>  dc8d9b7 
>   
> ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java
>  0ed260d 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/persistence/DataStoreStorage.java
>  1e8f07f 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/JobService.java
>  f7f883b 
>   
> contrib/views/pig/src/main/java/org/apache/ambari/view/pig/persistence/DataStoreStorage.java
>  7ae7721 
> 
> Diff: https://reviews.apache.org/r/46962/diff/
> 
> 
> Testing
> ---
> 
> Following manual testing has been done.
> 1. upgrade script creates correct current sequences. Done by manually 
> upgrading old ambari with existing views. Next job will allocate 50 more ids
> 2. for new tables the entry in ambari_sequence is automatically added and the 
> ids will start from 1.
> 
> 
> Thanks,
> 
> Nitiraj Rathore
> 
>



Re: Review Request 46962: Hive View and Pig View : one user overriding job details of other user in database

2016-05-16 Thread Ajit Kumar

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



Minor code formatting comments.


ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
 (line 305)


space after if



ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
 (line 309)


You can use Math.max as well



ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
 (line 312)


space after }, catch



ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
 (line 318)


Is maxId == 0 valid?



ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java
 (line 51)


No wild card imports.



ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java
 (line 414)


It is good practise to use {} even for 1 line if blocks.

space should be after if and not after (



contrib/views/hive/src/main/java/org/apache/ambari/view/hive/persistence/DataStoreStorage.java
 (line 61)


Indexed newBean = (Indexed) BeanUtils.cloneBean(obj);



contrib/views/pig/src/main/java/org/apache/ambari/view/pig/persistence/DataStoreStorage.java
 (line 53)


Indexed newBean = (Indexed) BeanUtils.cloneBean(obj);


- Ajit Kumar


On May 16, 2016, 1:59 p.m., Nitiraj Rathore wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46962/
> ---
> 
> (Updated May 16, 2016, 1:59 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, DIPAYAN BHOWMICK, Gaurav 
> Nagar, Rohit Choudhary, and Ashwin Rajeev.
> 
> 
> Bugs: AMBARI-16242
> https://issues.apache.org/jira/browse/AMBARI-16242
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Earlier : 
> the id for dynamic entity was created in the application with the use of 
> instance data for that view. This data is dependent on users and created 
> separate sequences for each user. So the id for one user was also generated 
> for other user. Hence the data in db of one user was getting overriden by 
> other user. 
> 
> In this patch : 
> Now the id is generated using table_sequence techique of JPA. table for 
> sequence is ambari_sequence. UpgradeCatalog240.java will add the current 
> sequence number for existing tables and for new table the sequence name will 
> be added automatically. As sequence size of 50 is provided for better 
> performances
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
>  dc8d9b7 
>   
> ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java
>  0ed260d 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/persistence/DataStoreStorage.java
>  1e8f07f 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/JobService.java
>  f7f883b 
>   
> contrib/views/pig/src/main/java/org/apache/ambari/view/pig/persistence/DataStoreStorage.java
>  7ae7721 
> 
> Diff: https://reviews.apache.org/r/46962/diff/
> 
> 
> Testing
> ---
> 
> Following manual testing has been done.
> 1. upgrade script creates correct current sequences. Done by manually 
> upgrading old ambari with existing views. Next job will allocate 50 more ids
> 2. for new tables the entry in ambari_sequence is automatically added and the 
> ids will start from 1.
> 
> 
> Thanks,
> 
> Nitiraj Rathore
> 
>



Re: Review Request 46962: Hive View and Pig View : one user overriding job details of other user in database

2016-05-16 Thread DIPAYAN BHOWMICK


> On May 16, 2016, 1:58 p.m., DIPAYAN BHOWMICK wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java,
> >  line 367
> > 
> >
> > Remove these lines

Fixit and commit.


- DIPAYAN


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


On May 4, 2016, 6:46 a.m., Nitiraj Rathore wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46962/
> ---
> 
> (Updated May 4, 2016, 6:46 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, DIPAYAN BHOWMICK, Gaurav 
> Nagar, and Rohit Choudhary.
> 
> 
> Bugs: AMBARI-16242
> https://issues.apache.org/jira/browse/AMBARI-16242
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Earlier : 
> the id for dynamic entity was created in the application with the use of 
> instance data for that view. This data is dependent on users and created 
> separate sequences for each user. So the id for one user was also generated 
> for other user. Hence the data in db of one user was getting overriden by 
> other user. 
> 
> In this patch : 
> Now the id is generated using table_sequence techique of JPA. table for 
> sequence is ambari_sequence. UpgradeCatalog240.java will add the current 
> sequence number for existing tables and for new table the sequence name will 
> be added automatically. As sequence size of 50 is provided for better 
> performances
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
>  dc8d9b7 
>   
> ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java
>  0ed260d 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/persistence/DataStoreStorage.java
>  1e8f07f 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/JobService.java
>  f7f883b 
>   
> contrib/views/pig/src/main/java/org/apache/ambari/view/pig/persistence/DataStoreStorage.java
>  7ae7721 
> 
> Diff: https://reviews.apache.org/r/46962/diff/
> 
> 
> Testing
> ---
> 
> Following manual testing has been done.
> 1. upgrade script creates correct current sequences. Done by manually 
> upgrading old ambari with existing views. Next job will allocate 50 more ids
> 2. for new tables the entry in ambari_sequence is automatically added and the 
> ids will start from 1.
> 
> 
> Thanks,
> 
> Nitiraj Rathore
> 
>



Re: Review Request 46962: Hive View and Pig View : one user overriding job details of other user in database

2016-05-16 Thread DIPAYAN BHOWMICK

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


Ship it!




Ship It!

- DIPAYAN BHOWMICK


On May 4, 2016, 6:46 a.m., Nitiraj Rathore wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/46962/
> ---
> 
> (Updated May 4, 2016, 6:46 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, DIPAYAN BHOWMICK, Gaurav 
> Nagar, and Rohit Choudhary.
> 
> 
> Bugs: AMBARI-16242
> https://issues.apache.org/jira/browse/AMBARI-16242
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> Earlier : 
> the id for dynamic entity was created in the application with the use of 
> instance data for that view. This data is dependent on users and created 
> separate sequences for each user. So the id for one user was also generated 
> for other user. Hence the data in db of one user was getting overriden by 
> other user. 
> 
> In this patch : 
> Now the id is generated using table_sequence techique of JPA. table for 
> sequence is ambari_sequence. UpgradeCatalog240.java will add the current 
> sequence number for existing tables and for new table the sequence name will 
> be added automatically. As sequence size of 50 is provided for better 
> performances
> 
> 
> Diffs
> -
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
>  dc8d9b7 
>   
> ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java
>  0ed260d 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/persistence/DataStoreStorage.java
>  1e8f07f 
>   
> contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/JobService.java
>  f7f883b 
>   
> contrib/views/pig/src/main/java/org/apache/ambari/view/pig/persistence/DataStoreStorage.java
>  7ae7721 
> 
> Diff: https://reviews.apache.org/r/46962/diff/
> 
> 
> Testing
> ---
> 
> Following manual testing has been done.
> 1. upgrade script creates correct current sequences. Done by manually 
> upgrading old ambari with existing views. Next job will allocate 50 more ids
> 2. for new tables the entry in ambari_sequence is automatically added and the 
> ids will start from 1.
> 
> 
> Thanks,
> 
> Nitiraj Rathore
> 
>



Review Request 46962: Hive View and Pig View : one user overriding job details of other user in database

2016-05-04 Thread Nitiraj Rathore

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

Review request for Ambari, Alejandro Fernandez, DIPAYAN BHOWMICK, Gaurav Nagar, 
and Rohit Choudhary.


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


Repository: ambari


Description
---

Earlier : 
the id for dynamic entity was created in the application with the use of 
instance data for that view. This data is dependent on users and created 
separate sequences for each user. So the id for one user was also generated for 
other user. Hence the data in db of one user was getting overriden by other 
user. 

In this patch : 
Now the id is generated using table_sequence techique of JPA. table for 
sequence is ambari_sequence. UpgradeCatalog240.java will add the current 
sequence number for existing tables and for new table the sequence name will be 
added automatically. As sequence size of 50 is provided for better performances


Diffs
-

  
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
 dc8d9b7 
  
ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java
 0ed260d 
  
contrib/views/hive/src/main/java/org/apache/ambari/view/hive/persistence/DataStoreStorage.java
 1e8f07f 
  
contrib/views/hive/src/main/java/org/apache/ambari/view/hive/resources/jobs/JobService.java
 f7f883b 
  
contrib/views/pig/src/main/java/org/apache/ambari/view/pig/persistence/DataStoreStorage.java
 7ae7721 

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


Testing
---

Following manual testing has been done.
1. upgrade script creates correct current sequences. Done by manually upgrading 
old ambari with existing views. Next job will allocate 50 more ids
2. for new tables the entry in ambari_sequence is automatically added and the 
ids will start from 1.


Thanks,

Nitiraj Rathore