You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gora.apache.org by GitBox <gi...@apache.org> on 2021/05/14 17:20:00 UTC

[GitHub] [gora] kamaci commented on a change in pull request #210: GORA-651 upgrade Orient DB driver to version 3

kamaci commented on a change in pull request #210:
URL: https://github.com/apache/gora/pull/210#discussion_r632680001



##########
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:
       Please pass `Locale.ENGLISH` to `toUpperCase`




-- 
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