DaveTeng0 commented on code in PR #6608:
URL: https://github.com/apache/ozone/pull/6608#discussion_r1588498293


##########
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:
   sure! removed these imports from pom, changed to use wrapper.



-- 
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]

Reply via email to