----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/58228/#review171240 -----------------------------------------------------------
ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java Lines 234 (patched) <https://reviews.apache.org/r/58228/#comment244118> Documentation. ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java Lines 257-269 (patched) <https://reviews.apache.org/r/58228/#comment244119> We support other DB types. ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java Lines 277-278 (patched) <https://reviews.apache.org/r/58228/#comment244120> I would change this message so that it's just warning. There's no proof that removing data will actually speed it up :) "The database table {} is currently %f MB and may impact performance. It is recommended that you reduce its size by executing \"ambari-server db-cleanup\"." ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java Lines 283 (patched) <https://reviews.apache.org/r/58228/#comment244121> Use {} notation. ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java Lines 293-294 (patched) <https://reviews.apache.org/r/58228/#comment244122> "The database table {} currently has {} rows and may impact performance. It is recommended that you reduce its size by executing \"ambari-server db-cleanup\"." ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java Lines 296 (patched) <https://reviews.apache.org/r/58228/#comment244123> "The database table {} currently has {} rows and is within normal limits". ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java Lines 641 (patched) <https://reviews.apache.org/r/58228/#comment244124> Documentation. ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostRoleCommandDAO.java Lines 948-975 (patched) <https://reviews.apache.org/r/58228/#comment244126> Documentation. Also this is a generic name. Can we do something better, like HostRoleCommandIds? ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RequestDAO.java Lines 233-239 (patched) <https://reviews.apache.org/r/58228/#comment244127> Documentation. ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RequestDAO.java Lines 241-247 (patched) <https://reviews.apache.org/r/58228/#comment244128> Documentation. ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RequestDAO.java Lines 249-269 (patched) <https://reviews.apache.org/r/58228/#comment244129> Documentation. ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RequestDAO.java Lines 250-251 (patched) <https://reviews.apache.org/r/58228/#comment244134> Don't capitalize Ids ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RequestDAO.java Lines 252 (patched) <https://reviews.apache.org/r/58228/#comment244133> Why String.format? Why not just use the {} convention? ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RequestDAO.java Lines 261-262 (patched) <https://reviews.apache.org/r/58228/#comment244135> Use {} notation ambari-server/src/main/java/org/apache/ambari/server/orm/dao/StageDAO.java Lines 371-379 (patched) <https://reviews.apache.org/r/58228/#comment244131> Documentation. - Jonathan Hurley On April 6, 2017, 3:10 p.m., Vitalyi Brodetskyi wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/58228/ > ----------------------------------------------------------- > > (Updated April 6, 2017, 3:10 p.m.) > > > Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Myroslav > Papirkovskyy, and Sid Wagle. > > > Bugs: AMBARI-20687 > https://issues.apache.org/jira/browse/AMBARI-20687 > > > Repository: ambari > > > Description > ------- > > Add check for large tables into db consistency check. > Add code to cleanup these tables into db-cleanup code. > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java > e7e9433 > ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java > c132a3d > > ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java > 1dd3b54 > > ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ExecutionCommandDAO.java > 7a3bc01 > > ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostRoleCommandDAO.java > 79b8bc9 > > ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RequestDAO.java > 2696f66 > ambari-server/src/main/java/org/apache/ambari/server/orm/dao/StageDAO.java > c2919b2 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ExecutionCommandEntity.java > 85f3a25 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostRoleCommandEntity.java > a809295 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RequestEntity.java > f19aa72 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RequestOperationLevelEntity.java > ff14e3a > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RequestResourceFilterEntity.java > 8ee41d2 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/RoleSuccessCriteriaEntity.java > 3386c24 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/StageEntity.java > 49c1594 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/TopologyHostRequestEntity.java > b90e192 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/TopologyLogicalTaskEntity.java > c71d4e4 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UpgradeEntity.java > 7421ca1 > > ambari-server/src/main/java/org/apache/ambari/server/orm/entities/UpgradeItemEntity.java > 560970a > ambari-server/src/main/python/ambari-server.py 87cc6c2 > ambari-server/src/main/python/ambari_server/dbCleanup.py abc8267 > > ambari-server/src/test/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelperTest.java > 7d8ba50 > > > Diff: https://reviews.apache.org/r/58228/diff/2/ > > > Testing > ------- > > mvn clean test > > > Thanks, > > Vitalyi Brodetskyi > >
