Ignite Web Console - Loading metadata from MySQL

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Ignite Web Console - Loading metadata from MySQL

Prachi Garg
I am trying to load metadata from MySQL database, but the web console
doesn't allow me to provide the MySQL driver JAR. It is set to H2, by
default, and doesn't let me change. I tried running the Ignite web agent in
both test and non-test modes. How can I provide the MySQL driver JAR?

Thanks,
-Prachi
Reply | Threaded
Open this post in threaded view
|

Re: Ignite Web Console - Loading metadata from MySQL

Alexey Kuznetsov-2
Prachi,

I'm assuming that you have MySQL database up and running and know JDBC URL
for you database (it should looks
like: jdbc:mysql://[host]:[port]/[database]).

You should copy MySQL JDBC driver  jar into "
folder_where_agent_unzipped/jdbc-drivers".
Latest MySQL JDBC driver should looks like
 "mysql-connector-java-5.1.37-bin.jar"
See http://dev.mysql.com/downloads/connector/j/

After that, start agent, go to Web Console, select load metadata, and you
should see dialog for Metadata load.
You should select MySQL jar from dropdown, enter your JDBC
URL, username and password.

About test mode "-tm". This is special mode for quick demo only. No need to
specify this option on agent start if you are going to work with real
database.

It will be really helpful if you read README.txt from
ignite-web-agent-1.5.0.zip and propose changes that will help other users
to avoid such situations?

Thanks,


On Thu, Oct 22, 2015 at 7:08 AM, Prachi Garg <[hidden email]> wrote:

> I am trying to load metadata from MySQL database, but the web console
> doesn't allow me to provide the MySQL driver JAR. It is set to H2, by
> default, and doesn't let me change. I tried running the Ignite web agent in
> both test and non-test modes. How can I provide the MySQL driver JAR?
>
> Thanks,
> -Prachi
>



--
Alexey Kuznetsov
GridGain Systems
www.gridgain.com
Reply | Threaded
Open this post in threaded view
|

Re: Ignite Web Console - Loading metadata from MySQL

dsetrakyan
In reply to this post by Prachi Garg
On Wed, Oct 21, 2015 at 5:08 PM, Prachi Garg <[hidden email]> wrote:

> I am trying to load metadata from MySQL database, but the web console
> doesn't allow me to provide the MySQL driver JAR. It is set to H2, by
> default, and doesn't let me change. I tried running the Ignite web agent in
> both test and non-test modes. How can I provide the MySQL driver JAR?
>

The question (?) helper popup next to the driver field actually explains
what to do. You need to copy the driver JAR into the “jdbc-drivers” folder
in the agent.


> Thanks,
> -Prachi
>
Reply | Threaded
Open this post in threaded view
|

Re: Ignite Web Console - Loading metadata from MySQL

Prachi Garg
Thanks!

I think we should also provide an option on the client side for the user to
browse to the local folder of his system.

-P

On Thu, Oct 22, 2015 at 12:39 AM, Dmitriy Setrakyan <[hidden email]>
wrote:

> On Wed, Oct 21, 2015 at 5:08 PM, Prachi Garg <[hidden email]> wrote:
>
> > I am trying to load metadata from MySQL database, but the web console
> > doesn't allow me to provide the MySQL driver JAR. It is set to H2, by
> > default, and doesn't let me change. I tried running the Ignite web agent
> in
> > both test and non-test modes. How can I provide the MySQL driver JAR?
> >
>
> The question (?) helper popup next to the driver field actually explains
> what to do. You need to copy the driver JAR into the “jdbc-drivers” folder
> in the agent.
>
>
> > Thanks,
> > -Prachi
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Ignite Web Console - Loading metadata from MySQL

dsetrakyan
On Thu, Oct 22, 2015 at 11:06 AM, Prachi Garg <[hidden email]> wrote:

> Thanks!
>
> I think we should also provide an option on the client side for the user to
> browse to the local folder of his system.
>

I really like this idea. I think it fits into the current architecture
perfectly.


>
> -P
>
> On Thu, Oct 22, 2015 at 12:39 AM, Dmitriy Setrakyan <[hidden email]
> >
> wrote:
>
> > On Wed, Oct 21, 2015 at 5:08 PM, Prachi Garg <[hidden email]> wrote:
> >
> > > I am trying to load metadata from MySQL database, but the web console
> > > doesn't allow me to provide the MySQL driver JAR. It is set to H2, by
> > > default, and doesn't let me change. I tried running the Ignite web
> agent
> > in
> > > both test and non-test modes. How can I provide the MySQL driver JAR?
> > >
> >
> > The question (?) helper popup next to the driver field actually explains
> > what to do. You need to copy the driver JAR into the “jdbc-drivers”
> folder
> > in the agent.
> >
> >
> > > Thanks,
> > > -Prachi
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Ignite Web Console - Loading metadata from MySQL

Alexey Kuznetsov-2
In reply to this post by Prachi Garg
Prachi,

If this issue: https://issues.apache.org/jira/browse/IGNITE-1761

Is the same as you propose?

P.S.
 Did you managed to load metadata from your MySQL database?

On Fri, Oct 23, 2015 at 1:06 AM, Prachi Garg <[hidden email]> wrote:

> Thanks!
>
> I think we should also provide an option on the client side for the user to
> browse to the local folder of his system.
>
> -P
>
> On Thu, Oct 22, 2015 at 12:39 AM, Dmitriy Setrakyan <[hidden email]
> >
> wrote:
>
> > On Wed, Oct 21, 2015 at 5:08 PM, Prachi Garg <[hidden email]> wrote:
> >
> > > I am trying to load metadata from MySQL database, but the web console
> > > doesn't allow me to provide the MySQL driver JAR. It is set to H2, by
> > > default, and doesn't let me change. I tried running the Ignite web
> agent
> > in
> > > both test and non-test modes. How can I provide the MySQL driver JAR?
> > >
> >
> > The question (?) helper popup next to the driver field actually explains
> > what to do. You need to copy the driver JAR into the “jdbc-drivers”
> folder
> > in the agent.
> >
> >
> > > Thanks,
> > > -Prachi
> > >
> >
>



--
Alexey Kuznetsov
GridGain Systems
www.gridgain.com
Reply | Threaded
Open this post in threaded view
|

Re: Ignite Web Console - Loading metadata from MySQL

dsetrakyan
On Thu, Oct 22, 2015 at 7:04 PM, Alexey Kuznetsov <[hidden email]>
wrote:

> Prachi,
>
> If this issue: https://issues.apache.org/jira/browse/IGNITE-1761


I have looked at the ticket and it seems like a very good idea and big
usability improvement.

Given that all the communication of the web-console happens through the
agent anyway, we can load the driver JAR into the agent after the agent had
started.

Would it be hard to do?


>
> Is the same as you propose?
>
> P.S.
>  Did you managed to load metadata from your MySQL database?
>
> On Fri, Oct 23, 2015 at 1:06 AM, Prachi Garg <[hidden email]> wrote:
>
> > Thanks!
> >
> > I think we should also provide an option on the client side for the user
> to
> > browse to the local folder of his system.
> >
> > -P
> >
> > On Thu, Oct 22, 2015 at 12:39 AM, Dmitriy Setrakyan <
> [hidden email]
> > >
> > wrote:
> >
> > > On Wed, Oct 21, 2015 at 5:08 PM, Prachi Garg <[hidden email]>
> wrote:
> > >
> > > > I am trying to load metadata from MySQL database, but the web console
> > > > doesn't allow me to provide the MySQL driver JAR. It is set to H2, by
> > > > default, and doesn't let me change. I tried running the Ignite web
> > agent
> > > in
> > > > both test and non-test modes. How can I provide the MySQL driver JAR?
> > > >
> > >
> > > The question (?) helper popup next to the driver field actually
> explains
> > > what to do. You need to copy the driver JAR into the “jdbc-drivers”
> > folder
> > > in the agent.
> > >
> > >
> > > > Thanks,
> > > > -Prachi
> > > >
> > >
> >
>
>
>
> --
> Alexey Kuznetsov
> GridGain Systems
> www.gridgain.com
>
Reply | Threaded
Open this post in threaded view
|

Re: Ignite Web Console - Loading metadata from MySQL

Alexey Kuznetsov-2
Actually it is quite hard to do.

The main complexity that we need to implement double transfer:
1) Transfer selected jar from user local folder to Web Console Server.
2) Transfer jar from Web Console Server to Host were Web Agent running.

