Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-4097

Cassandra Sink throws NPE on closing if server is not available

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.0
    • 1.1.0
    • Connectors / Common
    • None

    Description

      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)
      
      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)
      

      Attachments

        Issue Links

          Activity

            People

              alkagin Andrea Sella
              rmetzger Robert Metzger
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: