[
https://issues.apache.org/jira/browse/BEAM-5495?focusedWorklogId=360276&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-360276
]
ASF GitHub Bot logged work on BEAM-5495:
----------------------------------------
Author: ASF GitHub Bot
Created on: 16/Dec/19 14:14
Start Date: 16/Dec/19 14:14
Worklog Time Spent: 10m
Work Description: lgajowy commented on pull request #10268: [BEAM-5495]
PipelineResources algorithm is not working in most environments
URL: https://github.com/apache/beam/pull/10268#discussion_r358254181
##########
File path:
runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/resources/PipelineResourcesDetector.java
##########
@@ -18,10 +18,10 @@
package org.apache.beam.runners.core.construction.resources;
import java.io.Serializable;
-import java.util.List;
+import java.util.stream.Stream;
/** Interface for an algorithm detecting classpath resources for pipelines. */
public interface PipelineResourcesDetector extends Serializable {
- List<String> detect(ClassLoader classLoader);
+ Stream<String> detect(ClassLoader classLoader);
Review comment:
Stream was a better fit in case we want to do filtering outside a
`PipelineResourcesDetector` implementation class. This is already done in
`PipelineResources.java`. This way, when a detector (even a 3rd party one)
provides paths that we know we should not accept, we can easily filter them out
using stream's api and then materialize the result to a collection of our
choice (eg. List or Set - it's up to beam's developers at this point).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 360276)
Time Spent: 12h 40m (was: 12.5h)
> PipelineResources algorithm is not working in most environments
> ---------------------------------------------------------------
>
> Key: BEAM-5495
> URL: https://issues.apache.org/jira/browse/BEAM-5495
> Project: Beam
> Issue Type: Bug
> Components: runner-flink, runner-spark, sdk-java-core
> Reporter: Romain Manni-Bucau
> Assignee: Lukasz Gajowy
> Priority: Major
> Time Spent: 12h 40m
> Remaining Estimate: 0h
>
> Issue are:
> 1. it assumes the classloader is an URLClassLoader (not always true and java
> >= 9 breaks that as well for the app loader)
> 2. it uses loader.getURLs() which leads to including the JRE itself in the
> staged file
> Looks like this detect resource algorithm can't work and should be replaced
> by a SPI rather than a built-in and not extensible algorithm. Another valid
> alternative is to just drop that "guess" logic and force the user to set
> staged files.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)