ctubbsii commented on code in PR #33:
URL: 
https://github.com/apache/accumulo-classloaders/pull/33#discussion_r2692454745


##########
modules/local-caching-classloader/src/main/java/org/apache/accumulo/classloader/lcc/definition/ContextDefinition.java:
##########
@@ -139,4 +160,29 @@ public String getChecksum() {
   public String toJson() {
     return GSON.toJson(this);
   }
+
+  @Override
+  public String keyword() {
+    return "create-context-definition";
+  }
+
+  @Override
+  public String description() {
+    return "Creates and prints a Context Definition";
+  }
+
+  @Override
+  public void execute(String[] args) throws Exception {
+    URL.setURLStreamHandlerFactory(new FsUrlStreamHandlerFactory(new 
Configuration()));
+
+    Opts opts = new Opts();
+    opts.parseArgs(ContextDefinition.class.getName(), args);
+    URL[] urls = new URL[opts.files.size()];
+    int count = 0;
+    for (String f : opts.files) {
+      urls[count++] = new URL(f);
+    }
+    ContextDefinition def = create(opts.contextName, opts.monitorInterval, 
urls);

Review Comment:
   ```suggestion
       ContextDefinition def = create(opts.monitorInterval, urls);
   ```
   
   There is no longer a context name field in the JSON. This first String 
parameter had been repurposed as a hack to populate a transient field for the 
source filename, so the LocalStore could use that to derive a local name when 
it put a copy of the JSON in the local cache. However, that is no longer 
needed, as of #41.



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

Reply via email to