Author: olamy
Date: Wed Feb 22 00:06:44 2012
New Revision: 1292088

URL: http://svn.apache.org/viewvc?rev=1292088&view=rev
Log:
fix solr test (serializer is now configurable)
using annoation didn't work for Service so add files manually ?
make StandardSerializer visible users must be able to choose it using 
StandardSerializer.class.getName()

Added:
    incubator/directmemory/trunk/directmemory-cache/src/main/resources/
    incubator/directmemory/trunk/directmemory-cache/src/main/resources/META-INF/
    
incubator/directmemory/trunk/directmemory-cache/src/main/resources/META-INF/services/
    
incubator/directmemory/trunk/directmemory-cache/src/main/resources/META-INF/services/org.apache.directmemory.serialization.Serializer
    
incubator/directmemory/trunk/integrations/solr/src/test/resources/logback-test.xml
   (with props)
    incubator/directmemory/trunk/serializers/msgpack/src/main/resources/
    
incubator/directmemory/trunk/serializers/msgpack/src/main/resources/META-INF/
    
incubator/directmemory/trunk/serializers/msgpack/src/main/resources/META-INF/services/
    
incubator/directmemory/trunk/serializers/msgpack/src/main/resources/META-INF/services/org.apache.directmemory.serialization.Serializer
    incubator/directmemory/trunk/serializers/protobuf/src/main/resources/
    
incubator/directmemory/trunk/serializers/protobuf/src/main/resources/META-INF/
    
incubator/directmemory/trunk/serializers/protobuf/src/main/resources/META-INF/services/
    
incubator/directmemory/trunk/serializers/protobuf/src/main/resources/META-INF/services/org.apache.directmemory.serialization.Serializer
Modified:
    
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/cache/Cache.java
    
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/cache/CacheService.java
    
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/cache/CacheServiceImpl.java
    
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/serialization/StandardSerializer.java
    incubator/directmemory/trunk/integrations/pom.xml
    incubator/directmemory/trunk/integrations/solr/pom.xml
    
incubator/directmemory/trunk/integrations/solr/src/main/java/org/apache/directmemory/examples/solr/SolrOffHeapCache.java
    
incubator/directmemory/trunk/integrations/solr/src/test/java/org/apache/directmemory/examples/solr/SolrOffHeapCacheTest.java
    
incubator/directmemory/trunk/integrations/solr/src/test/java/org/apache/directmemory/examples/solr/SolrOffHeapIntegrationTest.java
    
incubator/directmemory/trunk/integrations/solr/src/test/resources/solr/config/solrconfig.xml
    
incubator/directmemory/trunk/serializers/msgpack/src/main/java/org/apache/directmemory/serialization/msgpack/MessagePackSerializer.java
    
incubator/directmemory/trunk/serializers/protobuf/src/main/java/org/apache/directmemory/serialization/protobuf/ProtobufSerializer.java

Modified: 
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/cache/Cache.java
URL: 
http://svn.apache.org/viewvc/incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/cache/Cache.java?rev=1292088&r1=1292087&r2=1292088&view=diff
==============================================================================
--- 
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/cache/Cache.java
 (original)
+++ 
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/cache/Cache.java
 Wed Feb 22 00:06:44 2012
@@ -27,7 +27,10 @@ import org.apache.directmemory.serializa
 public class Cache
 {
 
-    private static CacheService cacheService = new CacheServiceImpl( 
getMemoryManager() );
+    private static CacheService cacheService = new CacheServiceImpl();
+
+    // olamy chicken and eggs isssue
+    // private static CacheService cacheService = new CacheServiceImpl( 
getMemoryManager());
 
     private Cache()
     {

Modified: 
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/cache/CacheService.java
URL: 
http://svn.apache.org/viewvc/incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/cache/CacheService.java?rev=1292088&r1=1292087&r2=1292088&view=diff
==============================================================================
--- 
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/cache/CacheService.java
 (original)
+++ 
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/cache/CacheService.java
 Wed Feb 22 00:06:44 2012
@@ -82,6 +82,8 @@ public interface CacheService
 
     void setMemoryManager( MemoryManagerService memoryManager );
 
+    void setSerializer( Serializer serializer );
+
     Pointer allocate( String key, int size );
 
 }

