1 2 Previous Next 24 Replies Latest reply on Dec 3, 2013 2:47 AM by Heiko Rupp

    Is it possible to support MySQL database in RHQ

    Changchun Hu Newbie

      Dear RHQ Team,

      Could you please tell us whether it is possible to support MySQL database in RHQ? If we enhanced RHQ to support MySQL, will you adopt it?

      As our company's need, we have to run RHQ on MySQL database. During months development, we can run RHQ on MySQL database now.

      We really would like to contrubute our effort to community. However, we also know it will bring you much effort to adopt our code.

      Thank you very much for your answers in advance.

      Changchun.

        • 1. Re: Is it possible to support MySQL database in RHQ
          Arun Raj Expert

          Hi Changchun Hu

           

              We can make it. Please go through the following article. This might help you.

           

                                        1) Demo

                                        2) Development Procedure

           

             I hope, this will help you to do your work.

           

          Regards,

          ArunRaj

          • 2. Re: Is it possible to support MySQL database in RHQ
            Changchun Hu Newbie

            Hi Arun,

            I check the links you provided. It seems I asked a question in a confusing way. I would like to mean "RHQ Server", but not "RHQ'. Could you check my question below?

             

            Currently, RHQ Servre can run with PostgreSQL, Oracle, H2, and SQLServer database, while PostgreSQL is the default one. As our company's need, we have to run RHQ server on MySQL database.

            In other words, we need use MySQL database instead of PostgreSQL database to store the collected metrics. During months development, we can run RHQ server on MySQL database now. Could you please tell us whether it is possible to support MySQL database in RHQ Server? If we enhanced RHQ Server to support MySQL, will you adopt it? We really would like to contrubute our effort to community. However, we also know it will bring you much effort to adopt our code.

             

            Thanks and best regards,

            Changchun

            • 3. Re: Is it possible to support MySQL database in RHQ
              Heiko Rupp Master

              Changchun,

              while I don't / can't / want to give you a definitive answer right now, I think this is a very interesting development. Are you able to run the full test suite without issues?

              And supposed we would incorporate your changeset, would you be able to further support that in the future?

               

              Also as you mention the metric store, we are currently re-workign RHQ so that in a future release (after 4.6) we will store metrics in Cassandra and have the jobs related to that also work against Cassandra. Depending on how much work you have invested so far, you may skip some (if e.g. the baseline calculation was not yet rewritten for MySQL).

               

              With respect to incorporating your changes - I can imagine that we will have a build that passes all tests. You use the same build with the MySQL changes, also have it run all tests and then submit the changeset(*), which we incorporate (we may 'freeze' the repo for a little while to make this happen). We then run the tests again. Depending on the outcome fixes may be needed and/or we need roll back.

              Does that make sense to you?

               

              Also as of right now, you would need to "sign" the Fedora agreement - see https://docs.jboss.org/author/display/RHQ/Contributions

               

              *) We are still planning to - hopefully very soon after RHQ 4.6 is released - move our source repo to github, so that the changeset may be submitted as a pull-request.

              • 4. Re: Is it possible to support MySQL database in RHQ
                Changchun Hu Newbie

                Heiko,

                Many thanks for your answer and explanation. It helps a lot.

                 

                We only finished our function test without issues. However we didn't run the full test yet, we didn't write testcase for MySQL either. We may finish it in following months.


                We have one more question. Our changeset are based on RHQ_4_4_0_JON311GA. Is it necessary for us to merge our changeset to RHQ 4.6 ourself before we submit it as a pull-request? Or you can incorporate it after it passes all test.

                 

                I will discuss with our team whether we can provide further support in the future, and give an answer later.

                 

                Besides, many thanks for your work on RHQ 4.6. We really appreciate it very much.

                 

                Best regards

                • 5. Re: Is it possible to support MySQL database in RHQ
                  Heiko Rupp Master

                  Changchun,

                   

                  the change set would need to be done against master; I guess though that master did not change too much relative to the tag you mention in the areas relevant to the MySQL support.

                   

                  There are a few places where we have specific code for Oracle and Postgres - I think those places would require additional code + tests for MySQL.

                   

                  When I said "support" above, I did not mean it like in "SLA", but rather helping in making changes if needed. As MySQL support has been requested often in the past, I can imagine (but not promise) that other community members may be able to help here as well.

                   

                  Thanks

                     Heiko

                  • 6. Re: Is it possible to support MySQL database in RHQ
                    Changchun Hu Newbie

                    Heiko,

                    Thanks for your explanation. Everything is clear now. We will finish our test suite for MySQL and pass all test suite, then apply our changeset to the master, finally submit our changeset as a pull-request. We may finish it months later.

                    Best regards.

                    Changchun.

                    • 7. Re: Is it possible to support MySQL database in RHQ
                      Arun Raj Expert

                      Hi Changchun,

                       

                          I am extremely sorry for misunderstanding your problem.

                       

                          I clarified myself, By reading your discussion with Heiko Rupp. Sorry Once Again.

                       

                       

                      Regards,

                      ArunRaj

                      • 8. Re: Is it possible to support MySQL database in RHQ
                        Changchun Hu Newbie

                        Hi Arun,

                        Never mind. It is my problem I asked the question in a confusing way. Thanks and best regards.

                        • 9. Re: Is it possible to support MySQL database in RHQ
                          Changchun Hu Newbie

                          Hi Heiko,

                          I find a question when I merge my code to the master

                          (commit f7409c5649029ba91d1d25ced972196b677ab14 Date:   Fri Feb 15 21:29:54 2013 -0500).

                          I find code to support SQLServer and H2 database are missed from project "RHQ Enterprise Installer Utility". As a result, the RHQ4.6  only support PostgreSQL and Oracle now.  Is it removed on purpose? If so, I'm afraid supporting MySQL function might not be welcome to RHQ team either. Could you correct me if anything is wrong?

                          Many thanks.

                           


                          • 10. Re: Is it possible to support MySQL database in RHQ
                            Heiko Rupp Master

                            Hey,

                            did you mean that commit introduced that change?

                             

                            I think it is rather that

                            - Joe Marques who wrote the MSSQL support is no longer able to support it for quite some time

                            - H2 has issues with LOBs and thus RHQ is not always correctly working

                            so that we don't support them.

                             

                            As you mentioned that you may be able to work on the MySQL side and if there are no correctness issues, I don't see why we would not want MySQL.

                             

                            Note, that in 4.6 the way the software is installed has changed - meaning that the old UI-based installer is no longer neeed and not referenced in the modules/enterprise/gui/pom.xml file.

                             

                            Have a look at https://docs.jboss.org/author/display/RHQ/Running+The+Installer for details.

                             

                            Hope that helps.

                              Heiko

                            • 11. Re: Is it possible to support MySQL database in RHQ
                              Changchun Hu Newbie

                              Hi Heiko,

                              Thank you very much for your answers. I also note the installation is changed. The URL you provided is useful.

                               

                              Regarding supporting MySQL, we do have our customized RHQ running on MySQL database without issues. However, we don't have it full test yet, but just the functions we interest in are tested. To make MySQL supported with high quality, much work need to be done. Due to our limited resource and knowlege, we cannot make it by ourself only, so we would like to have RHQ team and whole community's help. So we really would like to know whether RHQ team is interested in this feature and would like to help.

                               

                              Let me give two exmaple which may need RHQ team's guide or help.

                              Example 1:

                                    Column names (interval, and maxvalue) used in RHQ are reversed words in MySQL. We need rename the columns to support MySQL. This changeset may affect upgrading old RHQ on PostgreSQL or Oracle.

                              Example 2:

                                   Due to MySQL restrictions on subqueries, we had to modify some native SQL, JPQL or Java logic to make it work.

                              This one may affect the performance of RHQ on PostgreSQL or Oracle to some extends.

                               

                              To make our changesets acceptable to RHQ team, we would like to following items and others needed.

                              1. We will merge our changesets to master branch.
                              2. Make sure our changesets can pass all related test suites.
                              3. Add test suite for our changesets.
                              4. Contribute to supporting and improving this feature.

                               

                              Best regards.

                              Changchun

                              • 12. Re: Is it possible to support MySQL database in RHQ
                                mazz Master

                                This part worries me:

                                Due to MySQL restrictions on subqueries, we had to modify some native SQL, JPQL or Java logic to make it work.

                                This one may affect the performance of RHQ on PostgreSQL or Oracle to some extends.

                                We would need specifics on all the changes in this area so peer review can be performed on those portions of the code.

                                • 13. Re: Is it possible to support MySQL database in RHQ
                                  Changchun Hu Newbie

                                  Hi John,

                                  Peer review and any suggestion will be much appreciated.

                                  Thanks for your effort in advance.

                                  Best regards.

                                  Changchun

                                  • 14. Re: Is it possible to support MySQL database in RHQ
                                    Changchun Hu Newbie

                                    Hi Heiko,

                                    Could you tell us when you will move RHQ to github? We may be ready to submit our code as a pull request for your review next week.

                                    So far, we already merge our code to RHQ tag RHQ 4.6.0, it will be not much work for us to merge it again master branch. However, master branch is updated every day. So we will do it when all other works is done. Besides, we almost pass all related test suite on MySQL database. We will fix the fails one these days.

                                    Thanks and best regards.

                                    Changchun

                                    1 2 Previous Next