gora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lewi...@apache.org
Subject [30/37] gora git commit: Add License Headers
Date Wed, 23 Aug 2017 20:55:28 GMT
Add License Headers


Project: http://git-wip-us.apache.org/repos/asf/gora/repo
Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/2695207b
Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/2695207b
Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/2695207b

Branch: refs/heads/master
Commit: 2695207be60528c10f0d03ac097c0af73a2ab292
Parents: a2d63ca
Author: madhawa-gunasekara <madhawag@wso2.com>
Authored: Fri Aug 11 21:10:03 2017 +0530
Committer: madhawa-gunasekara <madhawag@wso2.com>
Committed: Fri Aug 11 21:18:13 2017 +0530

----------------------------------------------------------------------
 gora-cassandra-cql/pom.xml                      |  5 --
 .../nativeSerialization/ComplexTypes.java       | 18 ++++++++
 .../generated/nativeSerialization/Customer.java | 14 ++----
 .../generated/nativeSerialization/Document.java |  1 -
 .../generated/nativeSerialization/User.java     |  1 -
 .../compiler/GoraCassandraNativeCompiler.java   | 27 +++++------
 .../cassandra/serializers/AvroSerializer.java   |  6 ---
 .../serializers/CassandraQueryFactory.java      | 15 +++---
 .../serializers/CassandraSerializer.java        |  7 +--
 .../cassandra/serializers/NativeSerializer.java |  2 +-
 .../store/CassandraMappingBuilder.java          | 48 +++++++++-----------
 .../store/TestAvroSerializationWithUDT.java     |  6 +--
 .../cassandra/store/TestCassandraStore.java     |  4 ++
 .../TestCassandraStoreWithCassandraKey.java     | 14 +++---
 .../store/TestNativeSerializationWithUDT.java   | 11 +----
 15 files changed, 80 insertions(+), 99 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/gora/blob/2695207b/gora-cassandra-cql/pom.xml
----------------------------------------------------------------------
diff --git a/gora-cassandra-cql/pom.xml b/gora-cassandra-cql/pom.xml
index 630c51b..2e05e43 100644
--- a/gora-cassandra-cql/pom.xml
+++ b/gora-cassandra-cql/pom.xml
@@ -179,11 +179,6 @@
             </exclusions>
         </dependency>
 
-<!--        <dependency>
-            <groupId>io.netty</groupId>
-            <artifactId>netty-transport-native-epoll</artifactId>
-        </dependency>-->
-
         <dependency>
             <groupId>org.apache.gora</groupId>
             <artifactId>gora-hbase</artifactId>

