> On Nov. 6, 2017, 10:11 p.m., Vadim Spector wrote: > > sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/persistent/TestSentryStore.java > > Lines 2453 (patched) > > <https://reviews.apache.org/r/63596/diff/1/?file=1882251#file1882251line2453> > > > > In the original test code all paths were absolute, i.e starting with > > "/". After your changes, all table paths start with "prefix", which does > > _not_ begin with "/". Why is that? What has changed? If it's correct, it's > > worth at least one sentence of javadoc. > > Arjun Mishra wrote: > Yes so based don my testing it is required that the front slash be left > out when you call persist full paths image. Please see > SentryStore#retrieveFullPathsImageCore, look at line "String[] pathComponents > = PathUtils.splitPath(path);". If the starting "/" is included, one of the > path elements would be empty and this would affect the tree structure. > > That's why all "/" have been removed from paths, that are being passed in > as arguments into persisting paths image.
All leading "/" have been removed - Arjun ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/63596/#review190231 ----------------------------------------------------------- On Nov. 6, 2017, 9:52 p.m., Arjun Mishra wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/63596/ > ----------------------------------------------------------- > > (Updated Nov. 6, 2017, 9:52 p.m.) > > > Review request for sentry, Alexander Kolbasov, Sergio Pena, and Vadim Spector. > > > Repository: sentry > > > Description > ------- > > The old retrieveFullPathsImage() method in SentryStore is no longer used by > actual code (retrieveFullPathsImageUpdate(final String[] prefixes) is used > instead. It was preserved because it is used by test which now doesn't make > much sense. > > > Diffs > ----- > > > sentry-hdfs/sentry-hdfs-service/src/test/java/org/apache/sentry/hdfs/TestImageRetriever.java > b355630e7 > > sentry-hdfs/sentry-hdfs-service/src/test/java/org/apache/sentry/hdfs/TestSentryHDFSServiceProcessor.java > f09d1b228 > > sentry-provider/sentry-provider-db/src/main/java/org/apache/sentry/provider/db/service/persistent/SentryStore.java > 0cd6e48aa > > sentry-provider/sentry-provider-db/src/test/java/org/apache/sentry/provider/db/service/persistent/TestSentryStore.java > cf83e7796 > > > Diff: https://reviews.apache.org/r/63596/diff/1/ > > > Testing > ------- > > mvn -f sentry-provider/sentry-provider-db/pom.xml test -Dtest=TestSentryStore > mvn -f sentry-hdfs/sentry-hdfs-service/pom.xml test > -Dtest=TestSentryHDFSServiceProcessor > mvn -f sentry-hdfs/sentry-hdfs-service/pom.xml test > -Dtest=TestImageRetriever.java > > > Thanks, > > Arjun Mishra > >