rdblue commented on a change in pull request #1478:
URL: https://github.com/apache/iceberg/pull/1478#discussion_r496311893
##########
File path:
hive-metastore/src/test/java/org/apache/iceberg/hive/TestHiveMetastore.java
##########
@@ -80,6 +81,15 @@ public void stop() {
if (hiveLocalDir != null) {
hiveLocalDir.delete();
}
+
+ // remove raw store if exists
+ try {
+ Method cleanupRawStore =
HiveMetaStore.class.getDeclaredMethod("cleanupRawStore");
+ cleanupRawStore.setAccessible(true);
+ cleanupRawStore.invoke(null);
+ } catch (Exception e) {
+ // no op
+ }
Review comment:
Could you also rewrite this one to use the `DynMethods` helpers?
```java
private static final DynMethods.StaticMethod CLEAN_RAW_STORE =
DynMethods.builder("cleanupRawStore")
.hiddenImpl(HiveMetaStore.class)
.orNoop()
.buildStatic();
CLEAN_RAW_STORE.invoke();
```
That avoids needing a try/catch block since you can replace the method with
a no-op if it isn't found. And `hiddenImpl` will make it accessible.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]