http://git-wip-us.apache.org/repos/asf/gora/blob/2695207b/gora-cassandra-cql/src/examples/java/org/apache/gora/cassandra/example/generated/nativeSerialization/ComplexTypes.java
----------------------------------------------------------------------
diff --git a/gora-cassandra-cql/src/examples/java/org/apache/gora/cassandra/example/generated/nativeSerialization/ComplexTypes.java
b/gora-cassandra-cql/src/examples/java/org/apache/gora/cassandra/example/generated/nativeSerialization/ComplexTypes.java
index c161ef9..1a6a674 100644
--- a/gora-cassandra-cql/src/examples/java/org/apache/gora/cassandra/example/generated/nativeSerialization/ComplexTypes.java
+++ b/gora-cassandra-cql/src/examples/java/org/apache/gora/cassandra/example/generated/nativeSerialization/ComplexTypes.java
@@ -1,3 +1,21 @@
+/**
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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.example.generated.nativeSerialization;
 
 import com.datastax.driver.mapping.annotations.Column;

http://git-wip-us.apache.org/repos/asf/gora/blob/2695207b/gora-cassandra-cql/src/examples/java/org/apache/gora/cassandra/example/generated/nativeSerialization/Customer.java
----------------------------------------------------------------------
diff --git a/gora-cassandra-cql/src/examples/java/org/apache/gora/cassandra/example/generated/nativeSerialization/Customer.java
b/gora-cassandra-cql/src/examples/java/org/apache/gora/cassandra/example/generated/nativeSerialization/Customer.java
index 1b2de10..59bed36 100644
--- a/gora-cassandra-cql/src/examples/java/org/apache/gora/cassandra/example/generated/nativeSerialization/Customer.java
+++ b/gora-cassandra-cql/src/examples/java/org/apache/gora/cassandra/example/generated/nativeSerialization/Customer.java
@@ -15,37 +15,31 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.gora.cassandra.example.generated.nativeSerialization;
 
 import com.datastax.driver.mapping.annotations.Field;
 import com.datastax.driver.mapping.annotations.UDT;
 
-import java.util.List;
-import java.util.Map;
 import java.util.UUID;
 
 @UDT(name = "customer", keyspace = "nativeTestKeySpace")
 public class Customer {
 
-  public Customer() {
-
-  }
   @Field(name = "id")
   private String id;
-
   @Field(name = "name")
   private String name;
-
   @Field
   private UUID age;
-
   @Field(name = "coupon_code")
   private String couponCode;
-
   @Field(name = "address")
   private String address;
 
+  public Customer() {
+
+  }
+
   public String getId() {
     return id;
   }

http://git-wip-us.apache.org/repos/asf/gora/blob/2695207b/gora-cassandra-cql/src/examples/java/org/apache/gora/cassandra/example/generated/nativeSerialization/Document.java
----------------------------------------------------------------------
diff --git a/gora-cassandra-cql/src/examples/java/org/apache/gora/cassandra/example/generated/nativeSerialization/Document.java
b/gora-cassandra-cql/src/examples/java/org/apache/gora/cassandra/example/generated/nativeSerialization/Document.java
index f841a4e..77961e4 100644
--- a/gora-cassandra-cql/src/examples/java/org/apache/gora/cassandra/example/generated/nativeSerialization/Document.java
+++ b/gora-cassandra-cql/src/examples/java/org/apache/gora/cassandra/example/generated/nativeSerialization/Document.java
@@ -15,7 +15,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-
 package org.apache.gora.cassandra.example.generated.nativeSerialization;
 
 import com.datastax.driver.mapping.annotations.Column;

http://git-wip-us.apache.org/repos/asf/gora/blob/2695207b/gora-cassandra-cql/src/examples/java/org/apache/gora/cassandra/example/generated/nativeSerialization/User.java
----------------------------------------------------------------------
diff --git a/gora-cassandra-cql/src/examples/java/org/apache/gora/cassandra/example/generated/nativeSerialization/User.java
b/gora-cassandra-cql/src/examples/java/org/apache/gora/cassandra/example/generated/nativeSerialization/User.java
index 08abcd1..74b425e 100644
--- a/gora-cassandra-cql/src/examples/java/org/apache/gora/cassandra/example/generated/nativeSerialization/User.java
+++ b/gora-cassandra-cql/src/examples/java/org/apache/gora/cassandra/example/generated/nativeSerialization/User.java
@@ -14,7 +14,6 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-
 package org.apache.gora.cassandra.example.generated.nativeSerialization;
 
 import com.datastax.driver.mapping.annotations.Column;

http://git-wip-us.apache.org/repos/asf/gora/blob/2695207b/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/compiler/GoraCassandraNativeCompiler.java
----------------------------------------------------------------------
diff --git a/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/compiler/GoraCassandraNativeCompiler.java
b/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/compiler/GoraCassandraNativeCompiler.java
index 6d07759..77d6777 100644
--- a/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/compiler/GoraCassandraNativeCompiler.java
+++ b/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/compiler/GoraCassandraNativeCompiler.java
@@ -80,6 +80,16 @@ public class GoraCassandraNativeCompiler {
     return mappings;
   }
 
+  /**
+   * Returns the string received with the first letter in uppercase
+   *
+   * @param name to be converted
+   * @return camelCase String
+   */
+  static String cap(String name) {
+    return name.substring(0, 1).toUpperCase(Locale.getDefault())
+            + name.substring(1, name.length());
+  }
 
   /**
    * Method in charge of compiling a specific table using a key schema and a set
@@ -120,7 +130,6 @@ public class GoraCassandraNativeCompiler {
     }
   }
 
-
   /**
    * Sets the necessary imports for the generated java class to work
    *
@@ -150,7 +159,6 @@ public class GoraCassandraNativeCompiler {
     line(0, "import com.datastax.driver.mapping.annotations.Transient;");
   }
 
-
   /**
    * Starts the java generated class file
    *
@@ -171,7 +179,7 @@ public class GoraCassandraNativeCompiler {
   /**
    * Creates default methods inherited from upper classes
    *
-   * @param pIden   of spaces used for indentation
+   * @param pIden     of spaces used for indentation
    * @param className class Name
    * @throws IOException
    */