Modified: 
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/cache/CacheServiceImpl.java
URL: 
http://svn.apache.org/viewvc/incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/cache/CacheServiceImpl.java?rev=1292088&r1=1292087&r2=1292088&view=diff
==============================================================================
--- 
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/cache/CacheServiceImpl.java
 (original)
+++ 
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/cache/CacheServiceImpl.java
 Wed Feb 22 00:06:44 2012
@@ -140,7 +140,15 @@ public class CacheServiceImpl
         }
         catch ( IOException e )
         {
-            logger.error( e.getMessage() );
+
+            if ( logger.isDebugEnabled() )
+            {
+                logger.debug( "IOException put object in cache:{}", 
e.getMessage(), e );
+            }
+            else
+            {
+                logger.error( "IOException put object in cache:{}", 
e.getMessage() );
+            }
             return null;
         }
     }

Modified: 
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/serialization/StandardSerializer.java
URL: 
http://svn.apache.org/viewvc/incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/serialization/StandardSerializer.java?rev=1292088&r1=1292087&r2=1292088&view=diff
==============================================================================
--- 
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/serialization/StandardSerializer.java
 (original)
+++ 
incubator/directmemory/trunk/directmemory-cache/src/main/java/org/apache/directmemory/serialization/StandardSerializer.java
 Wed Feb 22 00:06:44 2012
