----------------------------------------------------------- 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 > >