@@ -217,7 +225,6 @@ public class GoraCassandraNativeCompiler {
     line(pIden, "public Persistent newInstance() { return new " + className + "(); }");
   }
 
-
   private void processFields(Field field) throws IOException {
     String fieldName = field.getFieldName();
     String columnName = field.getColumnName();
@@ -295,7 +302,6 @@ public class GoraCassandraNativeCompiler {
     throw new RuntimeException("Invalid Cassandra DataType");
   }
 
-
   /**
    * Writes a line within the output stream
    *
@@ -310,15 +316,4 @@ public class GoraCassandraNativeCompiler {
     out.append(text);
     out.append("\n");
   }
-
-  /**
-   * Returns the string received with the first letter in uppercase
-   *
-   * @param name to be converted
-   * @return camelCase String
-   */
-  static String cap(String name) {
-    return name.substring(0, 1).toUpperCase(Locale.getDefault())
-            + name.substring(1, name.length());
-  }
 }

http://git-wip-us.apache.org/repos/asf/gora/blob/2695207b/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/serializers/AvroSerializer.java
----------------------------------------------------------------------
diff --git a/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/serializers/AvroSerializer.java
b/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/serializers/AvroSerializer.java
index f9095dd..a04974f 100644
--- a/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/serializers/AvroSerializer.java
+++ b/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/serializers/AvroSerializer.java
@@ -40,16 +40,10 @@ import org.apache.gora.store.DataStore;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.net.InetAddress;
-import java.nio.ByteBuffer;
 import java.util.ArrayList;