And I would prefer to do it after first release.

On Fri, Oct 23, 2015 at 5:09 PM, Dmitriy Setrakyan <[hidden email]>
wrote:

> On Thu, Oct 22, 2015 at 7:04 PM, Alexey Kuznetsov <[hidden email]
> >
> wrote:
>
> > Prachi,
> >
> > If this issue: https://issues.apache.org/jira/browse/IGNITE-1761
>
>
> I have looked at the ticket and it seems like a very good idea and big
> usability improvement.
>
> Given that all the communication of the web-console happens through the
> agent anyway, we can load the driver JAR into the agent after the agent had
> started.
>
> Would it be hard to do?
>
>
> >
> > Is the same as you propose?
> >
> > P.S.
> >  Did you managed to load metadata from your MySQL database?
> >
> > On Fri, Oct 23, 2015 at 1:06 AM, Prachi Garg <[hidden email]> wrote:
> >
> > > Thanks!
> > >
> > > I think we should also provide an option on the client side for the
> user
> > to
> > > browse to the local folder of his system.
> > >
> > > -P
> > >
> > > On Thu, Oct 22, 2015 at 12:39 AM, Dmitriy Setrakyan <
> > [hidden email]
> > > >
> > > wrote:
> > >
> > > > On Wed, Oct 21, 2015 at 5:08 PM, Prachi Garg <[hidden email]>
> > wrote:
> > > >
> > > > > I am trying to load metadata from MySQL database, but the web
> console
> > > > > doesn't allow me to provide the MySQL driver JAR. It is set to H2,
> by
> > > > > default, and doesn't let me change. I tried running the Ignite web
> > > agent
> > > > in
> > > > > both test and non-test modes. How can I provide the MySQL driver
> JAR?
> > > > >
> > > >
> > > > The question (?) helper popup next to the driver field actually
> > explains
> > > > what to do. You need to copy the driver JAR into the “jdbc-drivers”
> > > folder
> > > > in the agent.
> > > >
> > > >
> > > > > Thanks,
> > > > > -Prachi
> > > > >
> > > >
> > >
> >
> >
> >
> > --
> > Alexey Kuznetsov
> > GridGain Systems
> > www.gridgain.com
> >
>



