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

2017-08-12 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r132823605
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestAvroSerializationWithUDT.java
 ---
@@ -0,0 +1,91 @@
+/**
+ * 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.avro.util.Utf8;
+import org.apache.gora.cassandra.GoraCassandraTestDriver;
+import org.apache.gora.examples.generated.Metadata;
+import org.apache.gora.examples.generated.WebPage;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.Properties;
+
+public class TestAvroSerializationWithUDT {
--- End diff --

Shall we add java doc 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-08-12 Thread ASF GitHub Bot (JIRA)

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

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_r132823605
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestAvroSerializationWithUDT.java
 ---
@@ -0,0 +1,91 @@
+/**
+ * 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.avro.util.Utf8;
+import org.apache.gora.cassandra.GoraCassandraTestDriver;
+import org.apache.gora.examples.generated.Metadata;
+import org.apache.gora.examples.generated.WebPage;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import java.nio.ByteBuffer;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.Properties;
+
+public class TestAvroSerializationWithUDT {
--- End diff --

Shall we add java doc 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)


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

2017-08-12 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r132823832
  
--- Diff: 
gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/compiler/GoraCassandraNativeCompiler.java
 ---
@@ -0,0 +1,319 @@
+/**
+ * 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.compiler;
+
+import org.apache.commons.io.FilenameUtils;
+import org.apache.gora.cassandra.bean.Field;
+import org.apache.gora.cassandra.store.CassandraMapping;
+import org.apache.gora.cassandra.store.CassandraMappingBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.nio.charset.Charset;
+import java.util.List;
+import java.util.Locale;
+
+public class GoraCassandraNativeCompiler {
--- End diff --

Please add java doc to the class.


---
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-08-12 Thread ASF GitHub Bot (JIRA)

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

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_r132823832
  
--- Diff: 
gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/compiler/GoraCassandraNativeCompiler.java
 ---
@@ -0,0 +1,319 @@
+/**
+ * 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.compiler;
+
+import org.apache.commons.io.FilenameUtils;
+import org.apache.gora.cassandra.bean.Field;
+import org.apache.gora.cassandra.store.CassandraMapping;
+import org.apache.gora.cassandra.store.CassandraMappingBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.nio.charset.Charset;
+import java.util.List;
+import java.util.Locale;
+
+public class GoraCassandraNativeCompiler {
--- End diff --

Please add java doc to the class.


> 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-08-12 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r132823884
  
--- Diff: 
gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/store/CassandraClient.java
 ---
@@ -0,0 +1,515 @@
+/*
+ *  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 com.datastax.driver.core.Cluster;
+import com.datastax.driver.core.ConsistencyLevel;
+import com.datastax.driver.core.DataType;
+import com.datastax.driver.core.HostDistance;
+import com.datastax.driver.core.PoolingOptions;
+import com.datastax.driver.core.ProtocolOptions;
+import com.datastax.driver.core.ProtocolVersion;
+import com.datastax.driver.core.QueryOptions;
+import com.datastax.driver.core.Session;
+import com.datastax.driver.core.SocketOptions;
+import com.datastax.driver.core.TypeCodec;
+import com.datastax.driver.core.policies.ConstantReconnectionPolicy;
+import com.datastax.driver.core.policies.DCAwareRoundRobinPolicy;
+import com.datastax.driver.core.policies.DefaultRetryPolicy;
+import com.datastax.driver.core.policies.DowngradingConsistencyRetryPolicy;
+import com.datastax.driver.core.policies.ExponentialReconnectionPolicy;
+import com.datastax.driver.core.policies.FallthroughRetryPolicy;
+import com.datastax.driver.core.policies.LatencyAwarePolicy;
+import com.datastax.driver.core.policies.LoggingRetryPolicy;
+import com.datastax.driver.core.policies.RoundRobinPolicy;
+import com.datastax.driver.core.policies.TokenAwarePolicy;
+import com.datastax.driver.extras.codecs.arrays.DoubleArrayCodec;
+import com.datastax.driver.extras.codecs.arrays.FloatArrayCodec;
+import com.datastax.driver.extras.codecs.arrays.IntArrayCodec;
+import com.datastax.driver.extras.codecs.arrays.LongArrayCodec;
+import com.datastax.driver.extras.codecs.arrays.ObjectArrayCodec;
+import com.datastax.driver.extras.codecs.date.SimpleDateCodec;
+import com.datastax.driver.extras.codecs.date.SimpleTimestampCodec;
+import com.datastax.driver.extras.codecs.jdk8.OptionalCodec;
+import org.apache.gora.cassandra.bean.Field;
+import org.jdom.Document;
+import org.jdom.Element;
+import org.jdom.JDOMException;
+import org.jdom.input.SAXBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+import java.util.Properties;
+
+/**
+ * This class provides the Cassandra Client Connection.
+ * Initialize the Cassandra Connection according to the Properties.
+ */
+public class CassandraClient {
+
+  private static final Logger LOG = 
LoggerFactory.getLogger(CassandraClient.class);
+
+
--- End diff --

Better if we can 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-08-12 Thread ASF GitHub Bot (JIRA)

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

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_r132823884
  
--- Diff: 
gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/store/CassandraClient.java
 ---
@@ -0,0 +1,515 @@
+/*
+ *  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 com.datastax.driver.core.Cluster;
+import com.datastax.driver.core.ConsistencyLevel;
+import com.datastax.driver.core.DataType;
+import com.datastax.driver.core.HostDistance;
+import com.datastax.driver.core.PoolingOptions;
+import com.datastax.driver.core.ProtocolOptions;
+import com.datastax.driver.core.ProtocolVersion;
+import com.datastax.driver.core.QueryOptions;
+import com.datastax.driver.core.Session;
+import com.datastax.driver.core.SocketOptions;
+import com.datastax.driver.core.TypeCodec;
+import com.datastax.driver.core.policies.ConstantReconnectionPolicy;
+import com.datastax.driver.core.policies.DCAwareRoundRobinPolicy;
+import com.datastax.driver.core.policies.DefaultRetryPolicy;
+import com.datastax.driver.core.policies.DowngradingConsistencyRetryPolicy;
+import com.datastax.driver.core.policies.ExponentialReconnectionPolicy;
+import com.datastax.driver.core.policies.FallthroughRetryPolicy;
+import com.datastax.driver.core.policies.LatencyAwarePolicy;
+import com.datastax.driver.core.policies.LoggingRetryPolicy;
+import com.datastax.driver.core.policies.RoundRobinPolicy;
+import com.datastax.driver.core.policies.TokenAwarePolicy;
+import com.datastax.driver.extras.codecs.arrays.DoubleArrayCodec;
+import com.datastax.driver.extras.codecs.arrays.FloatArrayCodec;
+import com.datastax.driver.extras.codecs.arrays.IntArrayCodec;
+import com.datastax.driver.extras.codecs.arrays.LongArrayCodec;
+import com.datastax.driver.extras.codecs.arrays.ObjectArrayCodec;
+import com.datastax.driver.extras.codecs.date.SimpleDateCodec;
+import com.datastax.driver.extras.codecs.date.SimpleTimestampCodec;
+import com.datastax.driver.extras.codecs.jdk8.OptionalCodec;
+import org.apache.gora.cassandra.bean.Field;
+import org.jdom.Document;
+import org.jdom.Element;
+import org.jdom.JDOMException;
+import org.jdom.input.SAXBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Locale;
+import java.util.Properties;
+
+/**
+ * This class provides the Cassandra Client Connection.
+ * Initialize the Cassandra Connection according to the Properties.
+ */
+public class CassandraClient {
+
+  private static final Logger LOG = 
LoggerFactory.getLogger(CassandraClient.class);
+
+
--- End diff --

Better if we can 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-08-12 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r132824045
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestCassandraStore.java
 ---
@@ -0,0 +1,204 @@
+/**
+ * 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.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
+ */
+
+/**
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora. 
+ */
--- End diff --

May be we should add this as class level java doc.


---
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-08-12 Thread ASF GitHub Bot (JIRA)

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

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_r132824045
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestCassandraStore.java
 ---
@@ -0,0 +1,204 @@
+/**
+ * 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.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
+ */
+
+/**
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora. 
+ */
--- End diff --

May be we should add this as class level java doc.


> 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-08-12 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r132824225
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestNativeSerializationWithUDT.java
 ---
@@ -0,0 +1,84 @@
+/**
+ * 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.Customer;
+import 
org.apache.gora.cassandra.example.generated.nativeSerialization.Document;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import java.util.Properties;
+
+public class TestNativeSerializationWithUDT {
--- End diff --

Please add class level java doc?


---
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-08-12 Thread ASF GitHub Bot (JIRA)

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

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_r132824225
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestNativeSerializationWithUDT.java
 ---
@@ -0,0 +1,84 @@
+/**
+ * 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.Customer;
+import 
org.apache.gora.cassandra.example.generated.nativeSerialization.Document;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import java.util.Properties;
+
+public class TestNativeSerializationWithUDT {
--- End diff --

Please add class level java doc?


> 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-08-12 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r132824244
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestNativeSerializationWithUDT.java
 ---
@@ -0,0 +1,84 @@
+/**
+ * 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.Customer;
+import 
org.apache.gora.cassandra.example.generated.nativeSerialization.Document;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import java.util.Properties;
+
+public class TestNativeSerializationWithUDT {
+
+  private static GoraCassandraTestDriver testDriver = new 
GoraCassandraTestDriver();
+  private static CassandraStore documentCassandraStore;
+  private static Properties parameter;
+
+  @BeforeClass
+  public static void setUpClass() throws Exception {
+setProperties();
+testDriver.setParameters(parameter);
+testDriver.setUpClass();
+documentCassandraStore = (CassandraStore) 
testDriver.createDataStore(String.class, Document.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", 
"nativeUDT/gora-cassandra-mapping.xml");
+  }
+
+  @AfterClass
+  public static void tearDownClass() throws Exception {
+testDriver.tearDownClass();
+  }
+
+  @After
+  public void tearDown() throws Exception {
+testDriver.tearDown();
+  }
+
+  /**
+   * This is for testGetNested() with UDT dataType with native 
serialization.
+   */
+  @Test
+  public void testSimplePutAndGEt() {
--- End diff --

This is great. Thanks for adding Native nested test 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-08-12 Thread ASF GitHub Bot (JIRA)

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

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_r132824244
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestNativeSerializationWithUDT.java
 ---
@@ -0,0 +1,84 @@
+/**
+ * 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.Customer;
+import 
org.apache.gora.cassandra.example.generated.nativeSerialization.Document;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import java.util.Properties;
+
+public class TestNativeSerializationWithUDT {
+
+  private static GoraCassandraTestDriver testDriver = new 
GoraCassandraTestDriver();
+  private static CassandraStore documentCassandraStore;
+  private static Properties parameter;
+
+  @BeforeClass
+  public static void setUpClass() throws Exception {
+setProperties();
+testDriver.setParameters(parameter);
+testDriver.setUpClass();
+documentCassandraStore = (CassandraStore) 
testDriver.createDataStore(String.class, Document.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", 
"nativeUDT/gora-cassandra-mapping.xml");
+  }
+
+  @AfterClass
+  public static void tearDownClass() throws Exception {
+testDriver.tearDownClass();
+  }
+
+  @After
+  public void tearDown() throws Exception {
+testDriver.tearDown();
+  }
+
+  /**
+   * This is for testGetNested() with UDT dataType with native 
serialization.
+   */
+  @Test
+  public void testSimplePutAndGEt() {
--- End diff --

This is great. Thanks for adding Native nested test 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-08-12 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r132824362
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestCassandraStore.java
 ---
@@ -0,0 +1,204 @@
+/**
+ * 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.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
--- End diff --

This License header is modified from standard Apache header. Please correct 
this as the rest of the headers.


---
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-08-12 Thread ASF GitHub Bot (JIRA)

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

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_r132824362
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestCassandraStore.java
 ---
@@ -0,0 +1,204 @@
+/**
+ * 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.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
--- End diff --

This License header is modified from standard Apache header. Please correct 
this as the rest of the headers.


> 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-08-12 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r132824405
  
--- Diff: gora-cassandra-cql/src/test/conf/gora.properties ---
@@ -0,0 +1,27 @@
+#
+#  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. 
+
+
--- End diff --

Better if we can 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-08-12 Thread ASF GitHub Bot (JIRA)

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

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_r132824405
  
--- Diff: gora-cassandra-cql/src/test/conf/gora.properties ---
@@ -0,0 +1,27 @@
+#
+#  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. 
+
+
--- End diff --

Better if we can 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-08-12 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r132824517
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestCassandraStore.java
 ---
@@ -0,0 +1,204 @@
+/**
+ * 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.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
+ */
+
+/**
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora. 
+ */
+package org.apache.gora.cassandra.store;
+
+import org.apache.gora.cassandra.GoraCassandraTestDriver;
+import org.apache.gora.examples.WebPageDataCreator;
+import org.apache.gora.examples.generated.WebPage;
+import org.apache.gora.query.Query;
+import org.apache.gora.store.DataStore;
+import org.apache.gora.store.DataStoreTestBase;
+import org.apache.gora.store.DataStoreTestUtil;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.Properties;
+
+import static org.apache.gora.examples.WebPageDataCreator.SORTED_URLS;
+import static org.apache.gora.examples.WebPageDataCreator.URLS;
+import static org.apache.gora.store.DataStoreTestUtil.assertEmptyResults;
+import static org.apache.gora.store.DataStoreTestUtil.assertNumResults;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+/**
+ * Test for CassandraStore.
+ */
+public class TestCassandraStore extends DataStoreTestBase {
--- End diff --

Thanks for adding AVRO serialization test 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-08-12 Thread ASF GitHub Bot (JIRA)

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

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_r132824517
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestCassandraStore.java
 ---
@@ -0,0 +1,204 @@
+/**
+ * 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.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
+ * 
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
+ */
+
+/**
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora. 
+ */
+package org.apache.gora.cassandra.store;
+
+import org.apache.gora.cassandra.GoraCassandraTestDriver;
+import org.apache.gora.examples.WebPageDataCreator;
+import org.apache.gora.examples.generated.WebPage;
+import org.apache.gora.query.Query;
+import org.apache.gora.store.DataStore;
+import org.apache.gora.store.DataStoreTestBase;
+import org.apache.gora.store.DataStoreTestUtil;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.Properties;
+
+import static org.apache.gora.examples.WebPageDataCreator.SORTED_URLS;
+import static org.apache.gora.examples.WebPageDataCreator.URLS;
+import static org.apache.gora.store.DataStoreTestUtil.assertEmptyResults;
+import static org.apache.gora.store.DataStoreTestUtil.assertNumResults;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+/**
+ * Test for CassandraStore.
+ */
+public class TestCassandraStore extends DataStoreTestBase {
--- End diff --

Thanks for adding AVRO serialization test 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-08-12 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r132824702
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/GoraCassandraTestDriver.java
 ---
@@ -0,0 +1,166 @@
+/*
+ *  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 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;
+
+// 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 --

Better if we can 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-08-12 Thread ASF GitHub Bot (JIRA)

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

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_r132824702
  
--- Diff: 
gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/GoraCassandraTestDriver.java
 ---
@@ -0,0 +1,166 @@
+/*
+ *  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 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;
+
+// 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 --

Better if we can 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-08-12 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r132824780
  
--- Diff: 
gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/compiler/GoraCassandraNativeCompiler.java
 ---
@@ -0,0 +1,319 @@
+/**
+ * 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.compiler;
+
+import org.apache.commons.io.FilenameUtils;
+import org.apache.gora.cassandra.bean.Field;
+import org.apache.gora.cassandra.store.CassandraMapping;
+import org.apache.gora.cassandra.store.CassandraMappingBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.nio.charset.Charset;
+import java.util.List;
+import java.util.Locale;
+
+public class GoraCassandraNativeCompiler {
+
+  private static final Logger log = 
LoggerFactory.getLogger(GoraCassandraNativeCompiler.class);
+
+  private Writer out;
+  private File dest;
+
+  GoraCassandraNativeCompiler(File dest) {
+this.dest = dest;
+  }
+
+  /**
+   * Start point of the compiler program
+   *
+   * @param args the schema file to be compiled and where this should be 
written
+   */
+  public static void main(String[] args) {
+try {
+  if (args.length < 2) {
+log.error("Usage: Compiler  ");
+System.exit(1);
+  }
+  compileSchema(new File(args[0]), new File(args[1]));
+} catch (Exception e) {
+  log.error("Something went wrong. Please check the input file.", 
e.getMessage());
+  throw new RuntimeException(e);
+}
+  }
+
+  /**
+   * Generates Java classes for a schema.
+   */
+  private static void compileSchema(File src, File dest) throws Exception {
--- End diff --

This is great. Thanks for adding compiler native data bean generation. :)


---
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-08-12 Thread ASF GitHub Bot (JIRA)

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

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_r132824780
  
--- Diff: 
gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/compiler/GoraCassandraNativeCompiler.java
 ---
@@ -0,0 +1,319 @@
+/**
+ * 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.compiler;
+
+import org.apache.commons.io.FilenameUtils;
+import org.apache.gora.cassandra.bean.Field;
+import org.apache.gora.cassandra.store.CassandraMapping;
+import org.apache.gora.cassandra.store.CassandraMappingBuilder;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.io.Writer;
+import java.nio.charset.Charset;
+import java.util.List;
+import java.util.Locale;
+
+public class GoraCassandraNativeCompiler {
+
+  private static final Logger log = 
LoggerFactory.getLogger(GoraCassandraNativeCompiler.class);
+
+  private Writer out;
+  private File dest;
+
+  GoraCassandraNativeCompiler(File dest) {
+this.dest = dest;
+  }
+
+  /**
+   * Start point of the compiler program
+   *
+   * @param args the schema file to be compiled and where this should be 
written
+   */
+  public static void main(String[] args) {
+try {
+  if (args.length < 2) {
+log.error("Usage: Compiler  ");
+System.exit(1);
+  }
+  compileSchema(new File(args[0]), new File(args[1]));
+} catch (Exception e) {
+  log.error("Something went wrong. Please check the input file.", 
e.getMessage());
+  throw new RuntimeException(e);
+}
+  }
+
+  /**
+   * Generates Java classes for a schema.
+   */
+  private static void compileSchema(File src, File dest) throws Exception {
--- End diff --

This is great. Thanks for adding compiler native data bean generation. :)


> 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-08-12 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r132825580
  
--- Diff: 
gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java
 ---
@@ -0,0 +1,279 @@
+/*
+ *  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.avro.Schema;
--- End diff --

I think by design, this CassandraStore class should be free from AVRO 
related imports since you only implement DataStore interface.
AVRO related imports should only be resided in AvroSerializer class. 
Native datastax related imports should only be resided in NativeSerializer 
class.
That way CassandraStore  is decoupled from AVRO related dependencies. 
I went through your code this AVRO import has only been used in one 
location in persistentSchema class level variable. I think you can easily get 
rid of this bit of code change, may be you change 
CassandraSerializer.getSerializer() method by passing BeanFactory 
beanFactory directly rather assigning to class level variable.
I think one this type of design would be start point, one day Gora should 
be refactored to support pluggable serializers not just AVRO. WDYT @lewismc 



---
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-08-12 Thread ASF GitHub Bot (JIRA)

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

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_r132825580
  
--- Diff: 
gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java
 ---
@@ -0,0 +1,279 @@
+/*
+ *  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.avro.Schema;
--- End diff --

I think by design, this CassandraStore class should be free from AVRO 
related imports since you only implement DataStore interface.
AVRO related imports should only be resided in AvroSerializer class. 
Native datastax related imports should only be resided in NativeSerializer 
class.
That way CassandraStore  is decoupled from AVRO related dependencies. 
I went through your code this AVRO import has only been used in one 
location in persistentSchema class level variable. I think you can easily get 
rid of this bit of code change, may be you change 
CassandraSerializer.getSerializer() method by passing BeanFactory 
beanFactory directly rather assigning to class level variable.
I think one this type of design would be start point, one day Gora should 
be refactored to support pluggable serializers not just AVRO. WDYT @lewismc 



> 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-08-12 Thread djkevincr
Github user djkevincr commented on a diff in the pull request:

https://github.com/apache/gora/pull/110#discussion_r132826245
  
--- Diff: 
gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/serializers/CassandraSerializer.java
 ---
@@ -0,0 +1,213 @@
+/*
+ *  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.serializers;
+
+import com.datastax.driver.core.KeyspaceMetadata;
+import com.datastax.driver.core.ResultSet;
+import com.datastax.driver.core.TableMetadata;
+import org.apache.avro.Schema;
+import org.apache.gora.cassandra.bean.Field;
+import org.apache.gora.cassandra.store.CassandraClient;
+import org.apache.gora.cassandra.store.CassandraMapping;
+import org.apache.gora.cassandra.store.CassandraStore;
+import org.apache.gora.persistency.Persistent;
+import org.apache.gora.persistency.impl.PersistentBase;
+import org.apache.gora.query.Query;
+import org.apache.gora.query.Result;
+import org.apache.gora.store.DataStore;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+/**
+ * This is the abstract Cassandra Serializer class.
+ */
+public abstract class CassandraSerializer {
+  private static final Logger LOG = 
LoggerFactory.getLogger(CassandraStore.class);
+  protected Class keyClass;
+
+  protected Class persistentClass;
+  protected CassandraMapping mapping;
+  CassandraClient client;
--- End diff --

Please use suitable access modifier 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-08-12 Thread ASF GitHub Bot (JIRA)

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

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_r132826245
  
--- Diff: 
gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/serializers/CassandraSerializer.java
 ---
@@ -0,0 +1,213 @@
+/*
+ *  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.serializers;
+
+import com.datastax.driver.core.KeyspaceMetadata;
+import com.datastax.driver.core.ResultSet;
+import com.datastax.driver.core.TableMetadata;
+import org.apache.avro.Schema;
+import org.apache.gora.cassandra.bean.Field;
+import org.apache.gora.cassandra.store.CassandraClient;
+import org.apache.gora.cassandra.store.CassandraMapping;
+import org.apache.gora.cassandra.store.CassandraStore;
+import org.apache.gora.persistency.Persistent;
+import org.apache.gora.persistency.impl.PersistentBase;
+import org.apache.gora.query.Query;
+import org.apache.gora.query.Result;
+import org.apache.gora.store.DataStore;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+/**
+ * This is the abstract Cassandra Serializer class.
+ */
+public abstract class CassandraSerializer {
+  private static final Logger LOG = 
LoggerFactory.getLogger(CassandraStore.class);
+  protected Class keyClass;
+
+  protected Class persistentClass;
+  protected CassandraMapping mapping;
+  CassandraClient client;
--- End diff --

Please use suitable access modifier 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)


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

2017-08-12 Thread djkevincr
Github user djkevincr commented on the issue:

https://github.com/apache/gora/pull/110
  
@madhawa-gunasekara This is excellent work :) I have reviewed you PR, I was 
not able find anything major, however I have added some comments, please check 
them out. Also code needs bit of a clean up as well, please go through the code 
again and see cases where you can improve the code .
I agree some of the concerns highlighted by @renato2099 in this thread. So 
I am waiting @renato2099 @lewismc to have a look and comment on updated PR.
I have also locally tested your PR, I am glad to say I did not encounter 
any issue. :) 


---
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-08-12 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on GORA-497:
-

Github user djkevincr commented on the issue:

https://github.com/apache/gora/pull/110
  
@madhawa-gunasekara This is excellent work :) I have reviewed you PR, I was 
not able find anything major, however I have added some comments, please check 
them out. Also code needs bit of a clean up as well, please go through the code 
again and see cases where you can improve the code .
I agree some of the concerns highlighted by @renato2099 in this thread. So 
I am waiting @renato2099 @lewismc to have a look and comment on updated PR.
I have also locally tested your PR, I am glad to say I did not encounter 
any issue. :) 


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