----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/70188/#review213618 -----------------------------------------------------------
repository/src/main/java/org/apache/atlas/repository/store/bootstrap/AtlasTypeDefStoreInitializer.java Lines 495 (patched) <https://reviews.apache.org/r/70188/#comment299608> createOrUpdatePatchVertext() - to handle re-apply of failed patches. repository/src/main/java/org/apache/atlas/repository/store/bootstrap/AtlasTypeDefStoreInitializer.java Lines 509 (patched) <https://reviews.apache.org/r/70188/#comment299606> Should patch.status be checked as well here; if the patch failed to apply earlier, it should be attempted again. repository/src/main/java/org/apache/atlas/repository/store/bootstrap/AtlasTypeDefStoreInitializer.java Lines 516 (patched) <https://reviews.apache.org/r/70188/#comment299607> - instead of generating patch.id here, it will be easier to mandate "id" to be provided in the patch itself - by the patch author. Also, consider making this a string field, to make it easier for the authors to provide an unique value - patch.name is marked as GLOBAL_UNIQUE. Consider renaming this field as 'description', where the author can provide helpful text. Also, remove GLOBAL_UNIQUE constranit on this field repository/src/main/java/org/apache/atlas/repository/store/bootstrap/AtlasTypeDefStoreInitializer.java Lines 517 (patched) <https://reviews.apache.org/r/70188/#comment299609> I would suggest to use the given patchId, as is in PATCH_ID property. Only if no value is provided, have the default value as "fileName" + "_" + patchIndex. repository/src/main/java/org/apache/atlas/repository/store/bootstrap/AtlasTypeDefStoreInitializer.java Lines 724 (patched) <https://reviews.apache.org/r/70188/#comment299610> Since the patch is already applied, shouldn't the return value be 'APPLIED'? Same for line #785, #914, #955, #988. repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasGraphUtilsV2.java Lines 481 (patched) <https://reviews.apache.org/r/70188/#comment299612> use "patch.id" as key in the map. repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasGraphUtilsV2.java Lines 511 (patched) <https://reviews.apache.org/r/70188/#comment299611> Instead of FAILED as default, consider using NOT_APPLIED. - madhan On March 11, 2019, 8:22 p.m., Sarath Subramanian wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/70188/ > ----------------------------------------------------------- > > (Updated March 11, 2019, 8:22 p.m.) > > > Review request for atlas, Ashutosh Mestry, Kapildeo Nayak, Madhan Neethiraj, > Nikhil Bonte, and Nixon Rodrigues. > > > Bugs: ATLAS-3070 > https://issues.apache.org/jira/browse/ATLAS-3070 > > > Repository: atlas > > > Description > ------- > > In Atlas, we don't have a way to see all the type patches applied. The patch > framework will create a new vertex in the graph database and update its > application state. This will be useful when applying new patches and to make > sure not to apply applied patches again. A new REST API is also made > available to display all the list of patches and its application status. > > curl -X GET http://172.27.13.133:21000/api/atlas/admin/patches > > > Diffs > ----- > > addons/models/0000-Area0/patches/001-base_model_replication_attributes.json > 92c561f17 > addons/models/0000-Area0/patches/002-base_model_add_service_type.json > 6d4e80d0c > addons/models/1000-Hadoop/patches/001-hive_column_add_position.json > eeab74ac6 > addons/models/1000-Hadoop/patches/002-hive_column_table_add_options.json > 5f00bd2d5 > > addons/models/1000-Hadoop/patches/003-hive_column_update_table_remove_constraint.json > db8072216 > > addons/models/1000-Hadoop/patches/004-hbase_table_column_family_add_attribute.json > 80291f3e6 > > addons/models/1000-Hadoop/patches/005-hbase_table_column_family_add_additional_attribute.json > 862477414 > addons/models/1000-Hadoop/patches/006-kafka_topic_add_attribute.json > 6e1c9bc17 > addons/models/1000-Hadoop/patches/007-hadoop_model_add_service_type.json > 627bbaed9 > addons/models/2000-RDBMS/patches/001-rdbms_column_table_add_options.json > 675b0fd80 > addons/models/2000-RDBMS/patches/002-rdbms_model_add_service_type.json > c0ce143f7 > addons/models/3000-Cloud/patches/001-cloud_model_add_service_type.json > 320ae6367 > common/src/main/java/org/apache/atlas/repository/Constants.java 6c1e032cc > intg/src/main/java/org/apache/atlas/model/patches/AtlasPatch.java > PRE-CREATION > intg/src/main/java/org/apache/atlas/type/AtlasTypeUtil.java 5955aec23 > > repository/src/main/java/org/apache/atlas/repository/graph/GraphBackedSearchIndexer.java > 4327d77ca > > repository/src/main/java/org/apache/atlas/repository/store/bootstrap/AtlasTypeDefStoreInitializer.java > b0c224c32 > > repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasGraphUtilsV2.java > 8f4baa1cc > > repository/src/main/java/org/apache/atlas/repository/store/graph/v2/AtlasTypeDefGraphStoreV2.java > c6cf2a04a > webapp/src/main/java/org/apache/atlas/web/resources/AdminResource.java > 088aafc09 > > > Diff: https://reviews.apache.org/r/70188/diff/1/ > > > Testing > ------- > > Manually verified the REST API to check the patches status > > > Thanks, > > Sarath Subramanian > >
