errose28 commented on code in PR #6608: URL: https://github.com/apache/ozone/pull/6608#discussion_r1585339858
########## hadoop-ozone/tools/pom.xml: ########## @@ -121,6 +121,53 @@ https://maven.apache.org/xsd/maven-4.0.0.xsd"> <maxHeap>2048</maxHeap> </configuration> </plugin> + <plugin> + <artifactId>maven-enforcer-plugin</artifactId> + <executions> + <execution> + <id>depcheck</id> + <phase></phase> + </execution> + <execution> + <id>banned-rocksdb-imports</id> + <phase>process-sources</phase> + <goals> + <goal>enforce</goal> + </goals> + <configuration> + <rules> + <RestrictImports> + <includeTestCode>false</includeTestCode> + <reason>Use managed RocksObjects under org.apache.hadoop.hdds.utils.db.managed instead.</reason> + <!-- By default, ban all the classes in org.rocksdb --> + <bannedImport>org.rocksdb.**</bannedImport> + <allowedImports> + <allowedImport>org.rocksdb.AbstractEventListener</allowedImport> + <allowedImport>org.rocksdb.Checkpoint</allowedImport> + <allowedImport>org.rocksdb.ColumnFamilyDescriptor</allowedImport> + <allowedImport>org.rocksdb.ColumnFamilyHandle</allowedImport> + <allowedImport>org.rocksdb.ColumnFamilyOptions</allowedImport> + <allowedImport>org.rocksdb.CompactionJobInfo</allowedImport> + <allowedImport>org.rocksdb.CompressionType</allowedImport> + <allowedImport>org.rocksdb.DBOptions</allowedImport> + <allowedImport>org.rocksdb.FlushOptions</allowedImport> + <allowedImport>org.rocksdb.Holder</allowedImport> + <allowedImport>org.rocksdb.LiveFileMetaData</allowedImport> + <allowedImport>org.rocksdb.Options</allowedImport> + <allowedImport>org.rocksdb.RocksDB</allowedImport> + <allowedImport>org.rocksdb.RocksDBException</allowedImport> + <allowedImport>org.rocksdb.SstFileReader</allowedImport> + <allowedImport>org.rocksdb.TableProperties</allowedImport> + <allowedImport>org.rocksdb.ReadOptions</allowedImport> + <allowedImport>org.rocksdb.SstFileReaderIterator</allowedImport> + </allowedImports> + <exclusion>org.apache.hadoop.hdds.utils.db.managed.*</exclusion> + </RestrictImports> + </rules> + </configuration> + </execution> + </executions> + </plugin> Review Comment: When I originally did this change I bypassed the managed wrappers because it was a one-off fix created on a time crunch. Since this is a "clean" version to contribute back to the community, we should use the managed wrappers. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
