Re: [Dev] [DEV] [CEP] MySQL table storage engine and character set used with Output Mysql Event Adaptor

2016-05-27 Thread Thanuja Uruththirakodeeswaran
Hi ,

On Fri, May 27, 2016 at 1:11 AM, Lasantha Fernando 
wrote:

> Hi Thanuja,
>
> Were you able to resolve the issue after changing the charset and engine?
> Also can you specify the MySQL connector version that you were using?
>

Yes, It worked with MyISAM and utf-8. Connector version is *5.1.36.*

>
> @Mohan, we did a debug session and what we could observe was that the
> encoding was set to windows-1252 as I remember. The main issue here was
> that there is a logic in MySQL adapter to retrieve the data type of each
> column and we map these types to our databridge data types. However, all
> non-string data types were returning the value -1, instead of assigned data
> type number for BIGINT, INT etc. We were thinking since it was returning
> different or incorrect values, this was due to charset mismatch or engine
> mismatch.
>

When we were debugging last time, I've pointed the adapter to already
created table which mapped 'long' type stream attribute to 'text' column
type. Also stream attributes with 'string' type also mapped to 'text'
column type in table. Once I drop the table and let the adpator creates it,
table columns are set to BIGINT and VARCHAR type. Now I'm not getting the
NPE. But data is not inserted to table.

>
> Relevant code is under initializeTableInfo() in [1]
>
> [1]
> https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/event-stream/event-output-adaptor/org.wso2.carbon.event.output.adaptor.mysql/1.0.1/src/main/java/org/wso2/carbon/event/output/adaptor/mysql/MysqlEventAdaptorType.java
>
> Thanks,
> Lasantha
>
> On 27 May 2016 at 00:38, Mohanadarshan Vivekanandalingam 
> wrote:
>
>>
>>
>> On Fri, May 27, 2016 at 12:17 AM, Thanuja Uruththirakodeeswaran <
>> thanu...@wso2.com> wrote:
>>
>>> Hi ,
>>>
>>> Do we need to set the MySQL *storage engine* as '*MyISAM*' and *character
>>> set *to* utf8* for the tables created by the CEP Output MySQL Event
>>> Adaptors?
>>>
>>> I'm using CEP 3.0.0/3.1.0 with MySQL server version *5.6.30*. If I
>>> don't set those, by default storage engine is set to *InnoDB* and
>>> character set is set to *latin1 *and events are not persisted in the
>>> table. Once I change those as said above, events are persisted in the table.
>>>
>>>
>> No, it is not a requirement..
>>
>> I am using MySQL server version 5.6.28.. Tried with InnoDB engine and
>> latin1 charset and it is working fine.. Have you checked data format that
>> you tried to insert ?
>>
> Mohan
>>
>>
>>
>>> Thanks.
>>>
>>> --
>>> Thanuja Uruththirakodeeswaran
>>> Software Engineer
>>> WSO2 Inc.;http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> mobile: +94 774363167
>>>
>>
>>
>>
>> --
>> *V. Mohanadarshan*
>> *Senior Software Engineer,*
>> *Data Technologies Team,*
>> *WSO2, Inc. http://wso2.com  *
>> *lean.enterprise.middleware.*
>>
>> email: mo...@wso2.com
>> phone:(+94) 771117673
>>
>> ___
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Lasantha Fernando*
> Senior Software Engineer - Data Technologies Team
> WSO2 Inc. http://wso2.com
>
> email: lasan...@wso2.com
> mobile: (+94) 71 5247551
>



-- 
Thanuja Uruththirakodeeswaran
Software Engineer
WSO2 Inc.;http://wso2.com
lean.enterprise.middleware

mobile: +94 774363167
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV] [CEP] MySQL table storage engine and character set used with Output Mysql Event Adaptor

2016-05-26 Thread Lasantha Fernando
Hi Thanuja,

Were you able to resolve the issue after changing the charset and engine?
Also can you specify the MySQL connector version that you were using?

@Mohan, we did a debug session and what we could observe was that the
encoding was set to windows-1252 as I remember. The main issue here was
that there is a logic in MySQL adapter to retrieve the data type of each
column and we map these types to our databridge data types. However, all
non-string data types were returning the value -1, instead of assigned data
type number for BIGINT, INT etc. We were thinking since it was returning
different or incorrect values, this was due to charset mismatch or engine
mismatch.

