gora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lewi...@apache.org
Subject [3/7] gora git commit: Fix potential bugs and clean code.
Date Sat, 05 Sep 2015 14:47:07 GMT
Fix potential bugs and clean code.


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

Branch: refs/heads/master
Commit: 5389d0b335f078a57bc2d6c7f51f57a0e6def65d
Parents: e5ddb78
Author: Furkan KAMACI <furkankamaci@gmail.com>
Authored: Fri Sep 4 15:31:13 2015 +0300
Committer: Furkan KAMACI <furkankamaci@gmail.com>
Committed: Fri Sep 4 15:31:13 2015 +0300

----------------------------------------------------------------------
 .../java/org/apache/gora/cassandra/store/CassandraClient.java    | 2 +-
 .../src/main/java/org/apache/gora/compiler/GoraCompiler.java     | 4 ++--
 gora-goraci/src/main/resources/gora.properties                   | 2 +-
 gora-solr/src/test/conf/log4j.properties                         | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/gora/blob/5389d0b3/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraClient.java
----------------------------------------------------------------------
diff --git a/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraClient.java
b/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraClient.java
index 4df1aa4..4cca6f0 100644
--- a/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraClient.java
+++ b/gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraClient.java
@@ -312,7 +312,7 @@ public class CassandraClient<K, T extends PersistentBase> {
    */
   public void deleteByKey(K key) {
     Map<String, String> familyMap = this.cassandraMapping.getFamilyMap();
-    deleteColumn(key, familyMap.values().iterator().next().toString(), null);
+    deleteColumn(key, familyMap.values().iterator().next(), null);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/gora/blob/5389d0b3/gora-compiler/src/main/java/org/apache/gora/compiler/GoraCompiler.java
----------------------------------------------------------------------
diff --git a/gora-compiler/src/main/java/org/apache/gora/compiler/GoraCompiler.java b/gora-compiler/src/main/java/org/apache/gora/compiler/GoraCompiler.java
index 7a5fdd3..09cc292 100644
--- a/gora-compiler/src/main/java/org/apache/gora/compiler/GoraCompiler.java
+++ b/gora-compiler/src/main/java/org/apache/gora/compiler/GoraCompiler.java
@@ -111,7 +111,7 @@ public class GoraCompiler extends SpecificCompiler {
   }
 
   public static String generateAppropriateWrapper(Schema schema, Field field) {
-    if (field.name() == "__g__dirty") {
+    if (DIRTY_BYTES_FIELD_NAME.equals(field.name())) {
       return "java.nio.ByteBuffer.wrap(new byte["
         + getNumberOfBytesNeededForDirtyBits(schema) + "])";
     } else {
@@ -176,7 +176,7 @@ public class GoraCompiler extends SpecificCompiler {
   }
 
   public static String generateDefaultValueString(Schema schema, String fieldName) {
-    if (fieldName == "__g__dirty") {
+    if (DIRTY_BYTES_FIELD_NAME.equals(fieldName)) {
       return "java.nio.ByteBuffer.wrap(new byte["
         + getNumberOfBytesNeededForDirtyBits(schema) + "])";
     } else {

http://git-wip-us.apache.org/repos/asf/gora/blob/5389d0b3/gora-goraci/src/main/resources/gora.properties
----------------------------------------------------------------------
diff --git a/gora-goraci/src/main/resources/gora.properties b/gora-goraci/src/main/resources/gora.properties
index bec6623..8d6fbf3 100644
--- a/gora-goraci/src/main/resources/gora.properties
+++ b/gora-goraci/src/main/resources/gora.properties
@@ -52,7 +52,7 @@ gora.datastore.rackspace.imageid=6110edfe-8589-4bb1-aa27-385f12242627
 # * performance2-60 - 60 GB Performance
 # * performance2-90 - 90 GB Performance
 # * performance2-120 - 120 GB Performance
-gora.datastore.rackspace.flavorid=6 
+gora.datastore.rackspace.flavorid=6
 gora.datastore.rackspace.servername=goraci_test_server
 gora.datastore.rackspace.num.servers=20
 # we can optionally upload our own keys for security, otherwise we can have Rackspace

http://git-wip-us.apache.org/repos/asf/gora/blob/5389d0b3/gora-solr/src/test/conf/log4j.properties
----------------------------------------------------------------------
diff --git a/gora-solr/src/test/conf/log4j.properties b/gora-solr/src/test/conf/log4j.properties
index 441fa09..3094e6b 100644
--- a/gora-solr/src/test/conf/log4j.properties
+++ b/gora-solr/src/test/conf/log4j.properties
@@ -25,7 +25,7 @@ log4j.logger.org.apache.hadoop=WARN
 log4j.appender.Console=org.apache.log4j.ConsoleAppender
 log4j.appender.Console.layout=org.apache.log4j.PatternLayout
  
-log4j.appender.Console.layout.ConversionPattern=%d{ISO8601} %x %-5p [%c{3}] [%t] %m%n 
+log4j.appender.Console.layout.ConversionPattern=%d{ISO8601} %x %-5p [%c{3}] [%t] %m%n
  
 ###### File appender definition #######
 log4j.appender.File=org.apache.log4j.DailyRollingFileAppender


Mime
View raw message