usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mru...@apache.org
Subject usergrid git commit: Fix issue with map serialization schema with CQL conversion.
Date Wed, 07 Sep 2016 15:43:56 GMT
Repository: usergrid
Updated Branches:
  refs/heads/feature-flags ad0494a41 -> 244b16ae1


Fix issue with map serialization schema with CQL conversion.


Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/244b16ae
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/244b16ae
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/244b16ae

Branch: refs/heads/feature-flags
Commit: 244b16ae11eb221adaaeaec8641385c4014fee0a
Parents: ad0494a
Author: Michael Russo <mrusso@apigee.com>
Authored: Wed Sep 7 08:43:22 2016 -0700
Committer: Michael Russo <mrusso@apigee.com>
Committed: Wed Sep 7 08:43:22 2016 -0700

----------------------------------------------------------------------
 .../corepersistence/pipeline/builder/IdBuilder.java     |  6 ------
 .../pipeline/builder/PipelineBuilder.java               |  2 +-
 .../persistence/map/impl/MapSerializationImpl.java      | 12 ++++++------
 3 files changed, 7 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/usergrid/blob/244b16ae/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/builder/IdBuilder.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/builder/IdBuilder.java
b/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/builder/IdBuilder.java
index d81bd24..c2a1826 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/builder/IdBuilder.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/builder/IdBuilder.java
@@ -55,12 +55,6 @@ public class IdBuilder {
         this.searchFilterFactory = searchFilterFactory;
     }
 
-    public IdBuilder( final Pipeline<FilterResult<Id>> pipeline, final FilterFactory
filterFactory ) {
-        this.pipeline = pipeline;
-        this.filterFactory = filterFactory;
-        this.searchFilterFactory = null;
-    }
-
 
 
     /**

http://git-wip-us.apache.org/repos/asf/usergrid/blob/244b16ae/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/builder/PipelineBuilder.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/builder/PipelineBuilder.java
b/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/builder/PipelineBuilder.java
index 14c94a2..f3a3523 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/builder/PipelineBuilder.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/pipeline/builder/PipelineBuilder.java
@@ -106,7 +106,7 @@ public class PipelineBuilder {
     public IdBuilder fromId(final Id entityId){
         Pipeline<FilterResult<Id>> pipeline =  new Pipeline( applicationScope,
this.cursor,limit ).withFilter(  filterFactory.getEntityIdFilter( entityId ) );
 
-        return new IdBuilder( pipeline, filterFactory );
+        return new IdBuilder( pipeline, filterFactory, searchFilterFactory );
     }
 
 

http://git-wip-us.apache.org/repos/asf/usergrid/blob/244b16ae/stack/corepersistence/map/src/main/java/org/apache/usergrid/persistence/map/impl/MapSerializationImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/map/src/main/java/org/apache/usergrid/persistence/map/impl/MapSerializationImpl.java
b/stack/corepersistence/map/src/main/java/org/apache/usergrid/persistence/map/impl/MapSerializationImpl.java
index 2c77ebf64..aa938b5 100644
--- a/stack/corepersistence/map/src/main/java/org/apache/usergrid/persistence/map/impl/MapSerializationImpl.java
+++ b/stack/corepersistence/map/src/main/java/org/apache/usergrid/persistence/map/impl/MapSerializationImpl.java
@@ -67,7 +67,7 @@ public class MapSerializationImpl implements MapSerialization {
     private static final Map<String, DataType.Name> MAP_KEYS_COLUMNS =
         new HashMap<String, DataType.Name>() {{
             put( "key", DataType.Name.BLOB );
-            put( "column1", DataType.Name.BLOB );
+            put( "column1", DataType.Name.TEXT );
             put( "value", DataType.Name.BLOB ); }};
     private static final Map<String, String> MAP_KEYS_CLUSTERING_ORDER =
         new HashMap<String, String>(){{ put( "column1", "ASC" ); }};
@@ -169,7 +169,7 @@ public class MapSerializationImpl implements MapSerialization {
             mapKey = QueryBuilder.insertInto(MAP_KEYS_TABLE)
                 .using(timeToLive)
                 .value("key", getMapKeyPartitionKey(scope, bucket))
-                .value("column1", DataType.text().serialize(key, ProtocolVersion.NEWEST_SUPPORTED))
+                .value("column1", key)
                 .value("value", DataType.cboolean().serialize(true, ProtocolVersion.NEWEST_SUPPORTED));
         }else{
 
@@ -183,7 +183,7 @@ public class MapSerializationImpl implements MapSerialization {
 
             mapKey = QueryBuilder.insertInto(MAP_KEYS_TABLE)
                 .value("key", getMapKeyPartitionKey(scope, bucket))
-                .value("column1", DataType.text().serialize(key, ProtocolVersion.NEWEST_SUPPORTED))
+                .value("column1", key)
                 .value("value", DataType.cboolean().serialize(true, ProtocolVersion.NEWEST_SUPPORTED));
 
         }
@@ -223,7 +223,7 @@ public class MapSerializationImpl implements MapSerialization {
         Statement mapKey;
         mapKey = QueryBuilder.insertInto(MAP_KEYS_TABLE)
             .value("key", getMapKeyPartitionKey(scope, bucket))
-            .value("column1", DataType.text().serialize(key, ProtocolVersion.NEWEST_SUPPORTED))
+            .value("column1", key)
             .value("value", DataType.serializeValue(null, ProtocolVersion.NEWEST_SUPPORTED));
 
         session.execute(mapKey);
@@ -260,7 +260,7 @@ public class MapSerializationImpl implements MapSerialization {
         Statement mapKey;
         mapKey = QueryBuilder.insertInto(MAP_KEYS_TABLE)
             .value("key", getMapKeyPartitionKey(scope, bucket))
-            .value("column1", DataType.text().serialize(key, ProtocolVersion.NEWEST_SUPPORTED))
+            .value("column1", key)
             .value("value", DataType.cboolean().serialize(true, ProtocolVersion.NEWEST_SUPPORTED));
 
         session.execute(mapKey);
@@ -357,7 +357,7 @@ public class MapSerializationImpl implements MapSerialization {
         while( resultIterator.hasNext() && size < limit){
 
             size++;
-            keys.add((String)DataType.text().deserialize(resultIterator.next().getBytes("column1"),
ProtocolVersion.NEWEST_SUPPORTED));
+            keys.add(resultIterator.next().getString("column1"));
 
         }
 


Mime
View raw message