LadyForest commented on a change in pull request #18394:
URL: https://github.com/apache/flink/pull/18394#discussion_r787401902
##########
File path: flink-formats/flink-orc/pom.xml
##########
@@ -145,6 +145,19 @@ under the License.
<scope>test</scope>
<type>test-jar</type>
</dependency>
+ <dependency>
Review comment:
Because `TestManagedFactory` is located in the `table-common` module but
tested under the `table-planner` module. To achieve this, `TestManagedFactory`
is added to the `org.apache.flink.table.factories.Factory` file under the
`table-planner` module, and this leads to all of these pom file changes. O.w.
SPI for table discovery will fail, the stack trace looks like
```
org.apache.flink.table.api.TableException: Could not instantiate the
executor. Make sure a planner module is on the classpath
at
org.apache.flink.table.api.bridge.internal.AbstractStreamTableEnvironmentImpl.lookupExecutor(AbstractStreamTableEnvironmentImpl.java:109)
at
org.apache.flink.table.api.bridge.scala.internal.StreamTableEnvironmentImpl$.create(StreamTableEnvironmentImpl.scala:320)
at
org.apache.flink.table.api.bridge.scala.StreamTableEnvironment$.create(StreamTableEnvironment.scala:925)
at
org.apache.flink.table.planner.runtime.utils.StreamingTestBase.before(StreamingTestBase.scala:54)
at
org.apache.flink.table.planner.runtime.stream.FsStreamingSinkITCaseBase.before(FsStreamingSinkITCaseBase.scala:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at
org.junit.internal.runners.statements.RunBefores.invokeMethod(RunBefores.java:33)
at
org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at
org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:299)
at
org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.flink.table.api.TableException: Unexpected error when
trying to load service provider for factories.
at
org.apache.flink.table.factories.FactoryUtil.lambda$discoverFactories$19(FactoryUtil.java:813)
at java.util.ArrayList.forEach(ArrayList.java:1249)
at
org.apache.flink.table.factories.FactoryUtil.discoverFactories(FactoryUtil.java:799)
at
org.apache.flink.table.factories.FactoryUtil.discoverFactory(FactoryUtil.java:517)
at
org.apache.flink.table.api.bridge.internal.AbstractStreamTableEnvironmentImpl.lookupExecutor(AbstractStreamTableEnvironmentImpl.java:106)
... 18 more
Caused by: java.util.ServiceConfigurationError:
org.apache.flink.table.factories.Factory: Provider
org.apache.flink.table.factories.TestManagedTableFactory not found
at java.util.ServiceLoader.fail(ServiceLoader.java:239)
at java.util.ServiceLoader.access$300(ServiceLoader.java:185)
at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:372)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
at
org.apache.flink.table.factories.ServiceLoaderUtil.load(ServiceLoaderUtil.java:42)
at
org.apache.flink.table.factories.FactoryUtil.discoverFactories(FactoryUtil.java:798)
... 20 more
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]