[ 
https://issues.apache.org/jira/browse/GORA-698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17599998#comment-17599998
 ] 

ASF GitHub Bot commented on GORA-698:
-------------------------------------

kamaci commented on code in PR #273:
URL: https://github.com/apache/gora/pull/273#discussion_r962204714


##########
gora-geode/src/main/java/org/apache/gora/geode/store/GeodeStore.java:
##########
@@ -0,0 +1,190 @@
+package org.apache.gora.geode.store;
+
+import org.apache.geode.cache.*;
+import org.apache.geode.cache.client.ClientCache;
+import org.apache.geode.cache.client.ClientCacheFactory;
+import org.apache.gora.geode.query.GeodeQuery;
+import org.apache.gora.geode.query.GeodeResult;
+import org.apache.gora.persistency.impl.PersistentBase;
+import org.apache.gora.query.PartitionQuery;
+import org.apache.gora.query.Query;
+import org.apache.gora.query.Result;
+import org.apache.gora.query.impl.PartitionQueryImpl;
+import org.apache.gora.store.impl.DataStoreBase;
+import org.apache.gora.util.GoraException;
+
+import java.io.IOException;
+import java.util.*;
+import java.util.concurrent.ConcurrentSkipListSet;
+
+import static org.apache.geode.cache.RegionShortcut.REPLICATE;
+import static org.apache.gora.geode.store.GeodeStoreParameters.*;
+
+
+public class GeodeStore<K, T extends PersistentBase> extends DataStoreBase<K, 
T> {
+
+    private ClientCache clientCache;
+    private Region<K, T> region;
+    private Properties geodeProperties;
+
+
+    private CacheFactory cacheFactory;
+
+    @Override
+    public void initialize(Class<K> keyClass, Class<T> persistentClass, 
Properties properties) throws GoraException {
+        super.initialize(keyClass, persistentClass, properties);
+        String geodeHostName = (String) properties.get(GEODE_SERVER_HOST);
+        int portNumber = Integer.parseInt((String) 
properties.get(GEODE_SERVER_PORT));
+        clientCache = new ClientCacheFactory().addPoolLocator(geodeHostName, 
portNumber).create();
+        String userName = properties.getProperty(GEODE_USERNAME);
+        String password = properties.getProperty(GEODE_PASSWORD);
+        geodeProperties = properties;
+
+        Properties clientProperties = 
clientCache.getDistributedSystem().getProperties();
+        if (userName != null) {

Review Comment:
   What if username is null and password is not? How about throwing an 
exception in that case?





> Add GEODE Support
> -----------------
>
>                 Key: GORA-698
>                 URL: https://issues.apache.org/jira/browse/GORA-698
>             Project: Apache Gora
>          Issue Type: New Feature
>            Reporter: Himanshu
>            Priority: Major
>
>  [1]https://geode.apache.org/



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to