----------------------------------------------------------- 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) <https://reviews.apache.org/r/46962/#comment197732> space after if ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java (line 309) <https://reviews.apache.org/r/46962/#comment197729> You can use Math.max as well ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java (line 312) <https://reviews.apache.org/r/46962/#comment197734> space after }, catch ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java (line 318) <https://reviews.apache.org/r/46962/#comment197731> Is maxId == 0 valid? ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java (line 51) <https://reviews.apache.org/r/46962/#comment197725> No wild card imports. ambari-server/src/main/java/org/apache/ambari/server/view/persistence/DataStoreImpl.java (line 414) <https://reviews.apache.org/r/46962/#comment197724> 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) <https://reviews.apache.org/r/46962/#comment197723> Indexed newBean = (Indexed) BeanUtils.cloneBean(obj); contrib/views/pig/src/main/java/org/apache/ambari/view/pig/persistence/DataStoreStorage.java (line 53) <https://reviews.apache.org/r/46962/#comment197722> 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 > >