flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Metzger (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-4097) Cassandra Sink throws NPE on closing if server is not available
Date Tue, 21 Jun 2016 15:43:58 GMT

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

Robert Metzger commented on FLINK-4097:
---------------------------------------

Oh yes. You are right. Maybe it would make sense to add a null check to avoid the exception,
as it might confuse our users. What do you think?
Other connectors do the same (it can happen in many cases that operators are closed without
a proper initialization, for example when the open() fails, or when other tasks fail during
deployment and everything is cancelled in the beginning).

> Cassandra Sink throws NPE on closing if server is not available
> ---------------------------------------------------------------
>
>                 Key: FLINK-4097
>                 URL: https://issues.apache.org/jira/browse/FLINK-4097
>             Project: Flink
>          Issue Type: Bug
>          Components: Cassandra Connector, Streaming Connectors
>    Affects Versions: 1.1.0
>            Reporter: Robert Metzger
>
> {code}
> 11:41:41,515 ERROR org.apache.flink.streaming.connectors.cassandra.CassandraSinkBase
 - Error while closing session.
> java.lang.NullPointerException
> 	at org.apache.flink.streaming.connectors.cassandra.CassandraSinkBase.close(CassandraSinkBase.java:84)
> 	at org.apache.flink.api.common.functions.util.FunctionUtils.closeFunction(FunctionUtils.java:45)
> 	at org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator.dispose(AbstractUdfStreamOperator.java:107)
> 	at org.apache.flink.streaming.runtime.tasks.StreamTask.disposeAllOperators(StreamTask.java:370)
> 	at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:304)
> 	at org.apache.flink.runtime.taskmanager.Task.run(Task.java:588)
> 	at java.lang.Thread.run(Thread.java:745)
> {code}
> {code}
> 11:41:43,896 ERROR org.apache.flink.runtime.taskmanager.Task                     - Task
execution failed. 
> com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query
failed (tried: /127.0.0.1:9042 (com.datastax.driver.core.exceptions.TransportException: [/127.0.0.1]
Cannot connect))
> 	at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:231)
> 	at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:77)
> 	at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1414)
> 	at com.datastax.driver.core.Cluster.init(Cluster.java:162)
> 	at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:333)
> 	at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:308)
> 	at com.datastax.driver.core.Cluster.connect(Cluster.java:250)
> 	at org.apache.flink.streaming.connectors.cassandra.CassandraSinkBase.open(CassandraSinkBase.java:67)
> 	at org.apache.flink.streaming.connectors.cassandra.CassandraPojoSink.open(CassandraPojoSink.java:48)
> 	at org.apache.flink.api.common.functions.util.FunctionUtils.openFunction(FunctionUtils.java:38)
> 	at org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator.open(AbstractUdfStreamOperator.java:91)
> 	at org.apache.flink.streaming.runtime.tasks.StreamTask.openAllOperators(StreamTask.java:340)
> 	at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:225)
> 	at org.apache.flink.runtime.taskmanager.Task.run(Task.java:588)
> 	at java.lang.Thread.run(Thread.java:745)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message