> On Nov. 23, 2017, 1:41 a.m., Abhay Kulkarni wrote: > > tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/AtlasNotificationMapper.java > > Line 298 (original), 466 (patched) > > <https://reviews.apache.org/r/64042/diff/1/?file=1900355#file1900355line471> > > > > It appears that the first level classification does not have any > > attributes set whereas superClassification has selected attributes set(line > > 527). Will it affect how getRangerTag() works? (line 544)?
Not sure I understand the comment. When a classification has attributes (#513), some/all of these attributes might have to be copied to super-type classifications as well - if the super-type classification has these attributes. If a classification has no attributes, there is no need to set attributes of its super-type classifications. If the issue is different, can you please add details? > On Nov. 23, 2017, 1:41 a.m., Abhay Kulkarni wrote: > > tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/AtlasNotificationMapper.java > > Lines 546 (patched) > > <https://reviews.apache.org/r/64042/diff/1/?file=1900355#file1900355line553> > > > > Will attrValue be null at this point? If it is null, then will line 550 > > throw exception? If it is never going to be null, then null check in line > > 561 is not required. (attrValue instanceof Number) ==> will be false when attrValue is null. > On Nov. 23, 2017, 1:41 a.m., Abhay Kulkarni wrote: > > tagsync/src/main/java/org/apache/ranger/tagsync/source/atlasrest/AtlasRESTTagSource.java > > Lines 193 (patched) > > <https://reviews.apache.org/r/64042/diff/1/?file=1900359#file1900359line213> > > > > Consider adding finally block and release registry if locked even in > > case of tty.addTypes() failure. This is strictly not necessary, as AtlasTypeRegistry goes out of scope when this method returns. However, updated the code per suggestion as a good practice. - Madhan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/64042/#review191771 ----------------------------------------------------------- On Nov. 23, 2017, 12:52 a.m., Madhan Neethiraj wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/64042/ > ----------------------------------------------------------- > > (Updated Nov. 23, 2017, 12:52 a.m.) > > > Review request for ranger and Abhay Kulkarni. > > > Bugs: RANGER-1897 > https://issues.apache.org/jira/browse/RANGER-1897 > > > Repository: ranger > > > Description > ------- > > Updated tag-sync to use Atlas V2 REST APIs to download tags, instead of using > V1 APIs. This significantly reduces the number of REST API calls from > tag-sync to Atlas and will result in a better performance. > > > Diffs > ----- > > pom.xml 80de97e8 > src/main/assembly/tagsync.xml 0b17151b > tagsync/pom.xml 42e9d2ff > > tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/AtlasHbaseResourceMapper.java > 8b36a318 > > tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/AtlasHdfsResourceMapper.java > 06bff906 > > tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/AtlasHiveResourceMapper.java > a3596223 > > tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/AtlasKafkaResourceMapper.java > 9f1fc2db > > tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/AtlasNotificationMapper.java > 922317e8 > > tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/AtlasResourceMapper.java > 8ececdf7 > > tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/AtlasResourceMapperUtil.java > f9f0eafd > > tagsync/src/main/java/org/apache/ranger/tagsync/source/atlas/AtlasTagSource.java > 12b02d94 > > tagsync/src/main/java/org/apache/ranger/tagsync/source/atlasrest/AtlasRESTTagSource.java > 4e0ae908 > > tagsync/src/main/java/org/apache/ranger/tagsync/source/atlasrest/AtlasRESTUtil.java > 00a101e7 > > > Diff: https://reviews.apache.org/r/64042/diff/1/ > > > Testing > ------- > > Verified that tags successfully download with Atlas V2 REST APIs. > > > Thanks, > > Madhan Neethiraj > >