----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/73544/#review223398 -----------------------------------------------------------
webapp/src/main/java/org/apache/atlas/notification/NotificationHookConsumer.java Lines 1056 (patched) <https://reviews.apache.org/r/73544/#comment312465> replace line 1056-1058: entities.addAll(context.getEntities()) also replace line 1062-1064: entities.addAll(context.getReferredEntities().values()) webapp/src/main/java/org/apache/atlas/notification/NotificationHookConsumer.java Lines 1067 (patched) <https://reviews.apache.org/r/73544/#comment312466> 'entities' can never be null, we assign it to empty List in line 1053. Consider checking if List is not empty. webapp/src/main/java/org/apache/atlas/notification/NotificationHookConsumer.java Lines 1068 (patched) <https://reviews.apache.org/r/73544/#comment312467> for (AtlasEntity entity : entities) { ... } webapp/src/main/java/org/apache/atlas/notification/preprocessor/EntityPreprocessor.java Lines 69 (patched) <https://reviews.apache.org/r/73544/#comment312463> S3V2_PREPROCESSOR_MAP => AWS_S3_V2_PREPROCESSOR_MAP webapp/src/main/java/org/apache/atlas/notification/preprocessor/S3V2Preprocessor.java Lines 27 (patched) <https://reviews.apache.org/r/73544/#comment312464> S3V2Preprocessor => AWSS3V2DirectoryPreprocessor webapp/src/main/java/org/apache/atlas/notification/preprocessor/S3V2Preprocessor.java Lines 56 (patched) <https://reviews.apache.org/r/73544/#comment312469> consider changing this to INFO log for debugging purpose. webapp/src/main/java/org/apache/atlas/notification/preprocessor/S3V2Preprocessor.java Lines 66 (patched) <https://reviews.apache.org/r/73544/#comment312468> consider also including the 'name' attribute from aws_s3_v2_directory type in this check: && objectPrefix.contains(name) qualifiedName : s3a://my_bucket_1/datalake/warehouse/tablespace/external/hive/employee.csv/@cm objectPrefix : /datalake/warehouse/tablespace/external/hive/employee.csv/ name : employee.csv - Sarath Subramanian On Aug. 24, 2021, 11:21 p.m., Sidharth Mishra wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/73544/ > ----------------------------------------------------------- > > (Updated Aug. 24, 2021, 11:21 p.m.) > > > Review request for atlas, Ashutosh Mestry, Disha Talreja, Radhika Kundam, and > Sarath Subramanian. > > > Bugs: ATLAS-4400 > https://issues.apache.org/jira/browse/ATLAS-4400 > > > Repository: atlas > > > Description > ------- > > ATLAS-4400: Fixed Hook and Atlas Preprocessor to handle S3 V2 directory > objectPrefix Issue with Atlas Server and Hook versions mismatch > > > Diffs > ----- > > common/src/main/java/org/apache/atlas/utils/AtlasPathExtractorUtil.java > a9f2e5092 > common/src/test/java/org/apache/atlas/utils/AtlasPathExtractorUtilTest.java > 6bf5d5779 > > webapp/src/main/java/org/apache/atlas/notification/NotificationHookConsumer.java > 5643af95c > > webapp/src/main/java/org/apache/atlas/notification/preprocessor/EntityPreprocessor.java > 7f0cafe86 > > webapp/src/main/java/org/apache/atlas/notification/preprocessor/PreprocessorContext.java > 59f6440d5 > > webapp/src/main/java/org/apache/atlas/notification/preprocessor/S3V2Preprocessor.java > PRE-CREATION > > > Diff: https://reviews.apache.org/r/73544/diff/1/ > > > Testing > ------- > > Manually tested the Newer Atlas with old Hook and vice versa. Precommit - > https://ci-builds.apache.org/job/Atlas/job/PreCommit-ATLAS-Build-Test/817/ > > > Thanks, > > Sidharth Mishra > >