Relevant code is under initializeTableInfo() in [1]

[1]
https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/event-stream/event-output-adaptor/org.wso2.carbon.event.output.adaptor.mysql/1.0.1/src/main/java/org/wso2/carbon/event/output/adaptor/mysql/MysqlEventAdaptorType.java

Thanks,
Lasantha

On 27 May 2016 at 00:38, Mohanadarshan Vivekanandalingam 
wrote:

>
>
> On Fri, May 27, 2016 at 12:17 AM, Thanuja Uruththirakodeeswaran <
> thanu...@wso2.com> wrote:
>
>> Hi ,
>>
>> Do we need to set the MySQL *storage engine* as '*MyISAM*' and *character
>> set *to* utf8* for the tables created by the CEP Output MySQL Event
>> Adaptors?
>>
>> I'm using CEP 3.0.0/3.1.0 with MySQL server version *5.6.30*. If I don't
>> set those, by default storage engine is set to *InnoDB* and character
>> set is set to *latin1 *and events are not persisted in the table. Once I
>> change those as said above, events are persisted in the table.
>>
>>
> No, it is not a requirement..
>
> I am using MySQL server version 5.6.28.. Tried with InnoDB engine and
> latin1 charset and it is working fine.. Have you checked data format that
> you tried to insert ?
>
> Thanks,
> Mohan
>
>
>
>> Thanks.
>>
>> --
>> Thanuja Uruththirakodeeswaran
>> Software Engineer
>> WSO2 Inc.;http://wso2.com
>> lean.enterprise.middleware
>>
>> mobile: +94 774363167
>>
>
>
>
> --
> *V. Mohanadarshan*
> *Senior Software Engineer,*
> *Data Technologies Team,*
> *WSO2, Inc. http://wso2.com  *
> *lean.enterprise.middleware.*
>
> email: mo...@wso2.com
> phone:(+94) 771117673
>
> ___
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Lasantha Fernando*
Senior Software Engineer - Data Technologies Team
WSO2 Inc. http://wso2.com

email: lasan...@wso2.com
mobile: (+94) 71 5247551
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [DEV] [CEP] MySQL table storage engine and character set used with Output Mysql Event Adaptor

2016-05-26 Thread Mohanadarshan Vivekanandalingam
On Fri, May 27, 2016 at 12:17 AM, Thanuja Uruththirakodeeswaran <
thanu...@wso2.com> wrote:

> Hi ,
>
> Do we need to set the MySQL *storage engine* as '*MyISAM*' and *character
> set *to* utf8* for the tables created by the CEP Output MySQL Event
> Adaptors?
>
> I'm using CEP 3.0.0/3.1.0 with MySQL server version *5.6.30*. If I don't
> set those, by default storage engine is set to *InnoDB* and character set
> is set to *latin1 *and events are not persisted in the table. Once I
> change those as said above, events are persisted in the table.
>
>
No, it is not a requirement..

I am using MySQL server version 5.6.28.. Tried with InnoDB engine and
latin1 charset and it is working fine.. Have you checked data format that
you tried to insert ?

Thanks,
Mohan



> Thanks.
>
> --
> Thanuja Uruththirakodeeswaran
> Software Engineer
> WSO2 Inc.;http://wso2.com
> lean.enterprise.middleware
>
> mobile: +94 774363167
>



-- 
*V. Mohanadarshan*
*Senior Software Engineer,*
*Data Technologies Team,*
*WSO2, Inc. http://wso2.com  *
*lean.enterprise.middleware.*

email: mo...@wso2.com
phone:(+94) 771117673
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [DEV] [CEP] MySQL table storage engine and character set used with Output Mysql Event Adaptor

2016-05-26 Thread Thanuja Uruththirakodeeswaran
Hi ,

Do we need to set the MySQL *storage engine* as '*MyISAM*' and *character
set *to* utf8* for the tables created by the CEP Output MySQL Event
Adaptors?

I'm using CEP 3.0.0/3.1.0 with MySQL server version *5.6.30*. If I don't
set those, by default storage engine is set to *InnoDB* and character set
is set to *latin1 *and events are not persisted in the table. Once I change
those as said above, events are persisted in the table.

Thanks.

-- 
Thanuja Uruththirakodeeswaran
Software Engineer
WSO2 Inc.;http://wso2.com
lean.enterprise.middleware

mobile: +94 774363167
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev