You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Swapnil Chougule <th...@gmail.com> on 2016/09/20 08:52:14 UTC
Flink JDBCOutputFormat logs wrong WARN message
I checked following code in Flink JDBCOutputFormat while I was using in my
project work. I found following snippet:
@Override
public void writeRecord(Row row) throws IOException {
if (typesArray != null && typesArray.length > 0 &&
typesArray.length == row.productArity()) {
LOG.warn("Column SQL types array doesn't match arity of passed
Row! Check the passed array...");
}
...
}
I am finding this "if" condition wrong. It should be
if (typesArray != null && typesArray.length > 0 && typesArray.length !=
row.productArity())
As a result, it is logging wrong warning in my logs which is incorrect.
(Even if typearray matches arity of passed row)
May I have inputs on same ?
Thanks,
Swapnil
Re: Flink JDBCOutputFormat logs wrong WARN message
Posted by Swapnil Chougule <th...@gmail.com>.
Thanks Marton !!
On Thu, Sep 22, 2016 at 4:36 PM, Márton Balassi <ba...@gmail.com>
wrote:
> Done. Go ahead, Swapnil.
>
> Best,
> Marton
>
> On Thu, Sep 22, 2016 at 1:03 PM, Swapnil Chougule <the.swapnil09@gmail.com
> > wrote:
>
>> Hi Fabian/ Chesnay
>> Can anybody give me permission to assign JIRA (created for same.)?
>>
>> Thanks,
>> Swapnil
>>
>> On Tue, Sep 20, 2016 at 6:18 PM, Swapnil Chougule <
>> the.swapnil09@gmail.com> wrote:
>>
>>> Thanks Chesnay & Fabian for update.
>>> I will create JIRA issue & open a pull request to fix it.
>>>
>>> Thanks,
>>> Swapnil
>>>
>>> On Tue, Sep 20, 2016 at 2:54 PM, Fabian Hueske <fh...@gmail.com>
>>> wrote:
>>>
>>>> Yes, the condition needs to be fixed.
>>>>
>>>> @Swapnil, would you like to create a JIRA issue and open a pull request
>>>> to fix it?
>>>>
>>>> Thanks, Fabian
>>>>
>>>> 2016-09-20 11:22 GMT+02:00 Chesnay Schepler <ch...@apache.org>:
>>>>
>>>>> I would agree that the condition should be changed.
>>>>>
>>>>>
>>>>> On 20.09.2016 10:52, Swapnil Chougule wrote:
>>>>>
>>>>>> I checked following code in Flink JDBCOutputFormat while I was using
>>>>>> in my project work. I found following snippet:
>>>>>>
>>>>>> @Override
>>>>>> public void writeRecord(Row row) throws IOException {
>>>>>>
>>>>>> if (typesArray != null && typesArray.length > 0 &&
>>>>>> typesArray.length == row.productArity()) {
>>>>>> LOG.warn("Column SQL types array doesn't match arity of
>>>>>> passed Row! Check the passed array...");
>>>>>> }
>>>>>> ...
>>>>>> }
>>>>>>
>>>>>> I am finding this "if" condition wrong. It should be
>>>>>>
>>>>>> if (typesArray != null && typesArray.length > 0 && typesArray.length
>>>>>> != row.productArity())
>>>>>>
>>>>>> As a result, it is logging wrong warning in my logs which is
>>>>>> incorrect. (Even if typearray matches arity of passed row)
>>>>>> May I have inputs on same ?
>>>>>>
>>>>>> Thanks,
>>>>>> Swapnil
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>
Re: Flink JDBCOutputFormat logs wrong WARN message
Posted by Márton Balassi <ba...@gmail.com>.
Done. Go ahead, Swapnil.
Best,
Marton
On Thu, Sep 22, 2016 at 1:03 PM, Swapnil Chougule <th...@gmail.com>
wrote:
> Hi Fabian/ Chesnay
> Can anybody give me permission to assign JIRA (created for same.)?
>
> Thanks,
> Swapnil
>
> On Tue, Sep 20, 2016 at 6:18 PM, Swapnil Chougule <the.swapnil09@gmail.com
> > wrote:
>
>> Thanks Chesnay & Fabian for update.
>> I will create JIRA issue & open a pull request to fix it.
>>
>> Thanks,
>> Swapnil
>>
>> On Tue, Sep 20, 2016 at 2:54 PM, Fabian Hueske <fh...@gmail.com> wrote:
>>
>>> Yes, the condition needs to be fixed.
>>>
>>> @Swapnil, would you like to create a JIRA issue and open a pull request
>>> to fix it?
>>>
>>> Thanks, Fabian
>>>
>>> 2016-09-20 11:22 GMT+02:00 Chesnay Schepler <ch...@apache.org>:
>>>
>>>> I would agree that the condition should be changed.
>>>>
>>>>
>>>> On 20.09.2016 10:52, Swapnil Chougule wrote:
>>>>
>>>>> I checked following code in Flink JDBCOutputFormat while I was using
>>>>> in my project work. I found following snippet:
>>>>>
>>>>> @Override
>>>>> public void writeRecord(Row row) throws IOException {
>>>>>
>>>>> if (typesArray != null && typesArray.length > 0 &&
>>>>> typesArray.length == row.productArity()) {
>>>>> LOG.warn("Column SQL types array doesn't match arity of
>>>>> passed Row! Check the passed array...");
>>>>> }
>>>>> ...
>>>>> }
>>>>>
>>>>> I am finding this "if" condition wrong. It should be
>>>>>
>>>>> if (typesArray != null && typesArray.length > 0 && typesArray.length
>>>>> != row.productArity())
>>>>>
>>>>> As a result, it is logging wrong warning in my logs which is
>>>>> incorrect. (Even if typearray matches arity of passed row)
>>>>> May I have inputs on same ?
>>>>>
>>>>> Thanks,
>>>>> Swapnil
>>>>>
>>>>
>>>>
>>>
>>
>
Re: Flink JDBCOutputFormat logs wrong WARN message
Posted by Swapnil Chougule <th...@gmail.com>.
Hi Fabian/ Chesnay
Can anybody give me permission to assign JIRA (created for same.)?
Thanks,
Swapnil
On Tue, Sep 20, 2016 at 6:18 PM, Swapnil Chougule <th...@gmail.com>
wrote:
> Thanks Chesnay & Fabian for update.
> I will create JIRA issue & open a pull request to fix it.
>
> Thanks,
> Swapnil
>
> On Tue, Sep 20, 2016 at 2:54 PM, Fabian Hueske <fh...@gmail.com> wrote:
>
>> Yes, the condition needs to be fixed.
>>
>> @Swapnil, would you like to create a JIRA issue and open a pull request
>> to fix it?
>>
>> Thanks, Fabian
>>
>> 2016-09-20 11:22 GMT+02:00 Chesnay Schepler <ch...@apache.org>:
>>
>>> I would agree that the condition should be changed.
>>>
>>>
>>> On 20.09.2016 10:52, Swapnil Chougule wrote:
>>>
>>>> I checked following code in Flink JDBCOutputFormat while I was using in
>>>> my project work. I found following snippet:
>>>>
>>>> @Override
>>>> public void writeRecord(Row row) throws IOException {
>>>>
>>>> if (typesArray != null && typesArray.length > 0 &&
>>>> typesArray.length == row.productArity()) {
>>>> LOG.warn("Column SQL types array doesn't match arity of
>>>> passed Row! Check the passed array...");
>>>> }
>>>> ...
>>>> }
>>>>
>>>> I am finding this "if" condition wrong. It should be
>>>>
>>>> if (typesArray != null && typesArray.length > 0 && typesArray.length !=
>>>> row.productArity())
>>>>
>>>> As a result, it is logging wrong warning in my logs which is incorrect.
>>>> (Even if typearray matches arity of passed row)
>>>> May I have inputs on same ?
>>>>
>>>> Thanks,
>>>> Swapnil
>>>>
>>>
>>>
>>
>
Re: Flink JDBCOutputFormat logs wrong WARN message
Posted by Swapnil Chougule <th...@gmail.com>.
Thanks Chesnay & Fabian for update.
I will create JIRA issue & open a pull request to fix it.
Thanks,
Swapnil
On Tue, Sep 20, 2016 at 2:54 PM, Fabian Hueske <fh...@gmail.com> wrote:
> Yes, the condition needs to be fixed.
>
> @Swapnil, would you like to create a JIRA issue and open a pull request to
> fix it?
>
> Thanks, Fabian
>
> 2016-09-20 11:22 GMT+02:00 Chesnay Schepler <ch...@apache.org>:
>
>> I would agree that the condition should be changed.
>>
>>
>> On 20.09.2016 10:52, Swapnil Chougule wrote:
>>
>>> I checked following code in Flink JDBCOutputFormat while I was using in
>>> my project work. I found following snippet:
>>>
>>> @Override
>>> public void writeRecord(Row row) throws IOException {
>>>
>>> if (typesArray != null && typesArray.length > 0 &&
>>> typesArray.length == row.productArity()) {
>>> LOG.warn("Column SQL types array doesn't match arity of
>>> passed Row! Check the passed array...");
>>> }
>>> ...
>>> }
>>>
>>> I am finding this "if" condition wrong. It should be
>>>
>>> if (typesArray != null && typesArray.length > 0 && typesArray.length !=
>>> row.productArity())
>>>
>>> As a result, it is logging wrong warning in my logs which is incorrect.
>>> (Even if typearray matches arity of passed row)
>>> May I have inputs on same ?
>>>
>>> Thanks,
>>> Swapnil
>>>
>>
>>
>
Re: Flink JDBCOutputFormat logs wrong WARN message
Posted by Fabian Hueske <fh...@gmail.com>.
Yes, the condition needs to be fixed.
@Swapnil, would you like to create a JIRA issue and open a pull request to
fix it?
Thanks, Fabian
2016-09-20 11:22 GMT+02:00 Chesnay Schepler <ch...@apache.org>:
> I would agree that the condition should be changed.
>
>
> On 20.09.2016 10:52, Swapnil Chougule wrote:
>
>> I checked following code in Flink JDBCOutputFormat while I was using in
>> my project work. I found following snippet:
>>
>> @Override
>> public void writeRecord(Row row) throws IOException {
>>
>> if (typesArray != null && typesArray.length > 0 &&
>> typesArray.length == row.productArity()) {
>> LOG.warn("Column SQL types array doesn't match arity of
>> passed Row! Check the passed array...");
>> }
>> ...
>> }
>>
>> I am finding this "if" condition wrong. It should be
>>
>> if (typesArray != null && typesArray.length > 0 && typesArray.length !=
>> row.productArity())
>>
>> As a result, it is logging wrong warning in my logs which is incorrect.
>> (Even if typearray matches arity of passed row)
>> May I have inputs on same ?
>>
>> Thanks,
>> Swapnil
>>
>
>
Re: Flink JDBCOutputFormat logs wrong WARN message
Posted by Chesnay Schepler <ch...@apache.org>.
I would agree that the condition should be changed.
On 20.09.2016 10:52, Swapnil Chougule wrote:
> I checked following code in Flink JDBCOutputFormat while I was using
> in my project work. I found following snippet:
>
> @Override
> public void writeRecord(Row row) throws IOException {
>
> if (typesArray != null && typesArray.length > 0 &&
> typesArray.length == row.productArity()) {
> LOG.warn("Column SQL types array doesn't match arity of
> passed Row! Check the passed array...");
> }
> ...
> }
>
> I am finding this "if" condition wrong. It should be
>
> if (typesArray != null && typesArray.length > 0 && typesArray.length
> != row.productArity())
>
> As a result, it is logging wrong warning in my logs which is
> incorrect. (Even if typearray matches arity of passed row)
> May I have inputs on same ?
>
> Thanks,
> Swapnil