[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16139078#comment-16139078 ] ASF GitHub Bot commented on GORA-497: - Github user asfgit closed the pull request at: https://github.com/apache/gora/pull/110 > 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
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16138913#comment-16138913 ] ASF GitHub Bot commented on GORA-497: - Github user madhawa-gunasekara commented on a diff in the pull request: https://github.com/apache/gora/pull/110#discussion_r134845082 --- 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 CassandraStoredocumentCassandraStore; + 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 -- It's my pleasure > 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
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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 CassandraStoredocumentCassandraStore; + 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)
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16123504#comment-16123504 ] 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_r132717674 --- Diff: gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/serializers/CassandraSerializer.java --- @@ -0,0 +1,216 @@ +/* + * 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; + + private Map userDefineTypeMaps; + + protected CassandraMapping mapping; + private Schema persistentSchema; + CassandraClient client; + + CassandraSerializer(CassandraClient cc, Class keyClass, Class persistantClass, CassandraMapping mapping, Schema schema) { +this.keyClass = keyClass; +this.persistentClass = persistantClass; +this.client = cc; +this.mapping = mapping; +persistentSchema = schema; +try { + analyzePersistent(); +} catch (Exception e) { + throw new RuntimeException("Error occurred while analyzing the persistent class, :" + e.getMessage()); +} + } + + /** + * This method returns the Cassandra Serializer according the Cassandra serializer property. + * + * @param ccCassandra Client + * @param type Serialization type + * @param dataStore Cassandra DataStore + * @param mapping Cassandra Mapping + * @paramkey class + * @parampersistent class + * @return Serializer + */ + public static CassandraSerializer getSerializer(CassandraClient cc, String type, final DataStore dataStore, CassandraMapping mapping, Schema schema) { +CassandraStore.SerializerType serType = type.isEmpty() ? CassandraStore.SerializerType.NATIVE : CassandraStore.SerializerType.valueOf(type.toUpperCase(Locale.ENGLISH)); +CassandraSerializer serializer; +switch (serType) { + case AVRO: +serializer = new AvroSerializer(cc, dataStore, mapping, schema); +break; + case NATIVE: + default: +serializer = new NativeSerializer(cc, dataStore.getKeyClass(), dataStore.getPersistentClass(), mapping, schema); +} +return serializer; + } + + private void analyzePersistent() throws Exception { +userDefineTypeMaps = new HashMap<>(); +for (Field field : mapping.getFieldList()) { + String fieldType = field.getType(); + if (fieldType.contains("frozen")) { +String udtType = fieldType.substring(fieldType.indexOf("<") + 1, fieldType.indexOf(">")); +if (this instanceof
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16123490#comment-16123490 ] 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_r132715495 --- Diff: gora-cassandra-cql/pom.xml --- @@ -0,0 +1,238 @@ + + + +http://www.w3.org/2001/XMLSchema-instance; xmlns="http://maven.apache.org/POM/4.0.0; + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd;> +4.0.0 + + +org.apache.gora +gora +0.8-SNAPSHOT +../ + +gora-cassandra-cql +bundle + +Apache Gora :: Cassandra - CQL +http://gora.apache.org +The Apache Gora open source framework provides an in-memory data model and +persistence for big data. Gora supports persisting to column stores, key value stores, +document stores and RDBMSs, and analyzing the data with extensive Apache Hadoop MapReduce +support. + +2010 + +The Apache Software Foundation +http://www.apache.org/ + + +JIRA +https://issues.apache.org/jira/browse/GORA + + +Jenkins +https://builds.apache.org/job/Gora-trunk/ + + + +18.0 +* + org.apache.gora.cassandra*;version="${project.version}";-noimport:=true + + + +target +target/classes +${project.artifactId}-${project.version} +target/test-classes +src/test/java +src/main/java + + +${project.basedir}/src/test/conf + +**/* + + + + + + +org.codehaus.mojo +build-helper-maven-plugin +${build-helper-maven-plugin.version} + + +generate-sources + +add-source + + + +src/examples/java + + + + + + +org.apache.maven.plugins +maven-surefire-plugin + + +org.apache.maven.surefire +surefire-junit47 +2.20 + + + +always +-Xmx1024m -XX:MaxPermSize=512m + + + +org.apache.maven.plugins +maven-jar-plugin + + + + org.apache.gora.cassandra.compiler.GoraCassandraNativeCompiler + org.apache.gora.cassandra.compiler + + + + + + + + + + +org.apache.gora +gora-core + + + +org.apache.gora +gora-core +test-jar +test + + + + +com.datastax.cassandra +cassandra-driver-core +${cassandra-driver.version} + + + +com.datastax.cassandra +cassandra-driver-mapping +${cassandra-driver.version} + + + +com.datastax.cassandra +cassandra-driver-extras +${cassandra-driver.version} + + + + +org.apache.cassandra +cassandra-all +test + + +org.apache.cassandra.deps +avro + + +org.slf4j +slf4j-log4j12 + + +io.netty +netty-handler + +
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16115446#comment-16115446 ] ASF GitHub Bot commented on GORA-497: - Github user lewismc commented on the issue: https://github.com/apache/gora/pull/110 @madhawa-gunasekara what is the status of this PR? > 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
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16110446#comment-16110446 ] ASF GitHub Bot commented on GORA-497: - Github user renato2099 commented on the issue: https://github.com/apache/gora/pull/110 Hi @madhawa-gunasekara , Sorry for the late reply, but to handle that case why don't just do the mapping manually as we currently do and only serialize differently? So what I had in mind was using our own same old avro java bean for keeping things in-memory, but when pushing this into Cassandra, then (1) store everything as avro binary data (serialize every type as binary data as we did), or (2) use cassandra native serialization so users can use regular CQL for checking their data. You accomplished the same :) BUT now we have also introduced a different in-memory data bean which will not help in keeping a single entry-point for all no-sql databases (now we need Cassandra java beans). I think we could just go back to use our own avro data beans and use the native serialization you have coded, and then later handling the avro binary serialization. What do you think? how much work would it be? > 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
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16110369#comment-16110369 ] ASF GitHub Bot commented on GORA-497: - Github user renato2099 commented on a diff in the pull request: https://github.com/apache/gora/pull/110#discussion_r130792458 --- Diff: gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/serializers/CassandraQueryFactory.java --- @@ -0,0 +1,701 @@ +/* + * 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.querybuilder.Delete; +import com.datastax.driver.core.querybuilder.QueryBuilder; +import com.datastax.driver.core.querybuilder.Select; +import com.datastax.driver.core.querybuilder.Update; +import org.apache.gora.cassandra.bean.CassandraKey; +import org.apache.gora.cassandra.bean.ClusterKeyField; +import org.apache.gora.cassandra.bean.Field; +import org.apache.gora.cassandra.bean.KeySpace; +import org.apache.gora.cassandra.bean.PartitionKeyField; +import org.apache.gora.cassandra.query.CassandraQuery; +import org.apache.gora.cassandra.store.CassandraMapping; +import org.apache.gora.query.Query; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Locale; +import java.util.Map; + +/** + * This class is used create Cassandra Queries. + */ +class CassandraQueryFactory { + + private static final Logger LOG = LoggerFactory.getLogger(CassandraQueryFactory.class); + + /** + * This method returns the CQL query to create key space. + * refer : http://docs.datastax.com/en/cql/3.1/cql/cql_reference/create_keyspace_r.html + * + * @param mapping Cassandra Mapping {@link CassandraMapping} + * @return CQL Query + */ + static String getCreateKeySpaceQuery(CassandraMapping mapping) { +KeySpace keySpace = mapping.getKeySpace(); +StringBuilder stringBuffer = new StringBuilder(); +stringBuffer.append("CREATE KEYSPACE IF NOT EXISTS ").append(keySpace.getName()).append(" WITH REPLICATION = { 'class' : "); +KeySpace.PlacementStrategy placementStrategy = keySpace.getPlacementStrategy(); + stringBuffer.append("'").append(placementStrategy).append("'").append(", ").append("'"); +switch (placementStrategy) { + case SimpleStrategy: +stringBuffer.append("replication_factor").append("'").append(" : ").append(keySpace.getReplicationFactor()).append(" }"); +break; + case NetworkTopologyStrategy: +boolean isCommaNeeded = false; +for (Map.Entryentry : keySpace.getDataCenters().entrySet()) { + if (isCommaNeeded) { +stringBuffer.append(", '"); + } + stringBuffer.append(entry.getKey()).append("'").append(" : ").append(entry.getValue()); + isCommaNeeded = true; +} +stringBuffer.append(" }"); +break; +} + +if (keySpace.isDurableWritesEnabled()) { + stringBuffer.append(" AND DURABLE_WRITES = ").append(keySpace.isDurableWritesEnabled()); +} +return stringBuffer.toString(); + } + + /** + * This method returns the CQL query to table. + * refer : http://docs.datastax.com/en/cql/3.1/cql/cql_reference/create_table_r.html + * + * Trick : To have a consistency of the order of the columns, first we append partition keys, second cluster keys and finally other columns. + * It's very much needed to follow the same order in other CRUD operations as well. + * + * @param mapping Cassandra mapping {@link CassandraMapping} + * @return CQL Query + */ + static String getCreateTableQuery(CassandraMapping mapping) { +StringBuilder stringBuffer = new StringBuilder(); +
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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 + publicDataStore 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
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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 + publicDataStore 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
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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 + publicDataStore 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
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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 + publicDataStore 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
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16104485#comment-16104485 ] 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_r130016679 --- Diff: gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/store/CassandraClient.java --- @@ -0,0 +1,501 @@ +package org.apache.gora.cassandra.store; --- 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
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16100346#comment-16100346 ] ASF GitHub Bot commented on GORA-497: - Github user lewismc commented on a diff in the pull request: https://github.com/apache/gora/pull/110#discussion_r129362202 --- Diff: gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/store/CassandraMappingBuilder.java --- @@ -135,13 +137,16 @@ public CassandraMapping readMapping(String filename) throws IOException { } break; } -map.setKeySpace(keyspace); +cassandraMapping.setKeySpace(keyspace); break; } } } + else { +throw new RuntimeException("KeySpace couldn't be able to found in the cassandra mapping. Please configure the cassandra mapping correctly."); --- End diff -- Please change the following statement ```KeySpace couldn't be able to found in the cassandra mapping. Please configure the cassandra mapping correctly.``` to ```Couldn't find KeySpace in the Cassandra mapping. Please configure the cassandra mapping correctly.``` > 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
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16100341#comment-16100341 ] ASF GitHub Bot commented on GORA-497: - Github user lewismc commented on a diff in the pull request: https://github.com/apache/gora/pull/110#discussion_r129359927 --- Diff: gora-cassandra-cql/src/examples/avro/cassandraRecord.json --- @@ -0,0 +1,106 @@ +{ + "type": "record", + "name": "CassandraRecord", + "default": null, + "namespace": "org.apache.gora.cassandra.example.generated.avroSerialization", --- End diff -- Please do the same with this schema. > 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
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16100345#comment-16100345 ] ASF GitHub Bot commented on GORA-497: - Github user lewismc commented on a diff in the pull request: https://github.com/apache/gora/pull/110#discussion_r129360422 --- Diff: gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/query/CassandraResultSet.java --- @@ -79,4 +79,8 @@ public void addResultElement(K key, T token) { this.persistentObject.add(token); this.size++; } + + public void setLimit(long limit) { --- End diff -- Can you please make sure to document all (or as many as possible) public method you implement. This is good practice. > 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
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16100347#comment-16100347 ] ASF GitHub Bot commented on GORA-497: - Github user lewismc commented on a diff in the pull request: https://github.com/apache/gora/pull/110#discussion_r129360462 --- Diff: gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/serializers/AvroCassandraUtils.java --- @@ -0,0 +1,274 @@ +package org.apache.gora.cassandra.serializers; --- End diff -- Add license header > 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
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16100344#comment-16100344 ] ASF GitHub Bot commented on GORA-497: - Github user lewismc commented on a diff in the pull request: https://github.com/apache/gora/pull/110#discussion_r129359618 --- Diff: gora-cassandra-cql/src/examples/avro/cassandraKey.json --- @@ -0,0 +1,21 @@ +{ + "type": "record", + "name": "CassandraKey", + "default": null, + "namespace": "org.apache.gora.cassandra.example.generated.avroSerialization", --- End diff -- Please change ```avroSerialization``` to ```AvroSerialization```, please also rename ```cassandraKey.json``` to ```CassandraKey.json``` > 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
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16100342#comment-16100342 ] ASF GitHub Bot commented on GORA-497: - Github user lewismc commented on a diff in the pull request: https://github.com/apache/gora/pull/110#discussion_r129359438 --- Diff: gora-cassandra-cql/src/examples/avro/cassandraKey.json --- @@ -0,0 +1,21 @@ +{ + "type": "record", + "name": "CassandraKey", + "default": null, --- End diff -- Can you provide a 'doc' field as well? > 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
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16079857#comment-16079857 ] ASF GitHub Bot commented on GORA-497: - Github user renato2099 commented on the issue: https://github.com/apache/gora/pull/110 Hi @madhawa-gunasekara, I think this is looking pretty good! Quick question, I saw that you have created a CassandraNativePersistent which implements Persistent, so for the Avro serialization will use the same right? So How is this going to play with the Gora Compiler? Will we have to modify that as well? Couldn't we just use the Persistent 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)
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16079495#comment-16079495 ] ASF GitHub Bot commented on GORA-497: - Github user madhawa-gunasekara commented on a diff in the pull request: https://github.com/apache/gora/pull/110#discussion_r126297972 --- Diff: gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/bean/CassandraKey.java --- @@ -0,0 +1,65 @@ +/* + * 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; + + + public CassandraKey(String name) { +this.name = name; + } + + public String getName() { +return name; + } + + public List getClusterKeyFields() { +return clusterKeyFields; + } + + public List getPartitionKeyFields() { +return partitionKeyFields; + } + + public void addPartitionKeyField(PartitionKeyField partitionKeyField) { --- End diff -- :+1: > 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
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16063305#comment-16063305 ] 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_r124050129 --- Diff: gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java --- @@ -0,0 +1,788 @@ +/* + * 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.HostDistance; +import com.datastax.driver.core.KeyspaceMetadata; +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.TableMetadata; +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.mapping.Mapper; +import com.datastax.driver.mapping.MappingManager; +import org.apache.gora.cassandra.bean.CassandraKey; +import org.apache.gora.cassandra.bean.ClusterKeyField; +import org.apache.gora.cassandra.bean.Field; +import org.apache.gora.cassandra.bean.KeySpace; +import org.apache.gora.cassandra.bean.PartitionKeyField; +import org.apache.gora.persistency.BeanFactory; +import org.apache.gora.persistency.Persistent; +import org.apache.gora.query.PartitionQuery; +import org.apache.gora.query.Query; +import org.apache.gora.query.Result; +import org.apache.gora.store.DataStore; +import org.apache.gora.store.DataStoreFactory; +import org.jdom.Attribute; +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; + +/** + * Implementation of Cassandra Store. + * + * @param key class + * @param persistent class + */ +public class CassandraStoreimplements DataStore { + + private static final String DEFAULT_MAPPING_FILE = "gora-cassandra-mapping.xml"; + + public static final Logger LOG = LoggerFactory.getLogger(CassandraStore.class); + + private BeanFactory beanFactory; + + private Cluster cluster; + + private Class keyClass; + + private Class persistentClass; + + private CassandraMapping mapping; + + private boolean isUseNativeSerialization; + + private Mapper mapper; + + private Session session; + + public CassandraStore() { +super(); + } + + /** + * In initializing the cassandra datastore, read the mapping file, creates the basic connection to cassandra cluster, + * according to the gora properties + * + * @param keyClasskey class + * @param persistentClass persistent class
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16063314#comment-16063314 ] 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_r124045668 --- Diff: gora-cassandra-cql/src/examples/java/.gitignore --- @@ -0,0 +1,15 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more --- End diff -- Is this file added intentionally? > 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
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16063306#comment-16063306 ] 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_r124048997 --- Diff: gora-cassandra-cql/pom.xml --- @@ -0,0 +1,232 @@ + + + +http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd;> +4.0.0 + + +org.apache.gora +gora +0.8-SNAPSHOT +../ + +gora-cassandra-cql +bundle + +Apache Gora :: Cassandra - CQL +http://gora.apache.org +The Apache Gora open source framework provides an in-memory data model and +persistence for big data. Gora supports persisting to column stores, key value stores, +document stores and RDBMSs, and analyzing the data with extensive Apache Hadoop MapReduce +support. + +2010 + +The Apache Software Foundation +http://www.apache.org/ + + +JIRA +https://issues.apache.org/jira/browse/GORA + + +Jenkins +https://builds.apache.org/job/Gora-trunk/ + + + +18.0 +* + org.apache.gora.cassandra*;version="${project.version}";-noimport:=true + + + +target +target/classes +${project.artifactId}-${project.version} +target/test-classes +src/test/java +src/main/java + + +${project.basedir}/src/test/conf + +**/* + + + + + + +org.codehaus.mojo +build-helper-maven-plugin +${build-helper-maven-plugin.version} + + +generate-sources + +add-source + + + +src/examples/java + + + + + + +org.apache.maven.plugins +maven-surefire-plugin + + +org.apache.maven.surefire +surefire-junit47 +2.20 + + + +always +-Xmx1024m -XX:MaxPermSize=512m + + + + + + + + + + +org.xerial.snappy +snappy-java +1.0.5-M3 +test + + + + +org.apache.gora +gora-core + + + +org.apache.gora +gora-core +test-jar +test + + + + +com.datastax.cassandra +cassandra-driver-core +${cassandra-driver.version} + + + +com.datastax.cassandra +cassandra-driver-mapping +${cassandra-driver.version} + + + +com.datastax.cassandra +cassandra-driver-extras +${cassandra-driver.version} + + + + +org.apache.cassandra +cassandra-all +test + + +org.apache.cassandra.deps +avro + + +org.slf4j +slf4j-log4j12 + + +io.netty +netty-handler + + +org.slf4j +log4j-over-slf4j + + + + + +io.netty --- End diff -- Do we have this Netty dependency defined root parent pom? This Netty versions should be
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16063310#comment-16063310 ] 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_r124047919 --- Diff: gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestCassandraStoreWithNativeSerialization.java --- @@ -0,0 +1,117 @@ +package org.apache.gora.cassandra.store; --- End diff -- License header please? > 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
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16063313#comment-16063313 ] 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_r124046147 --- Diff: gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/bean/CassandraKey.java --- @@ -0,0 +1,65 @@ +/* + * 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; + + + public CassandraKey(String name) { +this.name = name; + } + + public String getName() { +return name; + } + + public List getClusterKeyFields() { +return clusterKeyFields; + } + + public List getPartitionKeyFields() { +return partitionKeyFields; + } + + public void addPartitionKeyField(PartitionKeyField partitionKeyField) { --- End diff -- Please document these public methods for all 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)
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16063307#comment-16063307 ] 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_r124048160 --- Diff: gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/test/nativeSerialization/DateAsStringCodec.java --- @@ -0,0 +1,33 @@ +package org.apache.gora.cassandra.test.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
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16063311#comment-16063311 ] 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_r124046726 --- Diff: gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/serializers/CassandraNativePersistent.java --- @@ -0,0 +1,91 @@ +package org.apache.gora.cassandra.serializers; --- End diff -- Please add Apache license header? > 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
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16062135#comment-16062135 ] ASF GitHub Bot commented on GORA-497: - Github user madhawa-gunasekara commented on a diff in the pull request: https://github.com/apache/gora/pull/110#discussion_r123885498 --- Diff: gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/store/CassandraQueryFactory.java --- @@ -0,0 +1,4 @@ +package org.apache.gora.cassandra.store; --- End diff -- License header added. > 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
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16062136#comment-16062136 ] ASF GitHub Bot commented on GORA-497: - Github user madhawa-gunasekara commented on a diff in the pull request: https://github.com/apache/gora/pull/110#discussion_r123885507 --- Diff: gora-cassandra-cql/pom.xml --- @@ -0,0 +1,230 @@ + + + +http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd;> + +4.0.0 + + +org.apache.gora +gora +0.8-SNAPSHOT +../ + +gora-cassandra-cql +bundle + +Apache Gora :: Cassandra - CQL +http://gora.apache.org +The Apache Gora open source framework provides an in-memory data model and +persistence for big data. Gora supports persisting to column stores, key value stores, +document stores and RDBMSs, and analyzing the data with extensive Apache Hadoop MapReduce +support. +2010 + +The Apache Software Foundation +http://www.apache.org/ + + +JIRA +https://issues.apache.org/jira/browse/GORA + + +Jenkins +https://builds.apache.org/job/Gora-trunk/ + + + +* + org.apache.gora.cassandra*;version="${project.version}";-noimport:=true + + + +target +target/classes +${project.artifactId}-${project.version} +target/test-classes +src/test/java +src/main/java + + +${project.basedir}/src/test/conf + + **/* + + + + + + +org.codehaus.mojo +build-helper-maven-plugin +${build-helper-maven-plugin.version} + + +generate-sources + +add-source + + + +src/examples/java + + + + + + + + + + + + + +org.xerial.snappy +snappy-java +1.0.5-M3 +test + + + + +org.apache.gora +gora-core + + + +org.apache.gora +gora-core +test-jar +test + + + + +com.datastax.cassandra +cassandra-driver-core +${cassandra-driver.version} + + +com.google.guava +guava + + + + + + +org.apache.cassandra +cassandra-all +test + + +org.apache.cassandra.deps +avro + + +org.slf4j +slf4j-log4j12 + + +org.slf4j +log4j-over-slf4j + + + + + + + + + + + + + + + + + + + +com.google.guava +guava + + + +org.jdom +jdom + + --- End diff -- Removed. > 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
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16061368#comment-16061368 ] ASF GitHub Bot commented on GORA-497: - Github user madhawa-gunasekara commented on a diff in the pull request: https://github.com/apache/gora/pull/110#discussion_r123820061 --- Diff: gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/GoraCassandraTestDriver.java --- @@ -148,7 +156,7 @@ public void cleanupDirectoriesFailover() { } catch (Exception e) { // ignore exception try { - Thread.sleep(250); + Thread.sleep(2500); --- End diff -- Yes this was for debugging. > 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
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16061342#comment-16061342 ] ASF GitHub Bot commented on GORA-497: - Github user lewismc commented on a diff in the pull request: https://github.com/apache/gora/pull/110#discussion_r123814516 --- Diff: gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/GoraCassandraTestDriver.java --- @@ -148,7 +156,7 @@ public void cleanupDirectoriesFailover() { } catch (Exception e) { // ignore exception try { - Thread.sleep(250); + Thread.sleep(2500); --- End diff -- Why is is longer? Is this for debugging only? > 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
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16061344#comment-16061344 ] ASF GitHub Bot commented on GORA-497: - Github user lewismc commented on a diff in the pull request: https://github.com/apache/gora/pull/110#discussion_r123814041 --- Diff: gora-cassandra-cql/pom.xml --- @@ -144,12 +144,28 @@ slf4j-log4j12 +io.netty +netty-handler + + org.slf4j log4j-over-slf4j + > 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
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16061343#comment-16061343 ] ASF GitHub Bot commented on GORA-497: - Github user lewismc commented on a diff in the pull request: https://github.com/apache/gora/pull/110#discussion_r123814653 --- Diff: gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestCassandraStoreWithNativeSerialization.java --- @@ -26,15 +26,20 @@ public static void setUpClass() throws Exception { setProperties(); testDriver.setParameters(parameter); testDriver.setUpClass(); +// This time is added since embedded cassandra service needs some time to start up. --- End diff -- ack... why so long I wonder? same as hot loading in Tomcat. > 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
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15955344#comment-15955344 ] Madhawa Gunasekara commented on GORA-497: - Hi [~djkevincr], I have added my proposal [1] [1] https://cwiki.apache.org/confluence/display/GORA/Rewrite+Cassandra+DataStore+Implementation Thanks, Madhawa > 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.3.15#6346)
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15953744#comment-15953744 ] Kevin Ratnasekera commented on GORA-497: [~madhawa] Can you please add your proposal to wiki [1] ? [1] https://cwiki.apache.org/confluence/display/GORA/GSoC+2017+Proposals Regards Kevin > 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.3.15#6346)
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15952564#comment-15952564 ] Lewis John McGibbney commented on GORA-497: --- [~madhawa] granted. > 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.3.15#6346)
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15952125#comment-15952125 ] Kevin Ratnasekera commented on GORA-497: [~madhawa] I had a look on your proposal. Please go ahead and submit your final proposal before the deadline. Draft proposals will not be accepted for the GSoC. Regards Kevin > 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.3.15#6346)
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15950684#comment-15950684 ] Madhawa Gunasekara commented on GORA-497: - Hi [~lewismc], My wiki username is madhawa30. Please find my drafted proposal [1]. let me know If I have missed anything there. [1] https://docs.google.com/document/d/15dqIB0LMhe4GjpjElDOrV-hbPjFyVA_wktYjOLnzd64/edit?usp=sharing > 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.3.15#6346)
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15949248#comment-15949248 ] Madhawa Gunasekara commented on GORA-497: - [~lewismc] Can you grant wiki access for me to attach my proposal? Thanks, > 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.3.15#6346)
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15856719#comment-15856719 ] Renato Javier MarroquĂn Mogrovejo commented on GORA-497: I started some work on a private branch https://github.com/renato2099/gora/tree/GORA-497 My idea is that we should have more serialization types other than AVRO for Cassandra. Because even though storing everything as bytes might get us some benefit, it might not be the case anymore as Cassandra has improved a lot since the days we used Hector, and that storing everything as bytes makes the CQL feature useless for users. So we should have Cassandra serialization on as well. I created the skeleton of this on the branch. If you want to start working on this [~madhawa] I'd be happy to collaborate and try to get ready for GSoC later on. Thanks! > 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.3.15#6346)
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15852148#comment-15852148 ] Madhawa Gunasekara commented on GORA-497: - Yes, sure. I'm a student of Institute of Engineers, Sri Lanka. so I can take this project on through GSOC. > 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 > Fix For: 0.8 > > -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15852078#comment-15852078 ] Lewis John McGibbney commented on GORA-497: --- [~madhawa] are you in a position to take this project on through GSoC? This is just a thought. Are you a student? > 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 > Fix For: 0.8 > > -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15843869#comment-15843869 ] Lewis John McGibbney commented on GORA-497: --- Hi [~Madhawa Gunasekara] I apologize I did not see your mailing list post or this ticket as it was over the December break. If you are interested in working on this issue then i am very happy to work with you. Please let me know. Thanks. > 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 > -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (GORA-497) Migrate CassandraThrift to CQL
[ https://issues.apache.org/jira/browse/GORA-497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15739521#comment-15739521 ] Alfonso Nishikawa commented on GORA-497: Commented by Madhawa at dev@: {quote}Hector has been no longer used in Cassandra community. Community has been migrated to CQL (Cassandra Query Language), which is very much similar to SQL. and also currently Gora-Cassandra component is not compatible with Cassandra database servers which use CQL 3,4 versions. CQL performance is much better than thrift (Hector) [http://www.datastax.com/dev/blog/cassandra-2-1-now-over-50-faster].{quote} > 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 > -- This message was sent by Atlassian JIRA (v6.3.4#6332)