@@ -25,7 +25,7 @@ import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 
-final class StandardSerializer
+public final class StandardSerializer
     implements Serializer
 {
 

Added: 
incubator/directmemory/trunk/directmemory-cache/src/main/resources/META-INF/services/org.apache.directmemory.serialization.Serializer
URL: 
http://svn.apache.org/viewvc/incubator/directmemory/trunk/directmemory-cache/src/main/resources/META-INF/services/org.apache.directmemory.serialization.Serializer?rev=1292088&view=auto
==============================================================================
--- 
incubator/directmemory/trunk/directmemory-cache/src/main/resources/META-INF/services/org.apache.directmemory.serialization.Serializer
 (added)
+++ 
incubator/directmemory/trunk/directmemory-cache/src/main/resources/META-INF/services/org.apache.directmemory.serialization.Serializer
 Wed Feb 22 00:06:44 2012
@@ -0,0 +1,18 @@
+ # 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.
+
+org.apache.directmemory.serialization.StandardSerializer

Modified: incubator/directmemory/trunk/integrations/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/directmemory/trunk/integrations/pom.xml?rev=1292088&r1=1292087&r2=1292088&view=diff
==============================================================================
--- incubator/directmemory/trunk/integrations/pom.xml (original)
+++ incubator/directmemory/trunk/integrations/pom.xml Wed Feb 22 00:06:44 2012
@@ -29,7 +29,6 @@
     <relativePath>../</relativePath>
   </parent>
 
-  <groupId>org.apache.directmemory</groupId>
   <artifactId>directmemory-platforms</artifactId>
   <packaging>pom</packaging>
   <name>Apache DirectMemory :: Integrations</name>
@@ -39,12 +38,14 @@
     <module>solr</module>
   </modules>
 
-  <dependencies>
-    <dependency>
-      <groupId>${project.parent.groupId}</groupId>
-      <artifactId>directmemory-cache</artifactId>
-      <version>${project.parent.version}</version>
-    </dependency>
-  </dependencies>
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>${project.parent.groupId}</groupId>
+        <artifactId>directmemory-cache</artifactId>
+        <version>${project.parent.version}</version>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
 
 </project>

Modified: incubator/directmemory/trunk/integrations/solr/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/directmemory/trunk/integrations/solr/pom.xml?rev=1292088&r1=1292087&r2=1292088&view=diff
==============================================================================
--- incubator/directmemory/trunk/integrations/solr/pom.xml (original)
+++ incubator/directmemory/trunk/integrations/solr/pom.xml Wed Feb 22 00:06:44 
2012
@@ -60,10 +60,16 @@ under the License.
   </build>
 
   <dependencies>
+
+    <dependency>
+      <groupId>org.apache.directmemory</groupId>
+      <artifactId>directmemory-cache</artifactId>
+    </dependency>
+
     <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-simple</artifactId>
-      <version>${slf4j.version}</version>
+      <groupId>org.apache.directmemory</groupId>
+      <artifactId>directmemory-protostuff</artifactId>
+      <version>${project.version}</version>
     </dependency>
 
     <dependency>
@@ -73,6 +79,17 @@ under the License.
     </dependency>
 
     <dependency>
+      <groupId>ch.qos.logback</groupId>
+      <artifactId>logback-core</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>ch.qos.logback</groupId>
+      <artifactId>logback-classic</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <scope>test</scope>

Modified: 
incubator/directmemory/trunk/integrations/solr/src/main/java/org/apache/directmemory/examples/solr/SolrOffHeapCache.java
URL: 
http://svn.apache.org/viewvc/incubator/directmemory/trunk/integrations/solr/src/main/java/org/apache/directmemory/examples/solr/SolrOffHeapCache.java?rev=1292088&r1=1292087&r2=1292088&view=diff
==============================================================================
--- 
incubator/directmemory/trunk/integrations/solr/src/main/java/org/apache/directmemory/examples/solr/SolrOffHeapCache.java
 (original)
+++ 
incubator/directmemory/trunk/integrations/solr/src/main/java/org/apache/directmemory/examples/solr/SolrOffHeapCache.java
 Wed Feb 22 00:06:44 2012
@@ -19,10 +19,12 @@ package org.apache.directmemory.examples
  * under the License.
  */
 
-import org.apache.directmemory.cache.Cache;
 import org.apache.directmemory.cache.CacheService;
+import org.apache.directmemory.cache.CacheServiceImpl;
 import org.apache.directmemory.measures.Monitor;
 import org.apache.directmemory.measures.Ram;
+import org.apache.directmemory.serialization.Serializer;
+import org.apache.directmemory.serialization.SerializerFactory;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.common.util.SimpleOrderedMap;
 import org.apache.solr.core.SolrCore;
@@ -75,22 +77,45 @@ public class SolrOffHeapCache<K, V>
 
     private String description = "DM Cache";
 
+    private static CacheService cacheService = new CacheServiceImpl();
+
+    public static CacheService getCacheService()
+    {
+        return cacheService;
+    }
+
     @Override
     public Object init( Map args, Object persistence, CacheRegenerator 
regenerator )
     {
         Object buffers = args.get( "buffers" );
-        String size = String.valueOf( args.get( "size" ) );
+        String sizeStr = String.valueOf( args.get( "size" ) );
         Integer capacity = Integer.parseInt( String.valueOf( args.get( 
"initialSize" ) ) );
-        Cache.init( buffers != null ? Integer.valueOf( String.valueOf( buffers 
) ) : 1,
-                    Ram.Mb( Double.valueOf( size ) / 512 ), Ram.Mb( 
Double.valueOf( capacity ) / 512 ),
-                    CacheService.DEFAULT_CONCURRENCY_LEVEL );
+
+        int numberOfBuffers = buffers != null ? Integer.valueOf( 
String.valueOf( buffers ) ) : 1,
+            size = Ram.Mb( Double.valueOf( sizeStr ) / 512 ),
+            initialCapacity = Ram.Mb( Double.valueOf( capacity ) / 512 ),
+            concurrencyLevel = CacheService.DEFAULT_CONCURRENCY_LEVEL;
+
+        cacheService = new CacheServiceImpl();
+        //Cache.init( numberOfBuffers, size, initialCapacity, concurrencyLevel 
);
+        cacheService.init( numberOfBuffers, size, initialCapacity, 
concurrencyLevel );
+
+        String serializerClassName = (String) args.get( "serializerClassName" 
);
+        if ( serializerClassName != null )
+        {
+            Serializer serializer = SerializerFactory.createNewSerializer( 
serializerClassName );
+            if ( serializer == null )
+            {
+                serializer = SerializerFactory.createNewSerializer();
+            }
+            cacheService.setSerializer( serializer );
+        }
 
         state = State.CREATED;
         this.regenerator = regenerator;
         name = (String) args.get( "name" );
-        String str = size;
-        final int limit = str == null ? 1024 : Integer.parseInt( str );
-        str = (String) args.get( "initialSize" );
+        final int limit = sizeStr == null ? 1024 : Integer.parseInt( sizeStr );
+        String str = (String) args.get( "initialSize" );
         final int initialSize = Math.min( str == null ? 1024 : 
Integer.parseInt( str ), limit );
         str = (String) args.get( "autowarmCount" );
         autowarmCount = str == null ? 0 : Integer.parseInt( str );
@@ -122,7 +147,7 @@ public class SolrOffHeapCache<K, V>
     @Override
     public int size()
     {
-        return Long.valueOf( Cache.entries() ).intValue();
+        return Long.valueOf( cacheService.entries() ).intValue();
     }
 
     @Override
@@ -136,7 +161,7 @@ public class SolrOffHeapCache<K, V>
             }
 
             inserts++;
