You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2020/02/28 02:23:25 UTC

[GitHub] [accumulo] ctubbsii commented on a change in pull request #1537: Add PrintInfo options to dump full keys, apply formatter

ctubbsii commented on a change in pull request #1537: Add PrintInfo options to dump full keys, apply formatter
URL: https://github.com/apache/accumulo/pull/1537#discussion_r385477423
 
 

 ##########
 File path: core/src/main/java/org/apache/accumulo/core/file/rfile/PrintInfo.java
 ##########
 @@ -119,6 +182,18 @@ public String keyword() {
     return "rfile-info";
   }
 
+  protected Class<? extends Formatter> getFormater(String formatterClazz) {
+    try {
+      if (formatterClazz != null) {
+        return this.getClass().getClassLoader().loadClass(formatterClazz)
+            .asSubclass(Formatter.class);
+      }
+    } catch (ClassNotFoundException e) {
+      System.err.println("Could not find formatter class: " + formatterClazz);
+    }
+    return null;
+  }
+
 
 Review comment:
   I think this will work fine in Java 11, since it uses the class loader of the current class, and not the system class loader.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services