[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL

2017-07-28 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on GORA-497:
-

Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130071694
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/GoraCassandraTestDriver.java
 ---
@@ -0,0 +1,190 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author lewismc
+ *
+ */
+
+package org.apache.gora.cassandra;
+
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import org.apache.cassandra.io.util.FileUtils;
+import org.apache.cassandra.service.CassandraDaemon;
+import org.apache.gora.GoraTestDriver;
+import org.apache.gora.cassandra.store.CassandraStore;
+import org.apache.gora.persistency.Persistent;
+import org.apache.gora.store.DataStore;
+import org.apache.gora.store.DataStoreFactory;
+import org.apache.gora.util.GoraException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.util.Properties;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+// Logging imports
+
+/**
+ * Helper class for third party tests using gora-cassandra backend. 
+ * @see GoraTestDriver for test specifics.
+ * This driver is the base for all test cases that require an embedded 
Cassandra
+ * server. In this case we draw on Hector's @see EmbeddedServerHelper.
+ * It starts (setUp) and stops (tearDown) embedded Cassandra server.
+ *
+ */
+
+public class GoraCassandraTestDriver extends GoraTestDriver {
+  private static Logger log = 
LoggerFactory.getLogger(GoraCassandraTestDriver.class);
+  
+  private static String baseDirectory = "target/test";
+
+  private CassandraDaemon cassandraDaemon;
+
+  private Thread cassandraThread;
+
+  private Properties properties;
+
+  public void setParameters(Properties parameters) {
+this.properties = parameters;
+  }
+
+  @Override
+  public  DataStore 
createDataStore(Class keyClass, Class persistentClass) throws 
GoraException {
+return DataStoreFactory.createDataStore(CassandraStore.class, 
keyClass, persistentClass , conf, properties, null);
+  }
+
+  /**
+   * @return temporary base directory of running cassandra instance
+   */
+  public String getBaseDirectory() {
+return baseDirectory;
+  }
+
+  public GoraCassandraTestDriver() {
+super(CassandraStore.class);
+  }
+   
+  /**
+   * Starts embedded Cassandra server.
+   *
+   * @throws Exception
+   *   if an error occurs
+   */
+  @Override
+  public void setUpClass(){
+log.info("Starting embedded Cassandra Server...");
+try {
+  cleanupDirectoriesFailover();
+  FileUtils.createDirectory(baseDirectory);
+  System.setProperty("log4j.configuration", "log4j-server.properties");
+  System.setProperty("cassandra.config", "cassandra.yaml");
+  
+  cassandraDaemon = new CassandraDaemon();
+  cassandraDaemon.completeSetup();
+  cassandraDaemon.applyConfig();
+  cassandraDaemon.init(null);
+  cassandraThread = new Thread(new Runnable() {
+
+public void run() {
+  try {
+cassandraDaemon.start();
+  } catch (Exception e) {
+log.error("Embedded casandra server run failed!", e);
+  }
+}
+  });
+   
+  cassandraThread.setDaemon(true);
+  cassandraThread.start();
+} catch (Exception e) {
+  log.error("Embedded casandra server 

[GitHub] gora pull request #110: [WIP] GORA-497 : Rewrite Cassandra data store

2017-07-28 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130071694
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/GoraCassandraTestDriver.java
 ---
@@ -0,0 +1,190 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author lewismc
+ *
+ */
+
+package org.apache.gora.cassandra;
+
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import org.apache.cassandra.io.util.FileUtils;
+import org.apache.cassandra.service.CassandraDaemon;
+import org.apache.gora.GoraTestDriver;
+import org.apache.gora.cassandra.store.CassandraStore;
+import org.apache.gora.persistency.Persistent;
+import org.apache.gora.store.DataStore;
+import org.apache.gora.store.DataStoreFactory;
+import org.apache.gora.util.GoraException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.util.Properties;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+// Logging imports
+
+/**
+ * Helper class for third party tests using gora-cassandra backend. 
+ * @see GoraTestDriver for test specifics.
+ * This driver is the base for all test cases that require an embedded 
Cassandra
+ * server. In this case we draw on Hector's @see EmbeddedServerHelper.
+ * It starts (setUp) and stops (tearDown) embedded Cassandra server.
+ *
+ */
+
+public class GoraCassandraTestDriver extends GoraTestDriver {
+  private static Logger log = 
LoggerFactory.getLogger(GoraCassandraTestDriver.class);
+  
+  private static String baseDirectory = "target/test";
+
+  private CassandraDaemon cassandraDaemon;
+
+  private Thread cassandraThread;
+
+  private Properties properties;
+
+  public void setParameters(Properties parameters) {
+this.properties = parameters;
+  }
+
+  @Override
+  public  DataStore 
createDataStore(Class keyClass, Class persistentClass) throws 
GoraException {
+return DataStoreFactory.createDataStore(CassandraStore.class, 
keyClass, persistentClass , conf, properties, null);
+  }
+
+  /**
+   * @return temporary base directory of running cassandra instance
+   */
+  public String getBaseDirectory() {
+return baseDirectory;
+  }
+
+  public GoraCassandraTestDriver() {
+super(CassandraStore.class);
+  }
+   
+  /**
+   * Starts embedded Cassandra server.
+   *
+   * @throws Exception
+   *   if an error occurs
+   */
+  @Override
+  public void setUpClass(){
+log.info("Starting embedded Cassandra Server...");
+try {
+  cleanupDirectoriesFailover();
+  FileUtils.createDirectory(baseDirectory);
+  System.setProperty("log4j.configuration", "log4j-server.properties");
+  System.setProperty("cassandra.config", "cassandra.yaml");
+  
+  cassandraDaemon = new CassandraDaemon();
+  cassandraDaemon.completeSetup();
+  cassandraDaemon.applyConfig();
+  cassandraDaemon.init(null);
+  cassandraThread = new Thread(new Runnable() {
+
+public void run() {
+  try {
+cassandraDaemon.start();
+  } catch (Exception e) {
+log.error("Embedded casandra server run failed!", e);
+  }
+}
+  });
+   
+  cassandraThread.setDaemon(true);
+  cassandraThread.start();
+} catch (Exception e) {
+  log.error("Embedded casandra server start failed!", e);
+
+  // cleanup
+  tearDownClass();
+}
+  }
+
+
+  /**
+   * Stops embedded Cassandra server.
+   *
+   * @throws Exception
+   *   if an error occurs
+   */

[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL

2017-07-28 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on GORA-497:
-

Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130070953
  
--- Diff: 
gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/bean/CassandraKey.java
 ---
@@ -0,0 +1,74 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.gora.cassandra.bean;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * This Class represents the Cassandra Key.
+ */
+public class CassandraKey{
+
+  private String name;
+
+  private List clusterKeyFields;
+
+  private List partitionKeyFields;
+
+  private List fieldList;
+
+  public CassandraKey(String name) {
+this.name = name;
+this.fieldList = new ArrayList<>();
+this.partitionKeyFields = new ArrayList<>();
+  }
+
+  public String getName() {
+return this.name;
+  }
+
+  public List getClusterKeyFields() {
+return this.clusterKeyFields;
+  }
+
+  public List getPartitionKeyFields() {
+return this.partitionKeyFields;
+  }
+
+  public void addPartitionKeyField(PartitionKeyField partitionKeyField) {
--- End diff --

Please document these public methods all possible cases.


> Migrate CassandraThrift to CQL 
> ---
>
> Key: GORA-497
> URL: https://issues.apache.org/jira/browse/GORA-497
> Project: Apache Gora
>  Issue Type: Improvement
>  Components: gora-cassandra
>Reporter: Madhawa Gunasekara
>Assignee: Madhawa Gunasekara
>  Labels: gsoc2017
> Fix For: 0.8
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] gora pull request #110: [WIP] GORA-497 : Rewrite Cassandra data store

2017-07-28 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130070953
  
--- Diff: 
gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/bean/CassandraKey.java
 ---
@@ -0,0 +1,74 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.gora.cassandra.bean;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * This Class represents the Cassandra Key.
+ */
+public class CassandraKey{
+
+  private String name;
+
+  private List clusterKeyFields;
+
+  private List partitionKeyFields;
+
+  private List fieldList;
+
+  public CassandraKey(String name) {
+this.name = name;
+this.fieldList = new ArrayList<>();
+this.partitionKeyFields = new ArrayList<>();
+  }
+
+  public String getName() {
+return this.name;
+  }
+
+  public List getClusterKeyFields() {
+return this.clusterKeyFields;
+  }
+
+  public List getPartitionKeyFields() {
+return this.partitionKeyFields;
+  }
+
+  public void addPartitionKeyField(PartitionKeyField partitionKeyField) {
--- End diff --

Please document these public methods all possible cases.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL

2017-07-28 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on GORA-497:
-

Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130069255
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestCassandraStoreWithNativeSerialization.java
 ---
@@ -0,0 +1,305 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.gora.cassandra.store;
+
+import org.apache.gora.cassandra.GoraCassandraTestDriver;
+import 
org.apache.gora.cassandra.example.generated.nativeSerialization.ComplexTypes;
+import 
org.apache.gora.cassandra.example.generated.nativeSerialization.User;
+import org.apache.gora.cassandra.query.CassandraQuery;
+import org.apache.gora.query.Query;
+import org.apache.gora.query.Result;
+import org.apache.gora.store.DataStore;
+import org.apache.gora.util.GoraException;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import java.time.Instant;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Properties;
+import java.util.UUID;
+
+/**
+ * This class tests Cassandra Store functionality with Cassandra Native 
Serialization.
+ */
+public class TestCassandraStoreWithNativeSerialization {
+  private static GoraCassandraTestDriver testDriver = new 
GoraCassandraTestDriver();
+  private static DataStore userDataStore;
+  private static Properties parameter;
+
+  @BeforeClass
+  public static void setUpClass() throws Exception {
+setProperties();
+testDriver.setParameters(parameter);
+testDriver.setUpClass();
+userDataStore = testDriver.createDataStore(UUID.class, User.class);
+  }
+
+  private static void setProperties() {
+parameter = new Properties();
+parameter.setProperty(CassandraStoreParameters.CASSANDRA_SERVERS, 
"localhost");
+parameter.setProperty(CassandraStoreParameters.PORT, "9042");
+
parameter.setProperty(CassandraStoreParameters.CASSANDRA_SERIALIZATION_TYPE, 
"native");
+parameter.setProperty(CassandraStoreParameters.PROTOCOL_VERSION, "3");
+parameter.setProperty(CassandraStoreParameters.CLUSTER_NAME, "Test 
Cluster");
+parameter.setProperty("gora.cassandrastore.mapping.file", 
"nativeSerialization/gora-cassandra-mapping.xml");
+  }
+
+  @After
+  public void tearDown() throws Exception {
+testDriver.tearDown();
+  }
+
+  @AfterClass
+  public static void tearDownClass() throws Exception {
+testDriver.tearDownClass();
+  }
+
+  /**
+   * In this test case, put and get behavior of the data store are testing.
+   */
+  @Test
+  public void testSimplePutAndGet() {
+UUID id = UUID.randomUUID();
+User user1 = new User(id, "madhawa", Date.from(Instant.now()));
+// storing data;
+userDataStore.put(id, user1);
+// get data;
+User olduser = userDataStore.get(id);
+Assert.assertEquals(olduser.getName(), user1.getName());
+Assert.assertEquals(olduser.getDateOfBirth(), user1.getDateOfBirth());
+  }
+
+  /**
+   * In this test case, put and delete behavior of the data store are 
testing.
+   */
+  @Test
+  public void testSimplePutDeleteAndGet() {
+UUID id = UUID.randomUUID();
+User user1 = new User(id, "kasun", Date.from(Instant.now()));
+// storing data;
+userDataStore.put(id, user1);
+// get data;
+User olduser = userDataStore.get(user1.getUserId());
+Assert.assertEquals(olduser.getName(), user1.getName());
+Ass

[GitHub] gora pull request #110: [WIP] GORA-497 : Rewrite Cassandra data store

2017-07-28 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130069255
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestCassandraStoreWithNativeSerialization.java
 ---
@@ -0,0 +1,305 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.gora.cassandra.store;
+
+import org.apache.gora.cassandra.GoraCassandraTestDriver;
+import 
org.apache.gora.cassandra.example.generated.nativeSerialization.ComplexTypes;
+import 
org.apache.gora.cassandra.example.generated.nativeSerialization.User;
+import org.apache.gora.cassandra.query.CassandraQuery;
+import org.apache.gora.query.Query;
+import org.apache.gora.query.Result;
+import org.apache.gora.store.DataStore;
+import org.apache.gora.util.GoraException;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import java.time.Instant;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Properties;
+import java.util.UUID;
+
+/**
+ * This class tests Cassandra Store functionality with Cassandra Native 
Serialization.
+ */
+public class TestCassandraStoreWithNativeSerialization {
+  private static GoraCassandraTestDriver testDriver = new 
GoraCassandraTestDriver();
+  private static DataStore userDataStore;
+  private static Properties parameter;
+
+  @BeforeClass
+  public static void setUpClass() throws Exception {
+setProperties();
+testDriver.setParameters(parameter);
+testDriver.setUpClass();
+userDataStore = testDriver.createDataStore(UUID.class, User.class);
+  }
+
+  private static void setProperties() {
+parameter = new Properties();
+parameter.setProperty(CassandraStoreParameters.CASSANDRA_SERVERS, 
"localhost");
+parameter.setProperty(CassandraStoreParameters.PORT, "9042");
+
parameter.setProperty(CassandraStoreParameters.CASSANDRA_SERIALIZATION_TYPE, 
"native");
+parameter.setProperty(CassandraStoreParameters.PROTOCOL_VERSION, "3");
+parameter.setProperty(CassandraStoreParameters.CLUSTER_NAME, "Test 
Cluster");
+parameter.setProperty("gora.cassandrastore.mapping.file", 
"nativeSerialization/gora-cassandra-mapping.xml");
+  }
+
+  @After
+  public void tearDown() throws Exception {
+testDriver.tearDown();
+  }
+
+  @AfterClass
+  public static void tearDownClass() throws Exception {
+testDriver.tearDownClass();
+  }
+
+  /**
+   * In this test case, put and get behavior of the data store are testing.
+   */
+  @Test
+  public void testSimplePutAndGet() {
+UUID id = UUID.randomUUID();
+User user1 = new User(id, "madhawa", Date.from(Instant.now()));
+// storing data;
+userDataStore.put(id, user1);
+// get data;
+User olduser = userDataStore.get(id);
+Assert.assertEquals(olduser.getName(), user1.getName());
+Assert.assertEquals(olduser.getDateOfBirth(), user1.getDateOfBirth());
+  }
+
+  /**
+   * In this test case, put and delete behavior of the data store are 
testing.
+   */
+  @Test
+  public void testSimplePutDeleteAndGet() {
+UUID id = UUID.randomUUID();
+User user1 = new User(id, "kasun", Date.from(Instant.now()));
+// storing data;
+userDataStore.put(id, user1);
+// get data;
+User olduser = userDataStore.get(user1.getUserId());
+Assert.assertEquals(olduser.getName(), user1.getName());
+Assert.assertEquals(olduser.getDateOfBirth(), user1.getDateOfBirth());
+// delete data;
+userDataStore.delete(user1.getUserId());
+// get data
+User deletedUser = userDataStore.get(id);
+Assert.assertNull(deletedU

[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL

2017-07-28 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on GORA-497:
-

Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130064480
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestCassandraStoreWithNativeSerialization.java
 ---
@@ -0,0 +1,305 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.gora.cassandra.store;
+
+import org.apache.gora.cassandra.GoraCassandraTestDriver;
+import 
org.apache.gora.cassandra.example.generated.nativeSerialization.ComplexTypes;
+import 
org.apache.gora.cassandra.example.generated.nativeSerialization.User;
+import org.apache.gora.cassandra.query.CassandraQuery;
+import org.apache.gora.query.Query;
+import org.apache.gora.query.Result;
+import org.apache.gora.store.DataStore;
+import org.apache.gora.util.GoraException;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import java.time.Instant;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Properties;
+import java.util.UUID;
+
+/**
+ * This class tests Cassandra Store functionality with Cassandra Native 
Serialization.
+ */
+public class TestCassandraStoreWithNativeSerialization {
--- End diff --

It seems current branch does not include any tests for AVRO serialization. 
Please work on covering Gora datastore base test case for AVRO serialization. 


> Migrate CassandraThrift to CQL 
> ---
>
> Key: GORA-497
> URL: https://issues.apache.org/jira/browse/GORA-497
> Project: Apache Gora
>  Issue Type: Improvement
>  Components: gora-cassandra
>Reporter: Madhawa Gunasekara
>Assignee: Madhawa Gunasekara
>  Labels: gsoc2017
> Fix For: 0.8
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] gora pull request #110: [WIP] GORA-497 : Rewrite Cassandra data store

2017-07-28 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130064480
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestCassandraStoreWithNativeSerialization.java
 ---
@@ -0,0 +1,305 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.gora.cassandra.store;
+
+import org.apache.gora.cassandra.GoraCassandraTestDriver;
+import 
org.apache.gora.cassandra.example.generated.nativeSerialization.ComplexTypes;
+import 
org.apache.gora.cassandra.example.generated.nativeSerialization.User;
+import org.apache.gora.cassandra.query.CassandraQuery;
+import org.apache.gora.query.Query;
+import org.apache.gora.query.Result;
+import org.apache.gora.store.DataStore;
+import org.apache.gora.util.GoraException;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import java.time.Instant;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Properties;
+import java.util.UUID;
+
+/**
+ * This class tests Cassandra Store functionality with Cassandra Native 
Serialization.
+ */
+public class TestCassandraStoreWithNativeSerialization {
--- End diff --

It seems current branch does not include any tests for AVRO serialization. 
Please work on covering Gora datastore base test case for AVRO serialization. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL

2017-07-28 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on GORA-497:
-

Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130028159
  
--- Diff: gora-cassandra-cql/src/test/conf/gora.properties ---
@@ -0,0 +1,30 @@
+#
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with
+#  the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
+gora.datastore.default=org.apache.gora.cassandra.CassandraStore
+gora.cassandrastore.cluster=Gora Cassandra Test Cluster
+gora.cassandrastore.host=localhost:9160
+# property is annotated in CassandraClient#checkKeyspace()
+# options are ANY, ONE, TWO, THREE, LOCAL_QUORUM, EACH_QUORUM, QUORUM and 
ALL. 
+gora.cassandrastore.cf.consistency.level=ONE
+gora.cassandrastore.read.consistency.level=QUORUM
+gora.cassandrastore.write.consistency.level=ONE
+
+
--- End diff --

Please remove this unnecessary new lines.


> Migrate CassandraThrift to CQL 
> ---
>
> Key: GORA-497
> URL: https://issues.apache.org/jira/browse/GORA-497
> Project: Apache Gora
>  Issue Type: Improvement
>  Components: gora-cassandra
>Reporter: Madhawa Gunasekara
>Assignee: Madhawa Gunasekara
>  Labels: gsoc2017
> Fix For: 0.8
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL

2017-07-28 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on GORA-497:
-

Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130028052
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/GoraCassandraTestDriver.java
 ---
@@ -0,0 +1,190 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author lewismc
+ *
+ */
+
+package org.apache.gora.cassandra;
+
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import org.apache.cassandra.io.util.FileUtils;
+import org.apache.cassandra.service.CassandraDaemon;
+import org.apache.gora.GoraTestDriver;
+import org.apache.gora.cassandra.store.CassandraStore;
+import org.apache.gora.persistency.Persistent;
+import org.apache.gora.store.DataStore;
+import org.apache.gora.store.DataStoreFactory;
+import org.apache.gora.util.GoraException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.util.Properties;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+// Logging imports
+
+/**
+ * Helper class for third party tests using gora-cassandra backend. 
+ * @see GoraTestDriver for test specifics.
+ * This driver is the base for all test cases that require an embedded 
Cassandra
+ * server. In this case we draw on Hector's @see EmbeddedServerHelper.
+ * It starts (setUp) and stops (tearDown) embedded Cassandra server.
+ *
+ */
+
+public class GoraCassandraTestDriver extends GoraTestDriver {
+  private static Logger log = 
LoggerFactory.getLogger(GoraCassandraTestDriver.class);
+  
+  private static String baseDirectory = "target/test";
+
+  private CassandraDaemon cassandraDaemon;
+
+  private Thread cassandraThread;
+
+  private Properties properties;
+
+  public void setParameters(Properties parameters) {
+this.properties = parameters;
+  }
+
+  @Override
+  public  DataStore 
createDataStore(Class keyClass, Class persistentClass) throws 
GoraException {
+return DataStoreFactory.createDataStore(CassandraStore.class, 
keyClass, persistentClass , conf, properties, null);
+  }
+
+  /**
+   * @return temporary base directory of running cassandra instance
+   */
+  public String getBaseDirectory() {
+return baseDirectory;
+  }
+
+  public GoraCassandraTestDriver() {
+super(CassandraStore.class);
+  }
+   
+  /**
+   * Starts embedded Cassandra server.
+   *
+   * @throws Exception
+   *   if an error occurs
+   */
+  @Override
+  public void setUpClass(){
+log.info("Starting embedded Cassandra Server...");
+try {
+  cleanupDirectoriesFailover();
+  FileUtils.createDirectory(baseDirectory);
+  System.setProperty("log4j.configuration", "log4j-server.properties");
+  System.setProperty("cassandra.config", "cassandra.yaml");
+  
+  cassandraDaemon = new CassandraDaemon();
+  cassandraDaemon.completeSetup();
+  cassandraDaemon.applyConfig();
+  cassandraDaemon.init(null);
+  cassandraThread = new Thread(new Runnable() {
+
+public void run() {
+  try {
+cassandraDaemon.start();
+  } catch (Exception e) {
+log.error("Embedded casandra server run failed!", e);
+  }
+}
+  });
+   
+  cassandraThread.setDaemon(true);
+  cassandraThread.start();
+} catch (Exception e) {
+  log.error("Embedded casandra server 

[GitHub] gora pull request #110: [WIP] GORA-497 : Rewrite Cassandra data store

2017-07-28 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130028159
  
--- Diff: gora-cassandra-cql/src/test/conf/gora.properties ---
@@ -0,0 +1,30 @@
+#
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with
+#  the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
+gora.datastore.default=org.apache.gora.cassandra.CassandraStore
+gora.cassandrastore.cluster=Gora Cassandra Test Cluster
+gora.cassandrastore.host=localhost:9160
+# property is annotated in CassandraClient#checkKeyspace()
+# options are ANY, ONE, TWO, THREE, LOCAL_QUORUM, EACH_QUORUM, QUORUM and 
ALL. 
+gora.cassandrastore.cf.consistency.level=ONE
+gora.cassandrastore.read.consistency.level=QUORUM
+gora.cassandrastore.write.consistency.level=ONE
+
+
--- End diff --

Please remove this unnecessary new lines.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] gora pull request #110: [WIP] GORA-497 : Rewrite Cassandra data store

2017-07-28 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130028052
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/GoraCassandraTestDriver.java
 ---
@@ -0,0 +1,190 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author lewismc
+ *
+ */
+
+package org.apache.gora.cassandra;
+
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import org.apache.cassandra.io.util.FileUtils;
+import org.apache.cassandra.service.CassandraDaemon;
+import org.apache.gora.GoraTestDriver;
+import org.apache.gora.cassandra.store.CassandraStore;
+import org.apache.gora.persistency.Persistent;
+import org.apache.gora.store.DataStore;
+import org.apache.gora.store.DataStoreFactory;
+import org.apache.gora.util.GoraException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.util.Properties;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+// Logging imports
+
+/**
+ * Helper class for third party tests using gora-cassandra backend. 
+ * @see GoraTestDriver for test specifics.
+ * This driver is the base for all test cases that require an embedded 
Cassandra
+ * server. In this case we draw on Hector's @see EmbeddedServerHelper.
+ * It starts (setUp) and stops (tearDown) embedded Cassandra server.
+ *
+ */
+
+public class GoraCassandraTestDriver extends GoraTestDriver {
+  private static Logger log = 
LoggerFactory.getLogger(GoraCassandraTestDriver.class);
+  
+  private static String baseDirectory = "target/test";
+
+  private CassandraDaemon cassandraDaemon;
+
+  private Thread cassandraThread;
+
+  private Properties properties;
+
+  public void setParameters(Properties parameters) {
+this.properties = parameters;
+  }
+
+  @Override
+  public  DataStore 
createDataStore(Class keyClass, Class persistentClass) throws 
GoraException {
+return DataStoreFactory.createDataStore(CassandraStore.class, 
keyClass, persistentClass , conf, properties, null);
+  }
+
+  /**
+   * @return temporary base directory of running cassandra instance
+   */
+  public String getBaseDirectory() {
+return baseDirectory;
+  }
+
+  public GoraCassandraTestDriver() {
+super(CassandraStore.class);
+  }
+   
+  /**
+   * Starts embedded Cassandra server.
+   *
+   * @throws Exception
+   *   if an error occurs
+   */
+  @Override
+  public void setUpClass(){
+log.info("Starting embedded Cassandra Server...");
+try {
+  cleanupDirectoriesFailover();
+  FileUtils.createDirectory(baseDirectory);
+  System.setProperty("log4j.configuration", "log4j-server.properties");
+  System.setProperty("cassandra.config", "cassandra.yaml");
+  
+  cassandraDaemon = new CassandraDaemon();
+  cassandraDaemon.completeSetup();
+  cassandraDaemon.applyConfig();
+  cassandraDaemon.init(null);
+  cassandraThread = new Thread(new Runnable() {
+
+public void run() {
+  try {
+cassandraDaemon.start();
+  } catch (Exception e) {
+log.error("Embedded casandra server run failed!", e);
+  }
+}
+  });
+   
+  cassandraThread.setDaemon(true);
+  cassandraThread.start();
+} catch (Exception e) {
+  log.error("Embedded casandra server start failed!", e);
+
+  // cleanup
+  tearDownClass();
+}
+  }
+
+
+  /**
+   * Stops embedded Cassandra server.
+   *
+   * @throws Exception
+   *   if an error occurs
+   */

[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL

2017-07-28 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on GORA-497:
-

Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130027626
  
--- Diff: 
gora-cassandra-cql/src/test/conf/nativeSerialization/gora.properties ---
@@ -0,0 +1,26 @@
+#
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with
+#  the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
+gora.datastore.default=org.apache.gora.cassandra.CassandraStore
+gora.cassandrastore.cluster=Gora Test Cluster
+gora.cassandrastore.host=localhost:9160
+
+
+
--- End diff --

Please remove this unnecessary new lines.


> Migrate CassandraThrift to CQL 
> ---
>
> Key: GORA-497
> URL: https://issues.apache.org/jira/browse/GORA-497
> Project: Apache Gora
>  Issue Type: Improvement
>  Components: gora-cassandra
>Reporter: Madhawa Gunasekara
>Assignee: Madhawa Gunasekara
>  Labels: gsoc2017
> Fix For: 0.8
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] gora pull request #110: [WIP] GORA-497 : Rewrite Cassandra data store

2017-07-28 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130027626
  
--- Diff: 
gora-cassandra-cql/src/test/conf/nativeSerialization/gora.properties ---
@@ -0,0 +1,26 @@
+#
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with
+#  the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+
+gora.datastore.default=org.apache.gora.cassandra.CassandraStore
+gora.cassandrastore.cluster=Gora Test Cluster
+gora.cassandrastore.host=localhost:9160
+
+
+
--- End diff --

Please remove this unnecessary new lines.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL

2017-07-28 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on GORA-497:
-

Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130027402
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/GoraCassandraTestDriver.java
 ---
@@ -0,0 +1,190 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author lewismc
+ *
+ */
+
+package org.apache.gora.cassandra;
+
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import org.apache.cassandra.io.util.FileUtils;
+import org.apache.cassandra.service.CassandraDaemon;
+import org.apache.gora.GoraTestDriver;
+import org.apache.gora.cassandra.store.CassandraStore;
+import org.apache.gora.persistency.Persistent;
+import org.apache.gora.store.DataStore;
+import org.apache.gora.store.DataStoreFactory;
+import org.apache.gora.util.GoraException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.util.Properties;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+// Logging imports
+
+/**
+ * Helper class for third party tests using gora-cassandra backend. 
+ * @see GoraTestDriver for test specifics.
+ * This driver is the base for all test cases that require an embedded 
Cassandra
+ * server. In this case we draw on Hector's @see EmbeddedServerHelper.
+ * It starts (setUp) and stops (tearDown) embedded Cassandra server.
+ *
+ */
+
+public class GoraCassandraTestDriver extends GoraTestDriver {
+  private static Logger log = 
LoggerFactory.getLogger(GoraCassandraTestDriver.class);
+  
+  private static String baseDirectory = "target/test";
+
+  private CassandraDaemon cassandraDaemon;
+
+  private Thread cassandraThread;
+
+  private Properties properties;
+
+  public void setParameters(Properties parameters) {
+this.properties = parameters;
+  }
+
+  @Override
+  public  DataStore 
createDataStore(Class keyClass, Class persistentClass) throws 
GoraException {
+return DataStoreFactory.createDataStore(CassandraStore.class, 
keyClass, persistentClass , conf, properties, null);
+  }
+
+  /**
+   * @return temporary base directory of running cassandra instance
+   */
+  public String getBaseDirectory() {
+return baseDirectory;
+  }
+
+  public GoraCassandraTestDriver() {
+super(CassandraStore.class);
+  }
+   
+  /**
+   * Starts embedded Cassandra server.
+   *
+   * @throws Exception
+   *   if an error occurs
+   */
+  @Override
+  public void setUpClass(){
+log.info("Starting embedded Cassandra Server...");
+try {
+  cleanupDirectoriesFailover();
+  FileUtils.createDirectory(baseDirectory);
+  System.setProperty("log4j.configuration", "log4j-server.properties");
+  System.setProperty("cassandra.config", "cassandra.yaml");
+  
+  cassandraDaemon = new CassandraDaemon();
+  cassandraDaemon.completeSetup();
+  cassandraDaemon.applyConfig();
+  cassandraDaemon.init(null);
+  cassandraThread = new Thread(new Runnable() {
+
+public void run() {
+  try {
+cassandraDaemon.start();
+  } catch (Exception e) {
+log.error("Embedded casandra server run failed!", e);
+  }
+}
+  });
+   
+  cassandraThread.setDaemon(true);
+  cassandraThread.start();
+} catch (Exception e) {
+  log.error("Embedded casandra server 

[GitHub] gora pull request #110: [WIP] GORA-497 : Rewrite Cassandra data store

2017-07-28 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130027514
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/GoraCassandraTestDriver.java
 ---
@@ -0,0 +1,190 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author lewismc
+ *
+ */
+
+package org.apache.gora.cassandra;
+
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import org.apache.cassandra.io.util.FileUtils;
+import org.apache.cassandra.service.CassandraDaemon;
+import org.apache.gora.GoraTestDriver;
+import org.apache.gora.cassandra.store.CassandraStore;
+import org.apache.gora.persistency.Persistent;
+import org.apache.gora.store.DataStore;
+import org.apache.gora.store.DataStoreFactory;
+import org.apache.gora.util.GoraException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.util.Properties;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+// Logging imports
+
+/**
+ * Helper class for third party tests using gora-cassandra backend. 
+ * @see GoraTestDriver for test specifics.
+ * This driver is the base for all test cases that require an embedded 
Cassandra
+ * server. In this case we draw on Hector's @see EmbeddedServerHelper.
+ * It starts (setUp) and stops (tearDown) embedded Cassandra server.
+ *
+ */
+
+public class GoraCassandraTestDriver extends GoraTestDriver {
+  private static Logger log = 
LoggerFactory.getLogger(GoraCassandraTestDriver.class);
+  
+  private static String baseDirectory = "target/test";
+
+  private CassandraDaemon cassandraDaemon;
+
+  private Thread cassandraThread;
+
+  private Properties properties;
+
+  public void setParameters(Properties parameters) {
+this.properties = parameters;
+  }
+
+  @Override
+  public  DataStore 
createDataStore(Class keyClass, Class persistentClass) throws 
GoraException {
+return DataStoreFactory.createDataStore(CassandraStore.class, 
keyClass, persistentClass , conf, properties, null);
+  }
+
+  /**
+   * @return temporary base directory of running cassandra instance
+   */
+  public String getBaseDirectory() {
+return baseDirectory;
+  }
+
+  public GoraCassandraTestDriver() {
+super(CassandraStore.class);
+  }
+   
+  /**
+   * Starts embedded Cassandra server.
+   *
+   * @throws Exception
+   *   if an error occurs
+   */
+  @Override
+  public void setUpClass(){
--- End diff --

Seems this is not formatted properly - setUpClass() {


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL

2017-07-28 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on GORA-497:
-

Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130027514
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/GoraCassandraTestDriver.java
 ---
@@ -0,0 +1,190 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author lewismc
+ *
+ */
+
+package org.apache.gora.cassandra;
+
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import org.apache.cassandra.io.util.FileUtils;
+import org.apache.cassandra.service.CassandraDaemon;
+import org.apache.gora.GoraTestDriver;
+import org.apache.gora.cassandra.store.CassandraStore;
+import org.apache.gora.persistency.Persistent;
+import org.apache.gora.store.DataStore;
+import org.apache.gora.store.DataStoreFactory;
+import org.apache.gora.util.GoraException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.util.Properties;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+// Logging imports
+
+/**
+ * Helper class for third party tests using gora-cassandra backend. 
+ * @see GoraTestDriver for test specifics.
+ * This driver is the base for all test cases that require an embedded 
Cassandra
+ * server. In this case we draw on Hector's @see EmbeddedServerHelper.
+ * It starts (setUp) and stops (tearDown) embedded Cassandra server.
+ *
+ */
+
+public class GoraCassandraTestDriver extends GoraTestDriver {
+  private static Logger log = 
LoggerFactory.getLogger(GoraCassandraTestDriver.class);
+  
+  private static String baseDirectory = "target/test";
+
+  private CassandraDaemon cassandraDaemon;
+
+  private Thread cassandraThread;
+
+  private Properties properties;
+
+  public void setParameters(Properties parameters) {
+this.properties = parameters;
+  }
+
+  @Override
+  public  DataStore 
createDataStore(Class keyClass, Class persistentClass) throws 
GoraException {
+return DataStoreFactory.createDataStore(CassandraStore.class, 
keyClass, persistentClass , conf, properties, null);
+  }
+
+  /**
+   * @return temporary base directory of running cassandra instance
+   */
+  public String getBaseDirectory() {
+return baseDirectory;
+  }
+
+  public GoraCassandraTestDriver() {
+super(CassandraStore.class);
+  }
+   
+  /**
+   * Starts embedded Cassandra server.
+   *
+   * @throws Exception
+   *   if an error occurs
+   */
+  @Override
+  public void setUpClass(){
--- End diff --

Seems this is not formatted properly - setUpClass() {


> Migrate CassandraThrift to CQL 
> ---
>
> Key: GORA-497
> URL: https://issues.apache.org/jira/browse/GORA-497
> Project: Apache Gora
>  Issue Type: Improvement
>  Components: gora-cassandra
>Reporter: Madhawa Gunasekara
>Assignee: Madhawa Gunasekara
>  Labels: gsoc2017
> Fix For: 0.8
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] gora pull request #110: [WIP] GORA-497 : Rewrite Cassandra data store

2017-07-28 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130027402
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/GoraCassandraTestDriver.java
 ---
@@ -0,0 +1,190 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author lewismc
+ *
+ */
+
+package org.apache.gora.cassandra;
+
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import org.apache.cassandra.io.util.FileUtils;
+import org.apache.cassandra.service.CassandraDaemon;
+import org.apache.gora.GoraTestDriver;
+import org.apache.gora.cassandra.store.CassandraStore;
+import org.apache.gora.persistency.Persistent;
+import org.apache.gora.store.DataStore;
+import org.apache.gora.store.DataStoreFactory;
+import org.apache.gora.util.GoraException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.util.Properties;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+// Logging imports
+
+/**
+ * Helper class for third party tests using gora-cassandra backend. 
+ * @see GoraTestDriver for test specifics.
+ * This driver is the base for all test cases that require an embedded 
Cassandra
+ * server. In this case we draw on Hector's @see EmbeddedServerHelper.
+ * It starts (setUp) and stops (tearDown) embedded Cassandra server.
+ *
+ */
+
+public class GoraCassandraTestDriver extends GoraTestDriver {
+  private static Logger log = 
LoggerFactory.getLogger(GoraCassandraTestDriver.class);
+  
+  private static String baseDirectory = "target/test";
+
+  private CassandraDaemon cassandraDaemon;
+
+  private Thread cassandraThread;
+
+  private Properties properties;
+
+  public void setParameters(Properties parameters) {
+this.properties = parameters;
+  }
+
+  @Override
+  public  DataStore 
createDataStore(Class keyClass, Class persistentClass) throws 
GoraException {
+return DataStoreFactory.createDataStore(CassandraStore.class, 
keyClass, persistentClass , conf, properties, null);
+  }
+
+  /**
+   * @return temporary base directory of running cassandra instance
+   */
+  public String getBaseDirectory() {
+return baseDirectory;
+  }
+
+  public GoraCassandraTestDriver() {
+super(CassandraStore.class);
+  }
+   
+  /**
+   * Starts embedded Cassandra server.
+   *
+   * @throws Exception
+   *   if an error occurs
+   */
+  @Override
+  public void setUpClass(){
+log.info("Starting embedded Cassandra Server...");
+try {
+  cleanupDirectoriesFailover();
+  FileUtils.createDirectory(baseDirectory);
+  System.setProperty("log4j.configuration", "log4j-server.properties");
+  System.setProperty("cassandra.config", "cassandra.yaml");
+  
+  cassandraDaemon = new CassandraDaemon();
+  cassandraDaemon.completeSetup();
+  cassandraDaemon.applyConfig();
+  cassandraDaemon.init(null);
+  cassandraThread = new Thread(new Runnable() {
+
+public void run() {
+  try {
+cassandraDaemon.start();
+  } catch (Exception e) {
+log.error("Embedded casandra server run failed!", e);
+  }
+}
+  });
+   
+  cassandraThread.setDaemon(true);
+  cassandraThread.start();
+} catch (Exception e) {
+  log.error("Embedded casandra server start failed!", e);
+
+  // cleanup
+  tearDownClass();
+}
+  }
+
+
+  /**
+   * Stops embedded Cassandra server.
+   *
+   * @throws Exception
+   *   if an error occurs
+   */

[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL

2017-07-28 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on GORA-497:
-

Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130027243
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/GoraCassandraTestDriver.java
 ---
@@ -0,0 +1,190 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author lewismc
+ *
+ */
+
+package org.apache.gora.cassandra;
+
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import org.apache.cassandra.io.util.FileUtils;
+import org.apache.cassandra.service.CassandraDaemon;
+import org.apache.gora.GoraTestDriver;
+import org.apache.gora.cassandra.store.CassandraStore;
+import org.apache.gora.persistency.Persistent;
+import org.apache.gora.store.DataStore;
+import org.apache.gora.store.DataStoreFactory;
+import org.apache.gora.util.GoraException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.util.Properties;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+// Logging imports
+
+/**
+ * Helper class for third party tests using gora-cassandra backend. 
+ * @see GoraTestDriver for test specifics.
+ * This driver is the base for all test cases that require an embedded 
Cassandra
+ * server. In this case we draw on Hector's @see EmbeddedServerHelper.
+ * It starts (setUp) and stops (tearDown) embedded Cassandra server.
+ *
+ */
+
+public class GoraCassandraTestDriver extends GoraTestDriver {
+  private static Logger log = 
LoggerFactory.getLogger(GoraCassandraTestDriver.class);
+  
+  private static String baseDirectory = "target/test";
+
+  private CassandraDaemon cassandraDaemon;
+
+  private Thread cassandraThread;
+
+  private Properties properties;
+
+  public void setParameters(Properties parameters) {
+this.properties = parameters;
+  }
+
+  @Override
+  public  DataStore 
createDataStore(Class keyClass, Class persistentClass) throws 
GoraException {
+return DataStoreFactory.createDataStore(CassandraStore.class, 
keyClass, persistentClass , conf, properties, null);
+  }
+
+  /**
+   * @return temporary base directory of running cassandra instance
+   */
+  public String getBaseDirectory() {
+return baseDirectory;
+  }
+
+  public GoraCassandraTestDriver() {
+super(CassandraStore.class);
+  }
+   
+  /**
+   * Starts embedded Cassandra server.
+   *
+   * @throws Exception
+   *   if an error occurs
+   */
+  @Override
+  public void setUpClass(){
+log.info("Starting embedded Cassandra Server...");
+try {
+  cleanupDirectoriesFailover();
+  FileUtils.createDirectory(baseDirectory);
+  System.setProperty("log4j.configuration", "log4j-server.properties");
+  System.setProperty("cassandra.config", "cassandra.yaml");
+  
+  cassandraDaemon = new CassandraDaemon();
+  cassandraDaemon.completeSetup();
+  cassandraDaemon.applyConfig();
+  cassandraDaemon.init(null);
+  cassandraThread = new Thread(new Runnable() {
+
+public void run() {
+  try {
+cassandraDaemon.start();
+  } catch (Exception e) {
+log.error("Embedded casandra server run failed!", e);
+  }
+}
+  });
+   
+  cassandraThread.setDaemon(true);
+  cassandraThread.start();
+} catch (Exception e) {
+  log.error("Embedded casandra server 

[GitHub] gora pull request #110: [WIP] GORA-497 : Rewrite Cassandra data store

2017-07-28 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130027243
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/GoraCassandraTestDriver.java
 ---
@@ -0,0 +1,190 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author lewismc
+ *
+ */
+
+package org.apache.gora.cassandra;
+
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import org.apache.cassandra.io.util.FileUtils;
+import org.apache.cassandra.service.CassandraDaemon;
+import org.apache.gora.GoraTestDriver;
+import org.apache.gora.cassandra.store.CassandraStore;
+import org.apache.gora.persistency.Persistent;
+import org.apache.gora.store.DataStore;
+import org.apache.gora.store.DataStoreFactory;
+import org.apache.gora.util.GoraException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.util.Properties;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+// Logging imports
+
+/**
+ * Helper class for third party tests using gora-cassandra backend. 
+ * @see GoraTestDriver for test specifics.
+ * This driver is the base for all test cases that require an embedded 
Cassandra
+ * server. In this case we draw on Hector's @see EmbeddedServerHelper.
+ * It starts (setUp) and stops (tearDown) embedded Cassandra server.
+ *
+ */
+
+public class GoraCassandraTestDriver extends GoraTestDriver {
+  private static Logger log = 
LoggerFactory.getLogger(GoraCassandraTestDriver.class);
+  
+  private static String baseDirectory = "target/test";
+
+  private CassandraDaemon cassandraDaemon;
+
+  private Thread cassandraThread;
+
+  private Properties properties;
+
+  public void setParameters(Properties parameters) {
+this.properties = parameters;
+  }
+
+  @Override
+  public  DataStore 
createDataStore(Class keyClass, Class persistentClass) throws 
GoraException {
+return DataStoreFactory.createDataStore(CassandraStore.class, 
keyClass, persistentClass , conf, properties, null);
+  }
+
+  /**
+   * @return temporary base directory of running cassandra instance
+   */
+  public String getBaseDirectory() {
+return baseDirectory;
+  }
+
+  public GoraCassandraTestDriver() {
+super(CassandraStore.class);
+  }
+   
+  /**
+   * Starts embedded Cassandra server.
+   *
+   * @throws Exception
+   *   if an error occurs
+   */
+  @Override
+  public void setUpClass(){
+log.info("Starting embedded Cassandra Server...");
+try {
+  cleanupDirectoriesFailover();
+  FileUtils.createDirectory(baseDirectory);
+  System.setProperty("log4j.configuration", "log4j-server.properties");
+  System.setProperty("cassandra.config", "cassandra.yaml");
+  
+  cassandraDaemon = new CassandraDaemon();
+  cassandraDaemon.completeSetup();
+  cassandraDaemon.applyConfig();
+  cassandraDaemon.init(null);
+  cassandraThread = new Thread(new Runnable() {
+
+public void run() {
+  try {
+cassandraDaemon.start();
+  } catch (Exception e) {
+log.error("Embedded casandra server run failed!", e);
+  }
+}
+  });
+   
+  cassandraThread.setDaemon(true);
+  cassandraThread.start();
+} catch (Exception e) {
+  log.error("Embedded casandra server start failed!", e);
+
+  // cleanup
+  tearDownClass();
+}
+  }
+
+
+  /**
+   * Stops embedded Cassandra server.
+   *
+   * @throws Exception
+   *   if an error occurs
+   */

[GitHub] gora pull request #110: [WIP] GORA-497 : Rewrite Cassandra data store

2017-07-28 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130026243
  
--- Diff: 
gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/persistent/CassandraNativePersistent.java
 ---
@@ -0,0 +1,109 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.gora.cassandra.persistent;
+
+import com.datastax.driver.mapping.annotations.Transient;
+import org.apache.avro.Schema;
+import org.apache.gora.persistency.Persistent;
+import org.apache.gora.persistency.Tombstone;
+import org.apache.gora.persistency.impl.PersistentBase;
+
+import java.util.List;
+
+/**
+ * This class should be used with Native Cassandra Serialization.
+ */
+public abstract class CassandraNativePersistent implements Persistent {
+  @Transient
--- End diff --

Do we have a mechanism to generate these native persistent data beans which 
extends CassandraNativePersistent?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL

2017-07-28 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on GORA-497:
-

Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130026954
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/GoraCassandraTestDriver.java
 ---
@@ -0,0 +1,190 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author lewismc
+ *
+ */
+
+package org.apache.gora.cassandra;
+
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import org.apache.cassandra.io.util.FileUtils;
+import org.apache.cassandra.service.CassandraDaemon;
+import org.apache.gora.GoraTestDriver;
+import org.apache.gora.cassandra.store.CassandraStore;
+import org.apache.gora.persistency.Persistent;
+import org.apache.gora.store.DataStore;
+import org.apache.gora.store.DataStoreFactory;
+import org.apache.gora.util.GoraException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.util.Properties;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+// Logging imports
+
+/**
+ * Helper class for third party tests using gora-cassandra backend. 
+ * @see GoraTestDriver for test specifics.
+ * This driver is the base for all test cases that require an embedded 
Cassandra
+ * server. In this case we draw on Hector's @see EmbeddedServerHelper.
+ * It starts (setUp) and stops (tearDown) embedded Cassandra server.
+ *
+ */
+
--- End diff --

Unnecessary new line. Please remove this.


> Migrate CassandraThrift to CQL 
> ---
>
> Key: GORA-497
> URL: https://issues.apache.org/jira/browse/GORA-497
> Project: Apache Gora
>  Issue Type: Improvement
>  Components: gora-cassandra
>Reporter: Madhawa Gunasekara
>Assignee: Madhawa Gunasekara
>  Labels: gsoc2017
> Fix For: 0.8
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL

2017-07-28 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on GORA-497:
-

Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130026846
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/GoraCassandraTestDriver.java
 ---
@@ -0,0 +1,190 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author lewismc
+ *
+ */
+
+package org.apache.gora.cassandra;
+
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import org.apache.cassandra.io.util.FileUtils;
+import org.apache.cassandra.service.CassandraDaemon;
+import org.apache.gora.GoraTestDriver;
+import org.apache.gora.cassandra.store.CassandraStore;
+import org.apache.gora.persistency.Persistent;
+import org.apache.gora.store.DataStore;
+import org.apache.gora.store.DataStoreFactory;
+import org.apache.gora.util.GoraException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.util.Properties;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
--- End diff --

Please remove these unused imports.


> Migrate CassandraThrift to CQL 
> ---
>
> Key: GORA-497
> URL: https://issues.apache.org/jira/browse/GORA-497
> Project: Apache Gora
>  Issue Type: Improvement
>  Components: gora-cassandra
>Reporter: Madhawa Gunasekara
>Assignee: Madhawa Gunasekara
>  Labels: gsoc2017
> Fix For: 0.8
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] gora pull request #110: [WIP] GORA-497 : Rewrite Cassandra data store

2017-07-28 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130026954
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/GoraCassandraTestDriver.java
 ---
@@ -0,0 +1,190 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author lewismc
+ *
+ */
+
+package org.apache.gora.cassandra;
+
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import org.apache.cassandra.io.util.FileUtils;
+import org.apache.cassandra.service.CassandraDaemon;
+import org.apache.gora.GoraTestDriver;
+import org.apache.gora.cassandra.store.CassandraStore;
+import org.apache.gora.persistency.Persistent;
+import org.apache.gora.store.DataStore;
+import org.apache.gora.store.DataStoreFactory;
+import org.apache.gora.util.GoraException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.util.Properties;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+// Logging imports
+
+/**
+ * Helper class for third party tests using gora-cassandra backend. 
+ * @see GoraTestDriver for test specifics.
+ * This driver is the base for all test cases that require an embedded 
Cassandra
+ * server. In this case we draw on Hector's @see EmbeddedServerHelper.
+ * It starts (setUp) and stops (tearDown) embedded Cassandra server.
+ *
+ */
+
--- End diff --

Unnecessary new line. Please remove this.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] gora pull request #110: [WIP] GORA-497 : Rewrite Cassandra data store

2017-07-28 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130026846
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/GoraCassandraTestDriver.java
 ---
@@ -0,0 +1,190 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+/**
+ * @author lewismc
+ *
+ */
+
+package org.apache.gora.cassandra;
+
+import com.google.common.util.concurrent.ThreadFactoryBuilder;
+import org.apache.cassandra.io.util.FileUtils;
+import org.apache.cassandra.service.CassandraDaemon;
+import org.apache.gora.GoraTestDriver;
+import org.apache.gora.cassandra.store.CassandraStore;
+import org.apache.gora.persistency.Persistent;
+import org.apache.gora.store.DataStore;
+import org.apache.gora.store.DataStoreFactory;
+import org.apache.gora.util.GoraException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.util.Properties;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutionException;
--- End diff --

Please remove these unused imports.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL

2017-07-28 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on GORA-497:
-

Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130026243
  
--- Diff: 
gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/persistent/CassandraNativePersistent.java
 ---
@@ -0,0 +1,109 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.gora.cassandra.persistent;
+
+import com.datastax.driver.mapping.annotations.Transient;
+import org.apache.avro.Schema;
+import org.apache.gora.persistency.Persistent;
+import org.apache.gora.persistency.Tombstone;
+import org.apache.gora.persistency.impl.PersistentBase;
+
+import java.util.List;
+
+/**
+ * This class should be used with Native Cassandra Serialization.
+ */
+public abstract class CassandraNativePersistent implements Persistent {
+  @Transient
--- End diff --

Do we have a mechanism to generate these native persistent data beans which 
extends CassandraNativePersistent?


> Migrate CassandraThrift to CQL 
> ---
>
> Key: GORA-497
> URL: https://issues.apache.org/jira/browse/GORA-497
> Project: Apache Gora
>  Issue Type: Improvement
>  Components: gora-cassandra
>Reporter: Madhawa Gunasekara
>Assignee: Madhawa Gunasekara
>  Labels: gsoc2017
> Fix For: 0.8
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] gora pull request #110: [WIP] GORA-497 : Rewrite Cassandra data store

2017-07-28 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130025998
  
--- Diff: 
gora-cassandra-cql/src/examples/java/org/apache/gora/cassandra/example/generated/nativeSerialization/ComplexTypes.java
 ---
@@ -0,0 +1,102 @@
+package org.apache.gora.cassandra.example.generated.nativeSerialization;
--- End diff --

Please add License header here?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL

2017-07-28 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on GORA-497:
-

Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130025998
  
--- Diff: 
gora-cassandra-cql/src/examples/java/org/apache/gora/cassandra/example/generated/nativeSerialization/ComplexTypes.java
 ---
@@ -0,0 +1,102 @@
+package org.apache.gora.cassandra.example.generated.nativeSerialization;
--- End diff --

Please add License header here?


> Migrate CassandraThrift to CQL 
> ---
>
> Key: GORA-497
> URL: https://issues.apache.org/jira/browse/GORA-497
> Project: Apache Gora
>  Issue Type: Improvement
>  Components: gora-cassandra
>Reporter: Madhawa Gunasekara
>Assignee: Madhawa Gunasekara
>  Labels: gsoc2017
> Fix For: 0.8
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL

2017-07-28 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on GORA-497:
-

Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130024911
  
--- Diff: 
gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/bean/KeySpace.java 
---
@@ -0,0 +1,85 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.gora.cassandra.bean;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * This class represents the Cassandra Keyspace.
+ */
+public class KeySpace {
+
+  public enum PlacementStrategy {
--- End diff --

Please document these enum fields - SimpleStrategy, NetworkTopologyStrategy


> Migrate CassandraThrift to CQL 
> ---
>
> Key: GORA-497
> URL: https://issues.apache.org/jira/browse/GORA-497
> Project: Apache Gora
>  Issue Type: Improvement
>  Components: gora-cassandra
>Reporter: Madhawa Gunasekara
>Assignee: Madhawa Gunasekara
>  Labels: gsoc2017
> Fix For: 0.8
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] gora pull request #110: [WIP] GORA-497 : Rewrite Cassandra data store

2017-07-28 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130024911
  
--- Diff: 
gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/bean/KeySpace.java 
---
@@ -0,0 +1,85 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.gora.cassandra.bean;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * This class represents the Cassandra Keyspace.
+ */
+public class KeySpace {
+
+  public enum PlacementStrategy {
--- End diff --

Please document these enum fields - SimpleStrategy, NetworkTopologyStrategy


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL

2017-07-28 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on GORA-497:
-

Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130024629
  
--- Diff: 
gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/bean/ClusterKeyField.java
 ---
@@ -0,0 +1,55 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.gora.cassandra.bean;
+
+/**
+ * This class represents Cassandra Clustering Key.
+ */
+public class ClusterKeyField {
+
+  public String getColumnName() {
+return columnName;
+  }
+
+  public void setColumnName(String columnName) {
+this.columnName = columnName;
+  }
+
+  private String columnName;
+
+  public ClusterKeyField() {
+
+  }
+
+  public enum Order {
--- End diff --

Please document these enum fields - DESC,  ASC,


> Migrate CassandraThrift to CQL 
> ---
>
> Key: GORA-497
> URL: https://issues.apache.org/jira/browse/GORA-497
> Project: Apache Gora
>  Issue Type: Improvement
>  Components: gora-cassandra
>Reporter: Madhawa Gunasekara
>Assignee: Madhawa Gunasekara
>  Labels: gsoc2017
> Fix For: 0.8
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[GitHub] gora pull request #110: [WIP] GORA-497 : Rewrite Cassandra data store

2017-07-28 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r130024629
  
--- Diff: 
gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/bean/ClusterKeyField.java
 ---
@@ -0,0 +1,55 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+package org.apache.gora.cassandra.bean;
+
+/**
+ * This class represents Cassandra Clustering Key.
+ */
+public class ClusterKeyField {
+
+  public String getColumnName() {
+return columnName;
+  }
+
+  public void setColumnName(String columnName) {
+this.columnName = columnName;
+  }
+
+  private String columnName;
+
+  public ClusterKeyField() {
+
+  }
+
+  public enum Order {
--- End diff --

Please document these enum fields - DESC,  ASC,


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---