You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by mp...@apache.org on 2016/04/08 12:09:19 UTC

ambari git commit: AMBARI-15769. Add Maria DB support for Ambari Server. (mpapirkovskyy)

Repository: ambari
Updated Branches:
  refs/heads/trunk b18ecf015 -> 14fcf31aa


AMBARI-15769. Add Maria DB support for Ambari Server. (mpapirkovskyy)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/14fcf31a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/14fcf31a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/14fcf31a

Branch: refs/heads/trunk
Commit: 14fcf31aaa33cd1f8b3b7ae855a9baef9efb40e4
Parents: b18ecf0
Author: Myroslav Papirkovskyi <mp...@hortonworks.com>
Authored: Thu Apr 7 19:04:10 2016 +0300
Committer: Myroslav Papirkovskyi <mp...@hortonworks.com>
Committed: Fri Apr 8 13:09:00 2016 +0300

----------------------------------------------------------------------
 .../ambari/server/orm/EclipseLinkSessionCustomizer.java       | 7 ++-----
 .../src/main/python/ambari_server/dbConfiguration.py          | 2 +-
 2 files changed, 3 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/14fcf31a/ambari-server/src/main/java/org/apache/ambari/server/orm/EclipseLinkSessionCustomizer.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/EclipseLinkSessionCustomizer.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/EclipseLinkSessionCustomizer.java
index bb2ca7a..6717e01 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/EclipseLinkSessionCustomizer.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/EclipseLinkSessionCustomizer.java
@@ -20,7 +20,6 @@ package org.apache.ambari.server.orm;
 import javax.activation.DataSource;
 
 import org.eclipse.persistence.config.SessionCustomizer;
-import org.eclipse.persistence.platform.database.MySQLPlatform;
 import org.eclipse.persistence.sessions.DatabaseLogin;
 import org.eclipse.persistence.sessions.JNDIConnector;
 import org.eclipse.persistence.sessions.Session;
@@ -55,10 +54,8 @@ public class EclipseLinkSessionCustomizer implements SessionCustomizer {
    */
   @Override
   public void customize(Session session) throws Exception {
-    //Override transaction isolation level for MySQL to match EclipseLink shared cache behavior
+    // ensure db behavior is same as shared cache
     DatabaseLogin databaseLogin = (DatabaseLogin) session.getDatasourceLogin();
-    if (databaseLogin.getDatasourcePlatform() instanceof MySQLPlatform) {
-      databaseLogin.setTransactionIsolation(DatabaseLogin.TRANSACTION_READ_COMMITTED);
-    }
+    databaseLogin.setTransactionIsolation(DatabaseLogin.TRANSACTION_READ_COMMITTED);
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/14fcf31a/ambari-server/src/main/python/ambari_server/dbConfiguration.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server/dbConfiguration.py b/ambari-server/src/main/python/ambari_server/dbConfiguration.py
index caff519..29c0471 100644
--- a/ambari-server/src/main/python/ambari_server/dbConfiguration.py
+++ b/ambari-server/src/main/python/ambari_server/dbConfiguration.py
@@ -349,7 +349,7 @@ class DBMSConfigFactoryLinux(DBMSConfigFactory):
     self.DBMS_LIST = [
       DBMSDesc(self.DBMS_KEYS_LIST[3], STORAGE_TYPE_LOCAL, 'PostgreSQL', 'Embedded', createPGConfig),
       DBMSDesc(self.DBMS_KEYS_LIST[1], STORAGE_TYPE_REMOTE, 'Oracle', '', createOracleConfig),
-      DBMSDesc(self.DBMS_KEYS_LIST[2], STORAGE_TYPE_REMOTE, 'MySQL', '', createMySQLConfig),
+      DBMSDesc(self.DBMS_KEYS_LIST[2], STORAGE_TYPE_REMOTE, 'MySQL (MariaDB)', '', createMySQLConfig),
       DBMSDesc(self.DBMS_KEYS_LIST[3], STORAGE_TYPE_REMOTE, 'PostgreSQL', '', createPGConfig),
       DBMSDesc(self.DBMS_KEYS_LIST[4], STORAGE_TYPE_REMOTE, 'Microsoft SQL Server', 'Tech Preview', createMSSQLConfig),
       DBMSDesc(self.DBMS_KEYS_LIST[5], STORAGE_TYPE_REMOTE, 'SQL Anywhere', '', createSQLAConfig)