Skip to content

Commit 33b7647

Browse files
authored
[CORE] Avoid getting duplicate resource files for component discovery (#11043)
1 parent c3e5a63 commit 33b7647

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

gluten-core/src/main/java/org/apache/gluten/utils/ResourceUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public static List<String> getResources(final String container, final Pattern pa
5757
final List<String> buffer = new ArrayList<>();
5858
final Enumeration<URL> containerUrls;
5959
try {
60-
containerUrls = Thread.currentThread().getContextClassLoader().getResources(container);
60+
containerUrls = ResourceUtil.class.getClassLoader().getResources(container);
6161
} catch (IOException e) {
6262
throw new GlutenException(e);
6363
}

gluten-core/src/main/scala/org/apache/gluten/component/Discovery.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private object Discovery extends Logging {
6262
val out = allFiles.flatMap {
6363
case componentFilePattern(className) =>
6464
if (!deDup.add(className)) {
65-
logWarning(s"Found duplicated component class $className in then classpath, ignoring.")
65+
logWarning(s"Found duplicated component class $className in the classpath, ignoring.")
6666
None
6767
} else {
6868
val clazz =

0 commit comments

Comments
 (0)