Martijn Visser created FLINK-41555:
--------------------------------------
Summary: PlanReference.fromResource fails for a plan inside a JAR
Key: FLINK-41555
URL: https://issues.apache.org/jira/browse/FLINK-41555
Project: Flink
Issue Type: Bug
Components: Table SQL / Planner
Reporter: Martijn Visser
Assignee: Martijn Visser
{{PlanReference.fromResource}} works when the plan is in a directory on the
classpath, but fails with {{IllegalArgumentException: URI is not hierarchical}}
when it is in a JAR, which is the usual place for a resource of a job.
{{PlannerBase#loadPlan}} turns the resource URL into a {{File}} with {{new
File(url.toURI)}}, which doesn't work for a {{jar:}} URL. We should read the
plan from the URL's stream instead. Until then, reading the resource yourself
and using {{PlanReference.fromJsonString}} works, which is what the docs from
FLINK-26250 show.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)