Skip to content

greenplum到greenplum报错,老版flinkx1.12,chunjun有问题 #1119

@zlj921020

Description

@zlj921020

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

Caused by: java.lang.ClassCastException: com.pivotal.jdbc.greenplumbase.ddu cannot be cast to org.postgresql.core.BaseConnection
at com.dtstack.chunjun.connector.postgresql.sink.PostgresOutputFormat.openInternal(PostgresOutputFormat.java:92)
at com.dtstack.chunjun.sink.format.BaseRichOutputFormat.open(BaseRichOutputFormat.java:249)
at com.dtstack.chunjun.sink.DtOutputFormatSinkFunction.open(DtOutputFormatSinkFunction.java:95)
at org.apache.flink.api.common.functions.util.FunctionUtils.openFunction(FunctionUtils.java:34)
at org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator.open(AbstractUdfStreamOperator.java:102)
at org.apache.flink.streaming.api.operators.StreamSink.open(StreamSink.java:46)
at org.apache.flink.streaming.runtime.tasks.OperatorChain.initializeStateAndOpenOperators(OperatorChain.java:433)
at org.apache.flink.streaming.runtime.tasks.StreamTask.lambda$beforeInvoke$2(StreamTask.java:545)
at org.apache.flink.streaming.runtime.tasks.StreamTaskActionExecutor$1.runThrowing(StreamTaskActionExecutor.java:50)
at org.apache.flink.streaming.runtime.tasks.StreamTask.beforeInvoke(StreamTask.java:535)
at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:575)
at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:758)

What you expected to happen

Caused by: java.lang.ClassCastException: com.pivotal.jdbc.greenplumbase.ddu cannot be cast to org.postgresql.core.BaseConnection
at com.dtstack.chunjun.connector.postgresql.sink.PostgresOutputFormat.openInternal(PostgresOutputFormat.java:92)
at com.dtstack.chunjun.sink.format.BaseRichOutputFormat.open(BaseRichOutputFormat.java:249)
at com.dtstack.chunjun.sink.DtOutputFormatSinkFunction.open(DtOutputFormatSinkFunction.java:95)
at org.apache.flink.api.common.functions.util.FunctionUtils.openFunction(FunctionUtils.java:34)
at org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator.open(AbstractUdfStreamOperator.java:102)
at org.apache.flink.streaming.api.operators.StreamSink.open(StreamSink.java:46)
at org.apache.flink.streaming.runtime.tasks.OperatorChain.initializeStateAndOpenOperators(OperatorChain.java:433)
at org.apache.flink.streaming.runtime.tasks.StreamTask.lambda$beforeInvoke$2(StreamTask.java:545)
at org.apache.flink.streaming.runtime.tasks.StreamTaskActionExecutor$1.runThrowing(StreamTaskActionExecutor.java:50)
at org.apache.flink.streaming.runtime.tasks.StreamTask.beforeInvoke(StreamTask.java:535)
at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:575)
at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:758)

How to reproduce

最常规的到greenplum的任务,只要是目标是greenplum就报错
{
"job": {
"setting": {
"speed": {
"channel": 1,
"readerChannel": 1,
"writerChannel": 1
}
},
"content": [
{
"reader": {
"name": "greenplumreader",
"parameter": {
"username": "gpadmin",
"password": "gpadmin",
"column": [
{
"name": "a",
"type": "varchar"
}
],
"splitPk": null,
"connection": [
{
"table": [
"public.db_green01"
],
"jdbcUrl": [
"jdbc:pivotal:greenplum://192.168.21.11:5432;DatabaseName=postgres"
]
}
]
}
},
"writer": {
"name": "greenplumwriter",
"parameter": {
"mode": "insert",
"username": "gpadmin",
"password": "gpadmin",
"column": [
{
"name": "a",
"type": "varchar"
}
],
"preSql": null,
"postSql": null,
"connection": [
{
"table": [
"public.g_green080401"
],
"jdbcUrl": "jdbc:pivotal:greenplum://192.168.21.11:5432;DatabaseName=postgres"
}
]
}
}
}
]
}
}

Anything else

No response

Version

master

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions