flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephan Ewen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-3228) Cannot submit multiple streaming involving JDBC drivers
Date Wed, 10 Feb 2016 20:55:18 GMT

    [ https://issues.apache.org/jira/browse/FLINK-3228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15141650#comment-15141650

Stephan Ewen commented on FLINK-3228:

[~ndimiduk] Are you using Flink's regular {{JDBCOutputFormat}}? That one actually uses Gyula's
trick already.

One thing you can try is change the {{JDBCOutputFormat}} to bind the class to the UserCodeClassloader
explicitly. Replacing the following line:
with this
Class.forName(drivername, true, getRuntimeContext().getUserCodeClassLoader());

> Cannot submit multiple streaming involving JDBC drivers
> -------------------------------------------------------
>                 Key: FLINK-3228
>                 URL: https://issues.apache.org/jira/browse/FLINK-3228
>             Project: Flink
>          Issue Type: Bug
>          Components: Streaming
>    Affects Versions: 0.10.1
>            Reporter: Nick Dimiduk
> I have a streaming pipeline that writes to JDBC in its SinkFunction. When testing in
local mode, I cannot submit the same job multiple times without restarting flink. Failing
to restart flink results in {{java.sql.SQLException: No suitable driver found}}. I think this
has to do with how flink loads user classes and how the {{DriverManager}} resolves the JDBC
Connection class.
> I'm not sure if this is only when running in local mode, or in general. I've been using
YARN for cluster jobs, where I have 1:1 cluster to jobs. I suspect it will impact any cluster
mode where processes are recycled between jobs.

This message was sent by Atlassian JIRA

View raw message