-import java.util.Date;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.UUID;
 
 /**
  * This class contains the operations relates to Avro Serialization.

http://git-wip-us.apache.org/repos/asf/gora/blob/2695207b/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/serializers/CassandraQueryFactory.java
----------------------------------------------------------------------
diff --git a/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/serializers/CassandraQueryFactory.java
b/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/serializers/CassandraQueryFactory.java
index 184955c..af53d2a 100644
--- a/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/serializers/CassandraQueryFactory.java
+++ b/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/serializers/CassandraQueryFactory.java
@@ -78,7 +78,6 @@ class CassandraQueryFactory {
         stringBuffer.append(" }");
         break;
     }
-
     if (keySpace.isDurableWritesEnabled()) {
       stringBuffer.append(" AND DURABLE_WRITES = ").append(keySpace.isDurableWritesEnabled());
     }
@@ -727,7 +726,7 @@ class CassandraQueryFactory {
           if (isCommaNeeded) {
             stringBuffer.append(", ");
           }
-          if(!fieldAnnotation.name().isEmpty()) {
+          if (!fieldAnnotation.name().isEmpty()) {
             stringBuffer.append(fieldAnnotation.name()).append(" ");
           } else {
             stringBuffer.append(udtField.getName()).append(" ");
@@ -766,7 +765,7 @@ class CassandraQueryFactory {
       dataType = "int";
     } else if (s.equals("double") || s.equals("java.lang.Double")) {
       dataType = "double";
-    }  else if (s.equals("float") || s.equals("java.lang.Float")) {
+    } else if (s.equals("float") || s.equals("java.lang.Float")) {
       dataType = "float";
     } else if (s.equals("boolean") || s.equals("java.lang.Boolean")) {
       dataType = "boolean";
@@ -774,15 +773,15 @@ class CassandraQueryFactory {
       dataType = "uuid";
     } else if (s.equals("java.lang.Long")) {
       dataType = "bigint";
-    }else if (s.equals("java.math.BigDecimal")) {
+    } else if (s.equals("java.math.BigDecimal")) {
       dataType = "decimal";
-    }else if (s.equals("java.net.InetAddress")) {
+    } else if (s.equals("java.net.InetAddress")) {
       dataType = "inet";
-    }else if (s.equals("java.math.BigInteger")) {
+    } else if (s.equals("java.math.BigInteger")) {
       dataType = "varint";
     } else if (s.equals("java.nio.ByteBuffer")) {
       dataType = "blob";
-    }else if (s.contains("Map")) {
+    } else if (s.contains("Map")) {
       ParameterizedType mapType;
       if (field != null) {
         mapType = (ParameterizedType) field.getGenericType();
@@ -791,7 +790,7 @@ class CassandraQueryFactory {
       }
       Type value1 = mapType.getActualTypeArguments()[0];
       Type value2 = mapType.getActualTypeArguments()[1];
-      dataType = "map<" +dataType(null, value1) + "," + dataType(null, value2) + ">";
+      dataType = "map<" + dataType(null, value1) + "," + dataType(null, value2) + ">";
     } else if (s.contains("List")) {
       ParameterizedType listType;
       if (field != null) {

http://git-wip-us.apache.org/repos/asf/gora/blob/2695207b/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/serializers/CassandraSerializer.java
----------------------------------------------------------------------
diff --git a/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/serializers/CassandraSerializer.java
b/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/serializers/CassandraSerializer.java
index 651dfdb..6871b6c 100644
--- a/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/serializers/CassandraSerializer.java
+++ b/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/serializers/CassandraSerializer.java
@@ -47,12 +47,10 @@ public abstract class CassandraSerializer<K, T extends Persistent>
{
   protected Class<K> keyClass;
 
   protected Class<T> persistentClass;
-
-  private Map<String, String> userDefineTypeMaps;
-
   protected CassandraMapping mapping;
-  private Schema persistentSchema;
   CassandraClient client;
+  private Map<String, String> userDefineTypeMaps;
+  private Schema persistentSchema;
 
   CassandraSerializer(CassandraClient cc, Class<K> keyClass, Class<T> persistantClass,
CassandraMapping mapping, Schema schema) {
     this.keyClass = keyClass;
@@ -120,7 +118,6 @@ public abstract class CassandraSerializer<K, T extends Persistent>
{
         }
       }
     }
-
   }
 
 

http://git-wip-us.apache.org/repos/asf/gora/blob/2695207b/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/serializers/NativeSerializer.java
----------------------------------------------------------------------
diff --git a/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/serializers/NativeSerializer.java
b/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/serializers/NativeSerializer.java
index abff409..f98c910 100644
--- a/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/serializers/NativeSerializer.java
+++ b/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/serializers/NativeSerializer.java
@@ -48,7 +48,7 @@ class NativeSerializer<K, T extends Persistent> extends CassandraSerializer
{
   private Mapper<T> mapper;
 
   NativeSerializer(CassandraClient cassandraClient, Class<K> keyClass, Class<T>
persistentClass, CassandraMapping mapping, Schema schema) {
-      super(cassandraClient, keyClass, persistentClass, mapping, schema);
+    super(cassandraClient, keyClass, persistentClass, mapping, schema);
     this.createSchema();
     MappingManager mappingManager = new MappingManager(cassandraClient.getSession());
     mapper = mappingManager.mapper(persistentClass);

http://git-wip-us.apache.org/repos/asf/gora/blob/2695207b/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/store/CassandraMappingBuilder.java
----------------------------------------------------------------------
diff --git a/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/store/CassandraMappingBuilder.java
b/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/store/CassandraMappingBuilder.java
index a25db6e..fa988d9 100644
--- a/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/store/CassandraMappingBuilder.java
+++ b/gora-cassandra-cql/src/main/java/org/apache/gora/cassandra/store/CassandraMappingBuilder.java
@@ -46,8 +46,28 @@ public class CassandraMappingBuilder<K, T extends Persistent> {
 
   private CassandraStore dataStore;
 
+  public CassandraMappingBuilder() {
+  }
+
   /**
+   * Constructor for builder to create the mapper.
    *
+   * @param store Cassandra Store
+   */
+  CassandraMappingBuilder(final CassandraStore<K, T> store) {
+    this.dataStore = store;
+  }
+
+  private static int getReplicationFactor(Element element) {
+    String value = element.getAttributeValue("replication_factor");
+    if (value == null) {
+      return 1;
+    } else {
+      return Integer.parseInt(value);
+    }
+  }
+
+  /**
    * @param fileName mapping fileName
    * @return All the Cassandra Mappings in the mapping file
    * @throws Exception
@@ -87,19 +107,6 @@ public class CassandraMappingBuilder<K, T extends Persistent> {
     return mappings;
   }
 
-
-  public CassandraMappingBuilder() {
-  }
-
-  /**
-   * Constructor for builder to create the mapper.
-   *
-   * @param store Cassandra Store
-   */
-  CassandraMappingBuilder(final CassandraStore<K, T> store) {
-    this.dataStore = store;
-  }
-
   /**
    * In this method we reads the mapping file and creates the Cassandra Mapping.
    *
@@ -153,19 +160,17 @@ public class CassandraMappingBuilder<K, T extends Persistent>
{
     } else {
       throw new RuntimeException("Couldn't find KeySpace in the Cassandra mapping. Please
configure the cassandra mapping correctly.");
     }
-
     for (Element key : keys) {
       if (keyClass.getName().equals(key.getAttributeValue("name"))) {
         processCassandraKeys(cassandraMapping, key, keyClass.getName());
         break;
       }
     }
-
     cassandraMapping.finalized();
     return cassandraMapping;
   }
 
-  private void  processClass(CassandraMapping cassandraMapping, Element classElement) {
+  private void processClass(CassandraMapping cassandraMapping, Element classElement) {
     String tableName = classElement.getAttributeValue("table");
     cassandraMapping.setCoreName(tableName);
 
@@ -188,7 +193,6 @@ public class CassandraMappingBuilder<K, T extends Persistent> {
     }
   }
 
-
   private void processKeySpace(CassandraMapping cassandraMapping, Element keyspaceElement,
String keyspaceName) {
     KeySpace keyspace = new KeySpace();
     List fieldAttributes = keyspaceElement.getAttributes();
@@ -307,14 +311,4 @@ public class CassandraMappingBuilder<K, T extends Persistent> {
       }
     }
   }
-
-  private static int getReplicationFactor(Element element) {
-    String value = element.getAttributeValue("replication_factor");
-    if (value == null) {
-      return 1;
-    } else {
-      return Integer.parseInt(value);
-    }
-  }
-
 }

http://git-wip-us.apache.org/repos/asf/gora/blob/2695207b/gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestAvroSerializationWithUDT.java
----------------------------------------------------------------------
diff --git a/gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestAvroSerializationWithUDT.java
b/gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestAvroSerializationWithUDT.java
index 8dfae6b..e37bf43 100644
--- a/gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestAvroSerializationWithUDT.java
+++ b/gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestAvroSerializationWithUDT.java
@@ -82,9 +82,9 @@ public class TestAvroSerializationWithUDT {
     webpage.setMetadata(metadata);
     webPageCassandraStore.put("yawamu.com", webpage);
     WebPage retrievedWebPage = webPageCassandraStore.get("yawamu.com");
-    Assert.assertEquals(webpage.getMetadata().getVersion(),retrievedWebPage.getMetadata().getVersion());
-    for(Map.Entry entry : webpage.getMetadata().getData().entrySet()) {
-      Assert.assertEquals(entry.getValue(),retrievedWebPage.getMetadata().getData().get(entry.getKey()));
+    Assert.assertEquals(webpage.getMetadata().getVersion(), retrievedWebPage.getMetadata().getVersion());
+    for (Map.Entry entry : webpage.getMetadata().getData().entrySet()) {
+      Assert.assertEquals(entry.getValue(), retrievedWebPage.getMetadata().getData().get(entry.getKey()));
     }
   }
 

http://git-wip-us.apache.org/repos/asf/gora/blob/2695207b/gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestCassandraStore.java
----------------------------------------------------------------------
diff --git a/gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestCassandraStore.java
b/gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestCassandraStore.java
index a626a91..958629a 100644
--- a/gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestCassandraStore.java
+++ b/gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestCassandraStore.java
@@ -38,6 +38,10 @@
  * Testing class for all standard gora-cassandra functionality.
  * We extend DataStoreTestBase enabling us to run the entire base test
  * suite for Gora.
+ * <p>
+ * Testing class for all standard gora-cassandra functionality.
+ * We extend DataStoreTestBase enabling us to run the entire base test
+ * suite for Gora.
  */
 
 /**

http://git-wip-us.apache.org/repos/asf/gora/blob/2695207b/gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestCassandraStoreWithCassandraKey.java
----------------------------------------------------------------------
diff --git a/gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestCassandraStoreWithCassandraKey.java
b/gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestCassandraStoreWithCassandraKey.java
index 302b0d5..3ae3152 100644
--- a/gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestCassandraStoreWithCassandraKey.java
+++ b/gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestCassandraStoreWithCassandraKey.java
@@ -290,7 +290,7 @@ public class TestCassandraStoreWithCassandraKey {
     strings.add(new Utf8("Hello World"));
     strings.add(new Utf8("Srilanka"));
     record.setArrayString(strings);
-    HashMap<CharSequence, Double > map = new HashMap<>();
+    HashMap<CharSequence, Double> map = new HashMap<>();
     map.put(new Utf8("Life"), 7.3D);
     record.setMapDouble(map);
     CassandraKey key = new CassandraKey();
@@ -303,28 +303,28 @@ public class TestCassandraStoreWithCassandraKey {
     Assert.assertEquals(record.getDataLong(), retrievedRecord.getDataLong());
     Assert.assertEquals(record.getDataBytes(), retrievedRecord.getDataBytes());
     Assert.assertEquals(record.getDataDouble(), retrievedRecord.getDataDouble());
-    int i =0;
-    for(Double obj : retrievedRecord.getArrayDouble()) {
+    int i = 0;
+    for (Double obj : retrievedRecord.getArrayDouble()) {
       Assert.assertEquals(doubles.get(i), obj);
       i++;
     }
     i = 0;
-    for(Integer obj : retrievedRecord.getArrayInt()) {
+    for (Integer obj : retrievedRecord.getArrayInt()) {
       Assert.assertEquals(integers.get(i), obj);
       i++;
     }
     i = 0;
-    for(Long obj : retrievedRecord.getArrayLong()) {
+    for (Long obj : retrievedRecord.getArrayLong()) {
       Assert.assertEquals(longs.get(i), obj);
       i++;
     }
     i = 0;
-    for(CharSequence obj : retrievedRecord.getArrayString()) {
+    for (CharSequence obj : retrievedRecord.getArrayString()) {
       Assert.assertEquals(strings.get(i), obj);
       i++;
     }
 
-    for(Map.Entry entry : map.entrySet()) {
+    for (Map.Entry entry : map.entrySet()) {
       Assert.assertEquals(entry.getValue(), retrievedRecord.getMapDouble().get(entry.getKey()));
     }
   }

http://git-wip-us.apache.org/repos/asf/gora/blob/2695207b/gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestNativeSerializationWithUDT.java
----------------------------------------------------------------------
diff --git a/gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestNativeSerializationWithUDT.java
b/gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestNativeSerializationWithUDT.java
index fbabf6b..8d8ee23 100644
--- a/gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestNativeSerializationWithUDT.java
+++ b/gora-cassandra-cql/src/test/java/org/apache/gora/cassandra/store/TestNativeSerializationWithUDT.java
@@ -18,22 +18,15 @@
 
 package org.apache.gora.cassandra.store;
 
-import org.apache.avro.util.Utf8;
 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.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 TestNativeSerializationWithUDT {
@@ -84,8 +77,8 @@ public class TestNativeSerializationWithUDT {
     document.setCustomer(customer);
     documentCassandraStore.put("yawamu.com", document);
     Document retrievedDocument = documentCassandraStore.get("yawamu.com");
-    Assert.assertEquals(customer.getId(),retrievedDocument.getCustomer().getId());
-    Assert.assertEquals(customer.getName(),retrievedDocument.getCustomer().getName());
+    Assert.assertEquals(customer.getId(), retrievedDocument.getCustomer().getId());
+    Assert.assertEquals(customer.getName(), retrievedDocument.getCustomer().getName());
   }
 
 }


Mime
View raw message