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


##########
modules/local-caching-classloader/README.md:
##########
@@ -170,20 +177,28 @@ constructed at that time.
 
 ## Cleanup
 
+
 Because the cache directory is shared among multiple processes, and one process
 can't know what the other processes are doing, this class cannot clean up the
 shared cache directory of unused resources. It is left to the user to remove
 unused files from the cache. While the context definition JSON files are always
 safe to delete, it is not recommended to do so for any that are still in use,
 because they can be useful for troubleshooting.
 
+To aid in this task a JMX MXBean has been created to expose the files that are 
still referenced

Review Comment:
   > Do you know if different JMX connections could require different java code?
   
   Yes. In the test I use
   ```
   List<VirtualMachineDescriptor> vmdl = VirtualMachine.list();
   and
             VirtualMachine vm = VirtualMachine.attach(vmd);
             String connectorAddress = vm.getAgentProperties()
                 
.getProperty("com.sun.management.jmxremote.localConnectorAddress");
   ```
   
   This works to find VMs that are running locally, attachs to them, and gets 
the connector address from them.
   
   What I'm unsure of, is whether or not this approach would work if any of the 
options listed 
[here](https://docs.oracle.com/javase/8/docs/technotes/guides/management/agent.html#gdeum)
 are set on the processes. So, it's very possible that a client would need to 
be coded specific to how the server is configured, but I'm not 100% sure.
   
   In the test I remove the JVM Option `-XX:+PerfDisableSharedMem` from the 
processes started by MiniAccumulo. If I don't remove this, then 
`VirtualMachine.list()` does not find the VMs (`jps` probably doesn't either). 
In that case, I would have to construct the address 
(`service:jmx:rmi:///jndi/rmi://hostName:portNum/jmxrmi`). If the server 
process is using security options (`TLS`, `authentication`, etc.), then more 
code is likely needed.
   
   > Or can the java JMX client APIs connect to any endpoint given correct 
config?
   
   We would need to write, or find, a generic JMX client library that can be 
configured with all options. I didn't look for that specifically, but it might 
exist. If we can't find one, then we could write one, but I'm not sure we 
should do that.



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