[jira] [Updated] (FLINK-17544) NPE JDBCUpsertOutputFormat

2020-06-21 Thread Jark Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/FLINK-17544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jark Wu updated FLINK-17544:

Fix Version/s: (was: 1.10.2)

> NPE JDBCUpsertOutputFormat
> --
>
> Key: FLINK-17544
> URL: https://issues.apache.org/jira/browse/FLINK-17544
> Project: Flink
>  Issue Type: Improvement
>  Components: Connectors / JDBC
>Affects Versions: 1.10.0
>Reporter: John Lonergan
>Assignee: Shengkai Fang
>Priority: Major
>  Labels: pull-request-available
> Fix For: 1.11.0
>
>
> Encountered a situation where I get an NPE from JDBCUpsertOutputFormat.
>  This occurs when close is called before open.
> This happened because I had a sink where it had a final field of type 
> JDBCUpsertOutputFormat.
> The open operation of my sink was slow (blocked on something else) and open 
> on the JDBCUpsertOutputFormat had not yet been called. 
>  In the mean time the job was cancelled, which caused close on my sink to be 
> called, which then 
>  called close on the JDBCUpsertOutputFormat . 
>  This throws an NPE due to a lack of a guard on an internal field that is 
> only initialised in the JDBCUpsertOutputFormat open operation.
> The close method already guards one potentially null value ..
> {code:java}
> if (this.scheduledFuture != null) {
> {code}
> But needs the additional guard below ...
> {code:java}
> if (jdbcWriter != null)   // << THIS LINE NEEDED TO GUARD UNINITIALISE VAR
>try {
>   jdbcWriter.close();
>} catch (SQLException e) {
>   LOG.warn("Close JDBC writer failed.", e);
>}
> {code}
> See also FLINK-17545



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (FLINK-17544) NPE JDBCUpsertOutputFormat

2020-06-18 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/FLINK-17544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated FLINK-17544:
---
Labels: pull-request-available  (was: )

> NPE JDBCUpsertOutputFormat
> --
>
> Key: FLINK-17544
> URL: https://issues.apache.org/jira/browse/FLINK-17544
> Project: Flink
>  Issue Type: Improvement
>  Components: Connectors / JDBC
>Affects Versions: 1.10.0
>Reporter: John Lonergan
>Assignee: Shengkai Fang
>Priority: Major
>  Labels: pull-request-available
> Fix For: 1.11.0, 1.10.2
>
>
> Encountered a situation where I get an NPE from JDBCUpsertOutputFormat.
>  This occurs when close is called before open.
> This happened because I had a sink where it had a final field of type 
> JDBCUpsertOutputFormat.
> The open operation of my sink was slow (blocked on something else) and open 
> on the JDBCUpsertOutputFormat had not yet been called. 
>  In the mean time the job was cancelled, which caused close on my sink to be 
> called, which then 
>  called close on the JDBCUpsertOutputFormat . 
>  This throws an NPE due to a lack of a guard on an internal field that is 
> only initialised in the JDBCUpsertOutputFormat open operation.
> The close method already guards one potentially null value ..
> {code:java}
> if (this.scheduledFuture != null) {
> {code}
> But needs the additional guard below ...
> {code:java}
> if (jdbcWriter != null)   // << THIS LINE NEEDED TO GUARD UNINITIALISE VAR
>try {
>   jdbcWriter.close();
>} catch (SQLException e) {
>   LOG.warn("Close JDBC writer failed.", e);
>}
> {code}
> See also FLINK-17545



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (FLINK-17544) NPE JDBCUpsertOutputFormat

2020-05-06 Thread Jark Wu (Jira)


 [ 
https://issues.apache.org/jira/browse/FLINK-17544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jark Wu updated FLINK-17544:

Fix Version/s: 1.10.2
   1.11.0

> NPE JDBCUpsertOutputFormat
> --
>
> Key: FLINK-17544
> URL: https://issues.apache.org/jira/browse/FLINK-17544
> Project: Flink
>  Issue Type: Improvement
>  Components: Connectors / JDBC
>Affects Versions: 1.10.0
>Reporter: John Lonergan
>Priority: Major
> Fix For: 1.11.0, 1.10.2
>
>
> Encountered a situation where I get an NPE from JDBCUpsertOutputFormat.
>  This occurs when close is called before open.
> This happened because I had a sink where it had a final field of type 
> JDBCUpsertOutputFormat.
> The open operation of my sink was slow (blocked on something else) and open 
> on the JDBCUpsertOutputFormat had not yet been called. 
>  In the mean time the job was cancelled, which caused close on my sink to be 
> called, which then 
>  called close on the JDBCUpsertOutputFormat . 
>  This throws an NPE due to a lack of a guard on an internal field that is 
> only initialised in the JDBCUpsertOutputFormat open operation.
> The close method already guards one potentially null value ..
> {code:java}
> if (this.scheduledFuture != null) {
> {code}
> But needs the additional guard below ...
> {code:java}
> if (jdbcWriter != null)   // << THIS LINE NEEDED TO GUARD UNINITIALISE VAR
>try {
>   jdbcWriter.close();
>} catch (SQLException e) {
>   LOG.warn("Close JDBC writer failed.", e);
>}
> {code}
> See also FLINK-17545



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (FLINK-17544) NPE JDBCUpsertOutputFormat

2020-05-06 Thread John Lonergan (Jira)


 [ 
https://issues.apache.org/jira/browse/FLINK-17544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

John Lonergan updated FLINK-17544:
--
Description: 
Encountered a situation where I get an NPE from JDBCUpsertOutputFormat.
 This occurs when close is called before open.

This happened because I had a sink where it had a final field of type 
JDBCUpsertOutputFormat.

The open operation of my sink was slow (blocked on something else) and open on 
the JDBCUpsertOutputFormat had not yet been called. 
 In the mean time the job was cancelled, which caused close on my sink to be 
called, which then 
 called close on the JDBCUpsertOutputFormat . 
 This throws an NPE due to a lack of a guard on an internal field that is only 
initialised in the JDBCUpsertOutputFormat open operation.

The close method already guards one potentially null value ..
{code:java}
if (this.scheduledFuture != null) {
{code}
But needs the additional guard below ...
{code:java}
if (jdbcWriter != null)   // << THIS LINE NEEDED TO GUARD UNINITIALISE VAR
   try {
  jdbcWriter.close();
   } catch (SQLException e) {
  LOG.warn("Close JDBC writer failed.", e);
   }

{code}

See also FLINK-17545


  was:
Encountered a situation where I get an NPE from JDBCUpsertOutputFormat.
 This occurs when close is called before open.

This happened because I had a sink where it had a final field of type 
JDBCUpsertOutputFormat.

The open operation of my sink was slow (blocked on something else) and open on 
the JDBCUpsertOutputFormat had not yet been called. 
 In the mean time the job was cancelled, which caused close on my sink to be 
called, which then 
 called close on the JDBCUpsertOutputFormat . 
 This throws an NPE due to a lack of a guard on an internal field that is only 
initialised in the JDBCUpsertOutputFormat open operation.

The close method already guards one potentially null value ..
{code:java}
if (this.scheduledFuture != null) {
{code}
But needs the additional guard below ...
{code:java}
if (jdbcWriter != null)   // << THIS LINE NEEDED TO GUARD UNINITIALISE VAR
   try {
  jdbcWriter.close();
   } catch (SQLException e) {
  LOG.warn("Close JDBC writer failed.", e);
   }

{code}




> NPE JDBCUpsertOutputFormat
> --
>
> Key: FLINK-17544
> URL: https://issues.apache.org/jira/browse/FLINK-17544
> Project: Flink
>  Issue Type: Improvement
>  Components: Connectors / JDBC
>Affects Versions: 1.10.0
>Reporter: John Lonergan
>Priority: Major
>
> Encountered a situation where I get an NPE from JDBCUpsertOutputFormat.
>  This occurs when close is called before open.
> This happened because I had a sink where it had a final field of type 
> JDBCUpsertOutputFormat.
> The open operation of my sink was slow (blocked on something else) and open 
> on the JDBCUpsertOutputFormat had not yet been called. 
>  In the mean time the job was cancelled, which caused close on my sink to be 
> called, which then 
>  called close on the JDBCUpsertOutputFormat . 
>  This throws an NPE due to a lack of a guard on an internal field that is 
> only initialised in the JDBCUpsertOutputFormat open operation.
> The close method already guards one potentially null value ..
> {code:java}
> if (this.scheduledFuture != null) {
> {code}
> But needs the additional guard below ...
> {code:java}
> if (jdbcWriter != null)   // << THIS LINE NEEDED TO GUARD UNINITIALISE VAR
>try {
>   jdbcWriter.close();
>} catch (SQLException e) {
>   LOG.warn("Close JDBC writer failed.", e);
>}
> {code}
> See also FLINK-17545



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (FLINK-17544) NPE JDBCUpsertOutputFormat

2020-05-06 Thread John Lonergan (Jira)


 [ 
https://issues.apache.org/jira/browse/FLINK-17544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

John Lonergan updated FLINK-17544:
--
Description: 
Encountered a situation where I get an NPE from JDBCUpsertOutputFormat.
 This occurs when close is called before open.

This happened because I had a sink where it had a final field of type 
JDBCUpsertOutputFormat.

The open operation of my sink was slow (blocked on something else) and open on 
the JDBCUpsertOutputFormat had not yet been called. 
 In the mean time the job was cancelled, which caused close on my sink to be 
called, which then 
 called close on the JDBCUpsertOutputFormat . 
 This throws an NPE due to a lack of a guard on an internal field that is only 
initialised in the JDBCUpsertOutputFormat open operation.

The close method already guards one potentially null value ..
{code:java}
if (this.scheduledFuture != null) {
{code}
But needs the additional guard below ...
{code:java}
if (jdbcWriter != null)   // << THIS LINE NEEDED TO GUARD UNINITIALISE VAR
   try {
  jdbcWriter.close();
   } catch (SQLException e) {
  LOG.warn("Close JDBC writer failed.", e);
   }

{code}



  was:
Encountered a situation where I get an NPE from JDBCUpsertOutputFormat.
This occurs when close is called before open.

This happened because I had a sink where it had a final field of type 
JDBCUpsertOutputFormat.

The open operation of my sink was slow (blocked on something else) and open on 
the JDBCUpsertOutputFormat had not yet been called. 
In the mean time the job was cancelled, which caused close on my sink to be 
called, which then 
 called close on the JDBCUpsertOutputFormat . 
This throws an NPE due to a lack of a guard on an internal field that is only 
initialised in the JDBCUpsertOutputFormat open operation.

The close method already guards one potentially null value .. 
{code:java}
if (this.scheduledFuture != null) {
{code}

But needs the additional guard below ...

{code:java}
if (jdbcWriter != null)   // << THIS LINE NEEDED TO GUARD UNINITIALISE VAR
   try {
  jdbcWriter.close();
   } catch (SQLException e) {
  LOG.warn("Close JDBC writer failed.", e);
   }
{code}



> NPE JDBCUpsertOutputFormat
> --
>
> Key: FLINK-17544
> URL: https://issues.apache.org/jira/browse/FLINK-17544
> Project: Flink
>  Issue Type: Improvement
>  Components: Connectors / JDBC
>Affects Versions: 1.10.0
>Reporter: John Lonergan
>Priority: Major
>
> Encountered a situation where I get an NPE from JDBCUpsertOutputFormat.
>  This occurs when close is called before open.
> This happened because I had a sink where it had a final field of type 
> JDBCUpsertOutputFormat.
> The open operation of my sink was slow (blocked on something else) and open 
> on the JDBCUpsertOutputFormat had not yet been called. 
>  In the mean time the job was cancelled, which caused close on my sink to be 
> called, which then 
>  called close on the JDBCUpsertOutputFormat . 
>  This throws an NPE due to a lack of a guard on an internal field that is 
> only initialised in the JDBCUpsertOutputFormat open operation.
> The close method already guards one potentially null value ..
> {code:java}
> if (this.scheduledFuture != null) {
> {code}
> But needs the additional guard below ...
> {code:java}
> if (jdbcWriter != null)   // << THIS LINE NEEDED TO GUARD UNINITIALISE VAR
>try {
>   jdbcWriter.close();
>} catch (SQLException e) {
>   LOG.warn("Close JDBC writer failed.", e);
>}
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)