You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2015/10/30 20:04:48 UTC
[29/50] [abbrv] usergrid git commit: Switch to string serializer
instead of Smile.
Switch to string serializer instead of Smile.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/876b1eeb
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/876b1eeb
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/876b1eeb
Branch: refs/heads/asf-site
Commit: 876b1eebbeec05e2a0afa0adc359b60da2e57594
Parents: 2fdf664
Author: Dave Johnson <sn...@apache.org>
Authored: Wed Oct 21 10:02:35 2015 -0400
Committer: Dave Johnson <sn...@apache.org>
Committed: Wed Oct 21 10:02:35 2015 -0400
----------------------------------------------------------------------
.../impl/ScopedCacheSerializationImpl.java | 77 +-------------------
1 file changed, 1 insertion(+), 76 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/876b1eeb/stack/corepersistence/cache/src/main/java/org/apache/usergrid/persistence/cache/impl/ScopedCacheSerializationImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/cache/src/main/java/org/apache/usergrid/persistence/cache/impl/ScopedCacheSerializationImpl.java b/stack/corepersistence/cache/src/main/java/org/apache/usergrid/persistence/cache/impl/ScopedCacheSerializationImpl.java
index c11d62f..1439bc5 100644
--- a/stack/corepersistence/cache/src/main/java/org/apache/usergrid/persistence/cache/impl/ScopedCacheSerializationImpl.java
+++ b/stack/corepersistence/cache/src/main/java/org/apache/usergrid/persistence/cache/impl/ScopedCacheSerializationImpl.java
@@ -21,12 +21,10 @@ import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.dataformat.smile.SmileFactory;
import com.google.common.base.Preconditions;
import com.google.common.hash.Funnel;
import com.google.common.hash.PrimitiveSink;
import com.google.inject.Inject;
-import com.netflix.astyanax.ColumnListMutation;
import com.netflix.astyanax.Keyspace;
import com.netflix.astyanax.MutationBatch;
import com.netflix.astyanax.Serializer;
@@ -97,9 +95,7 @@ public class ScopedCacheSerializationImpl<K,V> implements ScopedCacheSerializati
private final Keyspace keyspace;
- private final SmileFactory SMILE_FACTORY = new SmileFactory();
-
- private final ObjectMapper MAPPER = new ObjectMapper( SMILE_FACTORY );
+ private final ObjectMapper MAPPER = new ObjectMapper();
//------------------------------------------------------------------------------------------
@@ -294,27 +290,6 @@ public class ScopedCacheSerializationImpl<K,V> implements ScopedCacheSerializati
}
- //------------------------------------------------------------------------------------------
-
-// /**
-// * Entries for serializing cache entries keys to a row
-// */
-// private static class CacheKey {
-// public final String key;
-//
-// private CacheKey( final String key ) {
-// this.key = key;
-// }
-//
-// /**
-// * Create a scoped row key from the key
-// */
-// public static ScopedRowKey<CacheKey> fromKey(
-// final CacheScope cacheScope, final String key ) {
-// return ScopedRowKey.fromKey( cacheScope.getApplication(), new CacheKey( key ) );
-// }
-// }
-
/**
* Inner class to serialize cache key
*/
@@ -332,54 +307,4 @@ public class ScopedCacheSerializationImpl<K,V> implements ScopedCacheSerializati
}
}
-
-// /**
-// * Inner class to serialize cache value
-// */
-// private static class CacheEntitySerializer implements CompositeFieldSerializer {
-//
-// @Override
-// public void toComposite(CompositeBuilder builder, Object value) {
-//
-// }
-//
-// @Override
-// public Object fromComposite( final CompositeParser composite ) {
-// return null;
-// }
-// }
-
-
-// /**
-// * Build the results from the row keys
-// */
-// private static interface ResultsBuilder<T> {
-//
-// public T buildResults(final Rows<ScopedRowKey<CacheKey>, Boolean> rows);
-// }
-//
-// public static class StringResultsBuilder implements ResultsBuilder<Map<String, String>>{
-//
-// @Override
-// public Map<String, String> buildResults( final Rows<ScopedRowKey<CacheKey>, Boolean> rows ) {
-// final int size = rows.size();
-//
-// final Map<String, String> results = new HashMap<>(size);
-//
-// for(int i = 0; i < size; i ++){
-//
-// final Row<ScopedRowKey<CacheKey>, Boolean> row = rows.getRowByIndex( i );
-//
-// final String value = row.getColumns().getStringValue( true, null );
-//
-// if(value == null){
-// continue;
-// }
-//
-// results.put( row.getKey().getKey().key, value );
-// }
-//
-// return results;
-// }
-// }
}