-
Notifications
You must be signed in to change notification settings - Fork 12
VFSClassLoader alternative #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I had started working on a design for a VFSClassLoader replacement a few weeks ago. My design deviates from the requirements in #27 based on my prior work on the classloader implementations in Accumulo. |
ddanielr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand this is a draft so this feedback may not end up being implemented.
...caching-classloader/src/main/java/org/apache/accumulo/classloader/lcc/manifest/Manifest.java
Outdated
Show resolved
Hide resolved
...caching-classloader/src/main/java/org/apache/accumulo/classloader/lcc/manifest/Resource.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/apache/accumulo/classloader/lcc/LocalCachingContextClassLoaderFactory.java
Outdated
Show resolved
Hide resolved
...l-caching-classloader/src/main/java/org/apache/accumulo/classloaders/lcc/state/Contexts.java
Outdated
Show resolved
Hide resolved
...classloader/src/main/java/org/apache/accumulo/classloaders/lcc/state/ContextClassLoader.java
Outdated
Show resolved
Hide resolved
...classloader/src/main/java/org/apache/accumulo/classloaders/lcc/state/ContextClassLoader.java
Outdated
Show resolved
Hide resolved
…umulo/classloader/lcc/LocalCachingContextClassLoaderFactory.java Co-authored-by: Daniel Roberts <ddanielr@gmail.com>
…umulo/classloaders/lcc/state/Contexts.java Co-authored-by: Daniel Roberts <ddanielr@gmail.com>
…o-classloaders into new-classloader
...src/main/java/org/apache/accumulo/classloader/lcc/LocalCachingContextClassLoaderFactory.java
Outdated
Show resolved
Hide resolved
...-classloader/src/main/java/org/apache/accumulo/classloader/lcc/state/ContextClassLoader.java
Outdated
Show resolved
Hide resolved
...-classloader/src/main/java/org/apache/accumulo/classloader/lcc/state/ContextClassLoader.java
Outdated
Show resolved
Hide resolved
|
Build is failing due to no new-line in no-arg constructors for ContextDefinition.java and Resource.java. Not sure what's happening here with the formatting plugin. @ctubbsii - any ideas? Update: I got it working by modifying the checkstyle rules in the pom to match the rules in the main Accumulo pom for the RightCurly rule. |
...loader/src/main/java/org/apache/accumulo/classloader/lcc/LocalCachingContextClassLoader.java
Outdated
Show resolved
Hide resolved
...ching-classloader/src/main/java/org/apache/accumulo/classloader/lcc/LocalCachingContext.java
Outdated
Show resolved
Hide resolved
...test/java/org/apache/accumulo/classloader/lcc/LocalCachingContextClassLoaderFactoryTest.java
Show resolved
Hide resolved
...g-classloader/src/test/java/org/apache/accumulo/classloader/lcc/LocalCachingContextTest.java
Outdated
Show resolved
Hide resolved
...g-classloader/src/test/java/org/apache/accumulo/classloader/lcc/LocalCachingContextTest.java
Outdated
Show resolved
Hide resolved
...hing-classloader/src/test/java/org/apache/accumulo/classloader/lcc/cache/CacheUtilsTest.java
Outdated
Show resolved
Hide resolved
...test/java/org/apache/accumulo/classloader/lcc/LocalCachingContextClassLoaderFactoryTest.java
Show resolved
Hide resolved
...test/java/org/apache/accumulo/classloader/lcc/LocalCachingContextClassLoaderFactoryTest.java
Outdated
Show resolved
Hide resolved
...test/java/org/apache/accumulo/classloader/lcc/LocalCachingContextClassLoaderFactoryTest.java
Show resolved
Hide resolved
...test/java/org/apache/accumulo/classloader/lcc/LocalCachingContextClassLoaderFactoryTest.java
Show resolved
Hide resolved
...test/java/org/apache/accumulo/classloader/lcc/LocalCachingContextClassLoaderFactoryTest.java
Outdated
Show resolved
Hide resolved
|
I noticed some things that weren't quite right here, with the use of URI vs. URL, and File vs. Path, with regard to the modernizer and other QA checks, and noticed that some of the QA tools weren't configured and running in this project, or weren't up-to-date. I've updated them in a separate PR, #32 that should be merged before we make any additional changes, to ensure that new additions to the repo comply with our QA checks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really good. Saw some things that could be potential follow ons and a few small little things that could be changed.
...ching-classloader/src/main/java/org/apache/accumulo/classloader/lcc/LocalCachingContext.java
Outdated
Show resolved
Hide resolved
| final URL jarCJettyLocation = jetty.getURI().resolve("TestC.jar").toURL(); | ||
|
|
||
| // ContextDefinition with all jars | ||
| ContextDefinition allJarsDef = createContextDef("all", jarAOrigLocation, jarBHdfsLocation, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be a follow on, would be helpful to create a little main class or script that a user could point at a dir and it spits out some json. That could be added to readme.
...s/local-caching-classloader/src/main/java/org/apache/accumulo/classloader/lcc/Constants.java
Outdated
Show resolved
Hide resolved
...test/java/org/apache/accumulo/classloader/lcc/LocalCachingContextClassLoaderFactoryTest.java
Show resolved
Hide resolved
...test/java/org/apache/accumulo/classloader/lcc/LocalCachingContextClassLoaderFactoryTest.java
Show resolved
Hide resolved
...-caching-classloader/src/main/java/org/apache/accumulo/classloader/lcc/cache/CacheUtils.java
Outdated
Show resolved
Hide resolved
...assloader/src/main/java/org/apache/accumulo/classloader/lcc/resolvers/LocalFileResolver.java
Outdated
Show resolved
Hide resolved
...src/main/java/org/apache/accumulo/classloader/lcc/LocalCachingContextClassLoaderFactory.java
Outdated
Show resolved
Hide resolved
| ContextDefinition def = parseContextDefinition(contextLocationUrl); | ||
| LocalCachingContext newCcl = new LocalCachingContext(def); | ||
| newCcl.initialize(); | ||
| newlyCreated.set(true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not call monitorContext here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initially the code did have the call to monitorContext here. It presented an issue because this is in a Function where the entry is not yet in the contexts Cache. It added some complexity to monitorContext when trying to look up the entry in contexts.
...test/java/org/apache/accumulo/classloader/lcc/LocalCachingContextClassLoaderFactoryTest.java
Outdated
Show resolved
Hide resolved
…umulo/classloader/lcc/LocalCachingContextClassLoaderFactory.java Co-authored-by: Keith Turner <kturner@apache.org>
…umulo/classloader/lcc/cache/CacheUtils.java Co-authored-by: Keith Turner <kturner@apache.org>
|
Made a comment on a commit ea0501b#r171069412 |
...test/java/org/apache/accumulo/classloader/lcc/LocalCachingContextClassLoaderFactoryTest.java
Show resolved
Hide resolved
Updates from PR suggestions
Addressed this comment in a46d8e1 |
No description provided.