--
Alexey Kuznetsov
GridGain Systems
www.gridgain.com
Reply | Threaded
Open this post in threaded view
|

Re: Ignite Web Console - Loading metadata from MySQL

dsetrakyan
On Fri, Oct 23, 2015 at 3:16 AM, Alexey Kuznetsov <[hidden email]>
wrote:

> Actually it is quite hard to do.
>
> The main complexity that we need to implement double transfer:
> 1) Transfer selected jar from user local folder to Web Console Server.
> 2) Transfer jar from Web Console Server to Host were Web Agent running.
>
> And I would prefer to do it after first release.
>

Agree. I don’t think we should rush this feature.


>
> On Fri, Oct 23, 2015 at 5:09 PM, Dmitriy Setrakyan <[hidden email]>
> wrote:
>
> > On Thu, Oct 22, 2015 at 7:04 PM, Alexey Kuznetsov <
> [hidden email]
> > >
> > wrote:
> >
> > > Prachi,
> > >
> > > If this issue: https://issues.apache.org/jira/browse/IGNITE-1761
> >
> >
> > I have looked at the ticket and it seems like a very good idea and big
> > usability improvement.
> >
> > Given that all the communication of the web-console happens through the
> > agent anyway, we can load the driver JAR into the agent after the agent
> had
> > started.
> >
> > Would it be hard to do?
> >
> >
> > >
> > > Is the same as you propose?
> > >
> > > P.S.
> > >  Did you managed to load metadata from your MySQL database?
> > >
> > > On Fri, Oct 23, 2015 at 1:06 AM, Prachi Garg <[hidden email]>
> wrote:
> > >
> > > > Thanks!
> > > >
> > > > I think we should also provide an option on the client side for the
> > user
> > > to
> > > > browse to the local folder of his system.
> > > >
> > > > -P
> > > >
> > > > On Thu, Oct 22, 2015 at 12:39 AM, Dmitriy Setrakyan <
> > > [hidden email]
> > > > >
> > > > wrote:
> > > >
> > > > > On Wed, Oct 21, 2015 at 5:08 PM, Prachi Garg <[hidden email]>
> > > wrote:
> > > > >
> > > > > > I am trying to load metadata from MySQL database, but the web
> > console
> > > > > > doesn't allow me to provide the MySQL driver JAR. It is set to
> H2,
> > by
> > > > > > default, and doesn't let me change. I tried running the Ignite
> web
> > > > agent
> > > > > in
> > > > > > both test and non-test modes. How can I provide the MySQL driver
> > JAR?
> > > > > >
> > > > >
> > > > > The question (?) helper popup next to the driver field actually
> > > explains
> > > > > what to do. You need to copy the driver JAR into the “jdbc-drivers”
> > > > folder
> > > > > in the agent.
> > > > >
> > > > >
> > > > > > Thanks,
> > > > > > -Prachi
> > > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Alexey Kuznetsov
> > > GridGain Systems
> > > www.gridgain.com
> > >
> >
>
>
>
> --
> Alexey Kuznetsov
> GridGain Systems
> www.gridgain.com
>
Reply | Threaded
Open this post in threaded view
|

