Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit e333fc8

Browse files
committed
#96 Adjusted logging to use "non-REST modules" instead of "asset modules"
1 parent 4c8e9c4 commit e333fc8

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/main/java/com/marklogic/client/ext/modulesloader/impl/BaseModulesFinder.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ protected void addAssetDirectories(Modules modules, String baseDir) {
6363
List<String> recognizedPaths = getRecognizedPaths();
6464

6565
// classpath needs the trailing / to find child dirs
66-
findResources("asset module directories", baseDir, "*", "*/").stream().forEach(resource -> {
66+
findResources("non-REST module directories", baseDir, "*", "*/").stream().forEach(resource -> {
6767
try {
6868
String resourceFile = resource.getURL().getFile();
6969
if (logger.isDebugEnabled()) {
70-
logger.debug("Checking resource to see if it's a valid asset directory: " + resourceFile);
70+
logger.debug("Checking resource to see if it's a valid non-REST module directory: " + resourceFile);
7171
}
7272

7373
resourceFile = decodeAssetDirectoryResource(resourceFile);
@@ -107,7 +107,7 @@ protected String decodeAssetDirectoryResource(String resourceFile) {
107107
if (resourceFile.contains("%20")) {
108108
resourceFile = resourceFile.replaceAll("%20", " ");
109109
if (logger.isDebugEnabled()) {
110-
logger.debug("Replaced occurrences of %20 with a space in potential asset directory: " + resourceFile);
110+
logger.debug("Replaced occurrences of %20 with a space in potential non-REST module directory: " + resourceFile);
111111
}
112112
}
113113
return resourceFile;

src/main/java/com/marklogic/client/ext/modulesloader/impl/DefaultModulesLoader.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public DefaultModulesLoader(AssetFileLoader assetFileLoader) {
9494
}
9595

9696
/**
97-
* Use this when you don't need to load asset modules.
97+
* Use this when you don't need to load asset modules - i.e. only need to load REST modules.
9898
*/
9999
public DefaultModulesLoader() {
100100
this.extensionMetadataProvider = new DefaultExtensionMetadataProvider();
@@ -124,8 +124,8 @@ public void initializeDefaultTaskExecutor() {
124124
/**
125125
* Load modules from the given base directory, selecting modules via the given ModulesFinder, and loading them via
126126
* the given DatabaseClient. Note that asset modules will not be loaded by the DatabaseClient that's passed in here,
127-
* because the /v1/ext endpoint is so slow - load assets instead via a RestApiAssetLoader or an XccAssetLoader
128-
* passed into a constructor for this class.
127+
* because the /v1/ext endpoint is too slow when there are e.g. hundreds of modules or more - asset modules are
128+
* instead loaded via AssetFileLoader.
129129
*/
130130
public Set<Resource> loadModules(String baseDir, ModulesFinder modulesFinder, DatabaseClient client) {
131131
if (logger.isDebugEnabled()) {
@@ -330,7 +330,7 @@ protected void loadAssets(Modules modules, Set<Resource> loadedModules) {
330330
}
331331

332332
if (logger.isDebugEnabled()) {
333-
logger.debug("Loading asset modules from paths: " + Arrays.asList(paths));
333+
logger.debug("Loading non-REST modules from paths: " + Arrays.asList(paths));
334334
}
335335

336336
if (includeFilenamePattern != null) {

0 commit comments

Comments
 (0)