-            return (V) Cache.put( String.valueOf( key ), value );
+            return (V) cacheService.put( String.valueOf( key ), value );
         }
     }
 
@@ -145,7 +170,7 @@ public class SolrOffHeapCache<K, V>
     {
         synchronized ( this )
         {
-            V val = (V) Cache.retrieve( String.valueOf( key ) );
+            V val = (V) cacheService.retrieve( String.valueOf( key ) );
             if ( state == State.LIVE )
             {
                 // only increment lookups and hits if we are live.
@@ -166,7 +191,7 @@ public class SolrOffHeapCache<K, V>
     {
         synchronized ( this )
         {
-            Cache.clear();
+            cacheService.clear();
         }
     }
 
@@ -192,7 +217,7 @@ public class SolrOffHeapCache<K, V>
     @Override
     public void close()
     {
-        Cache.dump();
+        cacheService.dump();
         Monitor.dump();
     }
 
@@ -246,7 +271,7 @@ public class SolrOffHeapCache<K, V>
             lst.add( "hitratio", calcHitRatio( lookups, hits ) );
             lst.add( "inserts", inserts );
             lst.add( "evictions", evictions );
-            lst.add( "size", Cache.entries() );
+            lst.add( "size", cacheService.entries() );
         }
 
         lst.add( "warmupTime", warmupTime );

Modified: 
incubator/directmemory/trunk/integrations/solr/src/test/java/org/apache/directmemory/examples/solr/SolrOffHeapCacheTest.java
URL: 
http://svn.apache.org/viewvc/incubator/directmemory/trunk/integrations/solr/src/test/java/org/apache/directmemory/examples/solr/SolrOffHeapCacheTest.java?rev=1292088&r1=1292087&r2=1292088&view=diff
==============================================================================
--- 
incubator/directmemory/trunk/integrations/solr/src/test/java/org/apache/directmemory/examples/solr/SolrOffHeapCacheTest.java
 (original)
+++ 
incubator/directmemory/trunk/integrations/solr/src/test/java/org/apache/directmemory/examples/solr/SolrOffHeapCacheTest.java
 Wed Feb 22 00:06:44 2012
@@ -16,6 +16,7 @@
  */
 package org.apache.directmemory.examples.solr;
 
+import org.apache.directmemory.serialization.StandardSerializer;
 import org.apache.lucene.search.MatchAllDocsQuery;
 import org.apache.lucene.search.Query;
 import org.apache.lucene.search.Sort;
@@ -25,12 +26,15 @@ import org.apache.solr.search.function.D
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Map;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 
 /**
  * Testcase for {@link SolrOffHeapCache}
@@ -38,6 +42,8 @@ import static org.junit.Assert.*;
 public class SolrOffHeapCacheTest
 {
 
+    private Logger log = LoggerFactory.getLogger( getClass() );
+
     private SolrOffHeapCache solrOffHeapCache;
 
     @Before
@@ -47,7 +53,16 @@ public class SolrOffHeapCacheTest
         Map<String, String> args = new HashMap<String, String>();
         args.put( "size", "10000" );
         args.put( "initialSize", "1000" );
-        solrOffHeapCache.init( args, null, null );
+        args.put( "serializerClassName", StandardSerializer.class.getName() );
+        try
+        {
+            solrOffHeapCache.init( args, null, null );
+        }
+        catch ( NoClassDefFoundError e )
+        {
+            log.error( e.getMessage(), e );
+            throw e;
+        }
     }
 
     @After
@@ -59,43 +74,34 @@ public class SolrOffHeapCacheTest
 
     @Test
     public void testStatisticsWhenCacheNotUsedYet()
+        throws Exception
     {
-        try
-        {
-            NamedList stats = solrOffHeapCache.getStatistics();
-            assertNotNull( stats );
-            assertEquals( 0l, stats.get( "lookups" ) );
-            assertEquals( 0l, stats.get( "evictions" ) );
-            assertEquals( 0l, stats.get( "hits" ) );
-            assertEquals( 0l, stats.get( "inserts" ) );
-        }
-        catch ( Exception e )
-        {
-            fail( e.getLocalizedMessage() );
-        }
+
+        NamedList stats = solrOffHeapCache.getStatistics();
+        assertNotNull( stats );
+        assertEquals( 0l, stats.get( "lookups" ) );
+        assertEquals( 0l, stats.get( "evictions" ) );
+        assertEquals( 0l, stats.get( "hits" ) );
+        assertEquals( 0l, stats.get( "inserts" ) );
     }
 
     @Test
     public void testPut()
+        throws Exception
     {
-        try
+
+        QueryResultKey queryResultKey =
+            new QueryResultKey( new MatchAllDocsQuery(), new 
ArrayList<Query>(), new Sort(), 1 );
+        DocValues docValues = new DocValues()
         {
-            QueryResultKey queryResultKey =
-                new QueryResultKey( new MatchAllDocsQuery(), new 
ArrayList<Query>(), new Sort(), 1 );
-            DocValues docValues = new DocValues()
+            @Override
+            public String toString( int doc )
             {
-                @Override
-                public String toString( int doc )
-                {
-                    return doc + "asd";
-                }
-            };
-            solrOffHeapCache.put( queryResultKey, docValues );
-        }
-        catch ( Exception e )
-        {
-            e.printStackTrace();
-            fail( e.getLocalizedMessage() );
-        }
+                return doc + "asd";
+            }
+        };
+
+        solrOffHeapCache.put( queryResultKey, docValues );
+
     }
 }

Modified: 
incubator/directmemory/trunk/integrations/solr/src/test/java/org/apache/directmemory/examples/solr/SolrOffHeapIntegrationTest.java
URL: 
http://svn.apache.org/viewvc/incubator/directmemory/trunk/integrations/solr/src/test/java/org/apache/directmemory/examples/solr/SolrOffHeapIntegrationTest.java?rev=1292088&r1=1292087&r2=1292088&view=diff
==============================================================================
--- 
incubator/directmemory/trunk/integrations/solr/src/test/java/org/apache/directmemory/examples/solr/SolrOffHeapIntegrationTest.java
 (original)
+++ 
incubator/directmemory/trunk/integrations/solr/src/test/java/org/apache/directmemory/examples/solr/SolrOffHeapIntegrationTest.java
 Wed Feb 22 00:06:44 2012
@@ -24,7 +24,6 @@ import org.junit.BeforeClass;
 import org.junit.Test;
 
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
 
 /**
  */
@@ -44,30 +43,26 @@ public class SolrOffHeapIntegrationTest
     @AfterClass
     public static void tearDown()
     {
-        Cache.clear();
+        SolrOffHeapCache.getCacheService().clear();
     }
 
     @Test
     public void testSimpleQuery()
+        throws Exception
     {
-        try
-        {
-            // add a doc to Solr
-            h.validateAddDoc( "id", "1", "text", "something is happening here" 
);
-
-            // make the query
-            LocalSolrQueryRequest request = h.getRequestFactory( "standard", 
0, 10 ).makeRequest( "q", "something" );
-            String response = h.query( "standard", request );
-            assertTrue( response != null );
-            assertTrue( !response.contains( "error" ) );
-
-            // check the cache has been hit
-            assertTrue( Cache.entries() > 0 );
-
-        }
-        catch ( Throwable e )
-        {
-            fail( e.getLocalizedMessage() );
-        }
+
+        // add a doc to Solr
+        h.validateAddDoc( "id", "1", "text", "something is happening here" );
+
+        // make the query
+        LocalSolrQueryRequest request = h.getRequestFactory( "standard", 0, 10 
).makeRequest( "q", "something" );
+        String response = h.query( "standard", request );
+        assertTrue( response != null );
+        assertTrue( !response.contains( "error" ) );
+
+        // check the cache has been hit
+        assertTrue( SolrOffHeapCache.getCacheService().entries() > 0 );
+
+
     }
 }

Added: 
incubator/directmemory/trunk/integrations/solr/src/test/resources/logback-test.xml
URL: 
http://svn.apache.org/viewvc/incubator/directmemory/trunk/integrations/solr/src/test/resources/logback-test.xml?rev=1292088&view=auto
==============================================================================
--- 
incubator/directmemory/trunk/integrations/solr/src/test/resources/logback-test.xml
 (added)
+++ 
incubator/directmemory/trunk/integrations/solr/src/test/resources/logback-test.xml
 Wed Feb 22 00:06:44 2012
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+<configuration>
+
+  <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
+    <encoder>
+      <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %method - %msg%n</pattern>
+    </encoder>
+  </appender>
+
+  <logger name="org.apache.directmemory.cache.CacheServiceImpl" level="DEBUG"/>
+
+  <root level="INFO">
+    <appender-ref ref="CONSOLE"/>
+  </root>
+
+</configuration>
\ No newline at end of file

Propchange: 
incubator/directmemory/trunk/integrations/solr/src/test/resources/logback-test.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
incubator/directmemory/trunk/integrations/solr/src/test/resources/logback-test.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: 
incubator/directmemory/trunk/integrations/solr/src/test/resources/solr/config/solrconfig.xml
URL: 
http://svn.apache.org/viewvc/incubator/directmemory/trunk/integrations/solr/src/test/resources/solr/config/solrconfig.xml?rev=1292088&r1=1292087&r2=1292088&view=diff
==============================================================================
--- 
incubator/directmemory/trunk/integrations/solr/src/test/resources/solr/config/solrconfig.xml
 (original)
+++ 
incubator/directmemory/trunk/integrations/solr/src/test/resources/solr/config/solrconfig.xml
 Wed Feb 22 00:06:44 2012
@@ -361,7 +361,8 @@
       transient, this cache will not be autowarmed.
     -->
     <queryResultCache 
class="org.apache.directmemory.examples.solr.SolrOffHeapCache" size="10000"
-                      initialSize="1000" autowarmCount="0" buffers="2"/>
+                      initialSize="1000" autowarmCount="0" buffers="2"
+                      
serializerClassName="org.apache.directmemory.serialization.protostuff.ProtoStuffWithLinkedBufferSerializer"/>
 
     <!--
       If true, stored fields that are not requested will be loaded

Modified: 
incubator/directmemory/trunk/serializers/msgpack/src/main/java/org/apache/directmemory/serialization/msgpack/MessagePackSerializer.java
URL: 
http://svn.apache.org/viewvc/incubator/directmemory/trunk/serializers/msgpack/src/main/java/org/apache/directmemory/serialization/msgpack/MessagePackSerializer.java?rev=1292088&r1=1292087&r2=1292088&view=diff
==============================================================================
--- 
incubator/directmemory/trunk/serializers/msgpack/src/main/java/org/apache/directmemory/serialization/msgpack/MessagePackSerializer.java
 (original)
+++ 
incubator/directmemory/trunk/serializers/msgpack/src/main/java/org/apache/directmemory/serialization/msgpack/MessagePackSerializer.java
 Wed Feb 22 00:06:44 2012
@@ -26,7 +26,8 @@ import org.kohsuke.MetaInfServices;
 import org.msgpack.MessagePack;
 import org.msgpack.annotation.Message;
 
-@MetaInfServices
+// olamy currently this doesn't work so use manual file
+//@MetaInfServices
 public final class MessagePackSerializer
     implements Serializer
 {

Added: 
incubator/directmemory/trunk/serializers/msgpack/src/main/resources/META-INF/services/org.apache.directmemory.serialization.Serializer
URL: 
http://svn.apache.org/viewvc/incubator/directmemory/trunk/serializers/msgpack/src/main/resources/META-INF/services/org.apache.directmemory.serialization.Serializer?rev=1292088&view=auto
==============================================================================
--- 
incubator/directmemory/trunk/serializers/msgpack/src/main/resources/META-INF/services/org.apache.directmemory.serialization.Serializer
 (added)
+++ 
incubator/directmemory/trunk/serializers/msgpack/src/main/resources/META-INF/services/org.apache.directmemory.serialization.Serializer
 Wed Feb 22 00:06:44 2012
@@ -0,0 +1,18 @@
+ # 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.
+
+org.apache.directmemory.serialization.StandardSerializer

Modified: 
incubator/directmemory/trunk/serializers/protobuf/src/main/java/org/apache/directmemory/serialization/protobuf/ProtobufSerializer.java
URL: 
http://svn.apache.org/viewvc/incubator/directmemory/trunk/serializers/protobuf/src/main/java/org/apache/directmemory/serialization/protobuf/ProtobufSerializer.java?rev=1292088&r1=1292087&r2=1292088&view=diff
==============================================================================
--- 
incubator/directmemory/trunk/serializers/protobuf/src/main/java/org/apache/directmemory/serialization/protobuf/ProtobufSerializer.java
 (original)
+++ 
incubator/directmemory/trunk/serializers/protobuf/src/main/java/org/apache/directmemory/serialization/protobuf/ProtobufSerializer.java
 Wed Feb 22 00:06:44 2012
@@ -31,7 +31,8 @@ import org.kohsuke.MetaInfServices;
 import com.google.protobuf.GeneratedMessage;
 import com.google.protobuf.Message;
 
-@MetaInfServices
+// olamy currently this doesn't work so use manual file
+//@MetaInfServices
 public final class ProtobufSerializer
     implements Serializer
 {

Added: 
incubator/directmemory/trunk/serializers/protobuf/src/main/resources/META-INF/services/org.apache.directmemory.serialization.Serializer
URL: 
http://svn.apache.org/viewvc/incubator/directmemory/trunk/serializers/protobuf/src/main/resources/META-INF/services/org.apache.directmemory.serialization.Serializer?rev=1292088&view=auto
==============================================================================
--- 
incubator/directmemory/trunk/serializers/protobuf/src/main/resources/META-INF/services/org.apache.directmemory.serialization.Serializer
 (added)
+++ 
incubator/directmemory/trunk/serializers/protobuf/src/main/resources/META-INF/services/org.apache.directmemory.serialization.Serializer
 Wed Feb 22 00:06:44 2012
@@ -0,0 +1,18 @@
+ # 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.
+
+org.apache.directmemory.serialization.protobuf.ProtobufSerializer


Reply via email to