Re: Ignite Web Console - Loading metadata from MySQL

Prachi Garg
In reply to this post by Alexey Kuznetsov-2
On Thu, Oct 22, 2015 at 7:04 PM, Alexey Kuznetsov <[hidden email]>
wrote:

> Prachi,
>
> If this issue: https://issues.apache.org/jira/browse/IGNITE-1761
>
> Is the same as you propose?
>

Yes, looks like the same thing :-)

>
> P.S.
>  Did you managed to load metadata from your MySQL database?
>

I did. But when I try to select the table and load the metadata, I get the
following message -
 "Some tables have no primary key.
You will need to configure key type and key fields for such tables after
load complete."
Even though I have a primary key specified in my table. Am I missing
something?

Thanks,
-P



On Fri, Oct 23, 2015 at 1:06 AM, Prachi Garg <[hidden email]> wrote:

>
> > Thanks!
> >
> > I think we should also provide an option on the client side for the user
> to
> > browse to the local folder of his system.
> >
> > -P
> >
> > On Thu, Oct 22, 2015 at 12:39 AM, Dmitriy Setrakyan <
> [hidden email]
> > >
> > wrote:
> >
> > > On Wed, Oct 21, 2015 at 5:08 PM, Prachi Garg <[hidden email]>
> wrote:
> > >
> > > > I am trying to load metadata from MySQL database, but the web console
> > > > doesn't allow me to provide the MySQL driver JAR. It is set to H2, by
> > > > default, and doesn't let me change. I tried running the Ignite web
> > agent
> > > in
> > > > both test and non-test modes. How can I provide the MySQL driver JAR?
> > > >
> > >
> > > The question (?) helper popup next to the driver field actually
> explains
> > > what to do. You need to copy the driver JAR into the “jdbc-drivers”
> > folder
> > > in the agent.
> > >
> > >
> > > > Thanks,
> > > > -Prachi
> > > >
> > >
> >
>
>
>
> --
> Alexey Kuznetsov
> GridGain Systems
> www.gridgain.com
>
Reply | Threaded
Open this post in threaded view
|

Re: Ignite Web Console - Loading metadata from MySQL

Alexey Kuznetsov-2
Prachi,

You get such message because some of your tables do not have PRIMARY KEY
defined.
Could you show you table definition here (SQL scrtipt)?
May be we have a bug for MySql metadata extraction logic.

Web Console use fields from PRIMARY KEY to describe Key POJO that will be
used later as key to put values into cache.

You could read about primary keys here:
https://en.wikipedia.org/wiki/Unique_key#Defining_primary_keys_in_SQL

Any way, primary keys is not mandatory and after metadata loaded one can
specify key fields manually.




On Fri, Oct 23, 2015 at 11:36 PM, Prachi Garg <[hidden email]> wrote:

> On Thu, Oct 22, 2015 at 7:04 PM, Alexey Kuznetsov <[hidden email]
> >
> wrote:
>
> > Prachi,
> >
> > If this issue: https://issues.apache.org/jira/browse/IGNITE-1761
> >
> > Is the same as you propose?
> >
>
> Yes, looks like the same thing :-)
>
> >
> > P.S.
> >  Did you managed to load metadata from your MySQL database?
> >
>
> I did. But when I try to select the table and load the metadata, I get the
> following message -
>  "Some tables have no primary key.
> You will need to configure key type and key fields for such tables after
> load complete."
> Even though I have a primary key specified in my table. Am I missing
> something?
>
> Thanks,
> -P
>
>
>
> On Fri, Oct 23, 2015 at 1:06 AM, Prachi Garg <[hidden email]> wrote:
> >
> > > Thanks!
> > >
> > > I think we should also provide an option on the client side for the
> user
> > to
> > > browse to the local folder of his system.
> > >
> > > -P
> > >
> > > On Thu, Oct 22, 2015 at 12:39 AM, Dmitriy Setrakyan <
> > [hidden email]
> > > >
> > > wrote:
> > >
> > > > On Wed, Oct 21, 2015 at 5:08 PM, Prachi Garg <[hidden email]>
> > wrote:
> > > >
> > > > > I am trying to load metadata from MySQL database, but the web
> console
> > > > > doesn't allow me to provide the MySQL driver JAR. It is set to H2,
> by
> > > > > default, and doesn't let me change. I tried running the Ignite web
> > > agent
> > > > in
> > > > > both test and non-test modes. How can I provide the MySQL driver
> JAR?
> > > > >
> > > >
> > > > The question (?) helper popup next to the driver field actually
> > explains
> > > > what to do. You need to copy the driver JAR into the “jdbc-drivers”
> > > folder
> > > > in the agent.
> > > >
> > > >
> > > > > Thanks,
> > > > > -Prachi
> > > > >
> > > >
> > >
> >
> >
> >
> > --
> > Alexey Kuznetsov
> > GridGain Systems
> > www.gridgain.com
> >
>



