gora-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [gora] madhawa-gunasekara commented on a change in pull request #210: GORA-651 upgrade Orient DB driver to version 3
Date Tue, 31 Mar 2020 12:24:41 GMT
madhawa-gunasekara commented on a change in pull request #210: GORA-651 upgrade Orient DB driver
to version 3
URL: https://github.com/apache/gora/pull/210#discussion_r400869831
 
 

 ##########
 File path: gora-orientdb/src/main/java/org/apache/gora/orientdb/store/OrientDBStore.java
 ##########
 @@ -103,20 +109,36 @@ public void initialize(Class<K> keyClass, Class<T> persistentClass,
Properties p
       ROOT_URL = "remote:".concat(orientDbStoreParams.getServerHost()).concat(":")
               .concat(orientDbStoreParams.getServerPort());
       ROOT_DATABASE_URL = ROOT_URL.concat("/").concat(orientDbStoreParams.getDatabaseName());
-      remoteServerAdmin = new OServerAdmin(ROOT_URL).connect(orientDbStoreParams.getUserName(),
-              orientDbStoreParams.getUserPassword());
-      if (!remoteServerAdmin.existsDatabase(orientDbStoreParams.getDatabaseName(), "memory"))
{
-        remoteServerAdmin.createDatabase(orientDbStoreParams.getDatabaseName(), "document",
"memory");
-      }
-
-      if (orientDbStoreParams.getConnectionPoolSize() != null) {
-        int connPoolSize = Integer.valueOf(orientDbStoreParams.getConnectionPoolSize());
-        connectionPool = new OPartitionedDatabasePoolFactory(connPoolSize)
-                .get(ROOT_DATABASE_URL, orientDbStoreParams.getUserName(),
-                        orientDbStoreParams.getUserPassword());
+      remoteServerAdmin = new OrientDB(ROOT_URL, orientDbStoreParams.getUserName(),
+              orientDbStoreParams.getUserPassword(), OrientDBConfig.defaultConfig());
+      if (!remoteServerAdmin.exists(orientDbStoreParams.getDatabaseName())) {
+        remoteServerAdmin.create(orientDbStoreParams.getDatabaseName(),
+                ODatabaseType.valueOf(orientDbStoreParams.getStorageType().toUpperCase()));
 
 Review comment:
   @dinuka-perera, Shall we fix the Charset toLowerCase(Locale.getDefault())

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message