--
Alexey Kuznetsov
GridGain Systems
www.gridgain.com
Reply | Threaded
Open this post in threaded view
|

Re: Ignite Web Console - Loading metadata from MySQL

Prachi Garg
Alexey,

This what my table looked like.

| person | CREATE TABLE `person` (

  `id` int(11) NOT NULL,

  `orgId` int(11) DEFAULT NULL,

  `name` varchar(255) DEFAULT NULL,

  `salary` int(11) DEFAULT NULL,

  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |

But I dropped the table and re-created. Works fine now.

Thanks,
-P


On Fri, Oct 23, 2015 at 9:49 AM, Alexey Kuznetsov <[hidden email]>
wrote:

> Prachi,
>
> You get such message because some of your tables do not have PRIMARY KEY
> defined.
> Could you show you table definition here (SQL scrtipt)?
> May be we have a bug for MySql metadata extraction logic.
>
> Web Console use fields from PRIMARY KEY to describe Key POJO that will be
> used later as key to put values into cache.
>
> You could read about primary keys here:
> https://en.wikipedia.org/wiki/Unique_key#Defining_primary_keys_in_SQL
>
> Any way, primary keys is not mandatory and after metadata loaded one can
> specify key fields manually.
>
>
>
>
> On Fri, Oct 23, 2015 at 11:36 PM, Prachi Garg <[hidden email]> wrote:
>
> > On Thu, Oct 22, 2015 at 7:04 PM, Alexey Kuznetsov <
> [hidden email]
> > >
> > wrote:
> >
> > > Prachi,
> > >
> > > If this issue: https://issues.apache.org/jira/browse/IGNITE-1761
> > >
> > > Is the same as you propose?
> > >
> >
> > Yes, looks like the same thing :-)
> >
> > >
> > > P.S.
> > >  Did you managed to load metadata from your MySQL database?
> > >
> >
> > I did. But when I try to select the table and load the metadata, I get
> the
> > following message -
> >  "Some tables have no primary key.
> > You will need to configure key type and key fields for such tables after
> > load complete."
> > Even though I have a primary key specified in my table. Am I missing
> > something?
> >
> > Thanks,
> > -P
> >
> >
> >
> > On Fri, Oct 23, 2015 at 1:06 AM, Prachi Garg <[hidden email]> wrote:
> > >
> > > > Thanks!
> > > >
> > > > I think we should also provide an option on the client side for the
> > user
> > > to
> > > > browse to the local folder of his system.
> > > >
> > > > -P
> > > >
> > > > On Thu, Oct 22, 2015 at 12:39 AM, Dmitriy Setrakyan <
> > > [hidden email]
> > > > >
> > > > wrote:
> > > >
> > > > > On Wed, Oct 21, 2015 at 5:08 PM, Prachi Garg <[hidden email]>
> > > wrote:
> > > > >
> > > > > > I am trying to load metadata from MySQL database, but the web
> > console
> > > > > > doesn't allow me to provide the MySQL driver JAR. It is set to
> H2,
> > by
> > > > > > default, and doesn't let me change. I tried running the Ignite
> web
> > > > agent
> > > > > in
> > > > > > both test and non-test modes. How can I provide the MySQL driver
> > JAR?
> > > > > >
> > > > >
> > > > > The question (?) helper popup next to the driver field actually
> > > explains
> > > > > what to do. You need to copy the driver JAR into the “jdbc-drivers”
> > > > folder
> > > > > in the agent.
> > > > >
> > > > >
> > > > > > Thanks,
> > > > > > -Prachi
> > > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Alexey Kuznetsov
> > > GridGain Systems
> > > www.gridgain.com
> > >
> >
>
>
>
> --
> Alexey Kuznetsov
> GridGain Systems
> www.gridgain.com
>