diff --git a/spring-datastore-keyvalue-parent/pom.xml b/spring-datastore-keyvalue-parent/pom.xml index 1604f08f6..4ed285ed4 100644 --- a/spring-datastore-keyvalue-parent/pom.xml +++ b/spring-datastore-keyvalue-parent/pom.xml @@ -1,5 +1,6 @@ - 4.0.0 org.springframework.data @@ -17,6 +18,7 @@ 1.6.1 1.8.4 1.5.8 + 0.5-groovy-1.7-SNAPSHOT 3.0.5.RELEASE spring-datastore-keyvalue @@ -100,15 +102,19 @@ spring-site-staging - file:///${java.io.tmpdir}/spring-data/datastore-keyvalue/docs + file:///${java.io.tmpdir}/spring-data/datastore-keyvalue/docs + spring-milestone-staging - file:///${java.io.tmpdir}/spring-data/datastore-keyvalue/milestone + + file:///${java.io.tmpdir}/spring-data/datastore-keyvalue/milestone + spring-snapshot-staging - file:///${java.io.tmpdir}/spring-data/datastore-keyvalue/snapshot + file:///${java.io.tmpdir}/spring-data/datastore-keyvalue/snapshot + @@ -265,7 +271,13 @@ org.spockframework spock-spring - 0.5-groovy-1.7-SNAPSHOT + ${org.spockframework.version} + + + junit + junit-dep + + test @@ -432,6 +444,18 @@ + + org.spockframework + spock-maven + ${org.spockframework.version} + + + + find-specs + + + + @@ -447,6 +471,9 @@ spockframework Spock Framework http://m2repo.spockframework.org/snapshots + + true + @@ -476,6 +503,9 @@ spockframework Spock Framework http://m2repo.spockframework.org/snapshots + + true + diff --git a/spring-datastore-riak/pom.xml b/spring-datastore-riak/pom.xml index 246348fc9..0239d6dc2 100644 --- a/spring-datastore-riak/pom.xml +++ b/spring-datastore-riak/pom.xml @@ -1,4 +1,5 @@ - 4.0.0 @@ -121,6 +122,10 @@ com.springsource.bundlor com.springsource.bundlor.maven + + org.spockframework + spock-maven + diff --git a/spring-datastore-riak/src/main/java/org/springframework/datastore/riak/core/BucketSchema.java b/spring-datastore-riak/src/main/java/org/springframework/datastore/riak/core/BucketSchema.java deleted file mode 100644 index 0ac26fe79..000000000 --- a/spring-datastore-riak/src/main/java/org/springframework/datastore/riak/core/BucketSchema.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.springframework.datastore.riak.core; - -/** - * @author J. Brisbin - */ -public interface BucketSchema { - - String getName(); - -} diff --git a/spring-datastore-riak/src/main/java/org/springframework/datastore/riak/core/KeyValueStoreKey.java b/spring-datastore-riak/src/main/java/org/springframework/datastore/riak/core/KeyValueStoreKey.java deleted file mode 100644 index 77b27cd09..000000000 --- a/spring-datastore-riak/src/main/java/org/springframework/datastore/riak/core/KeyValueStoreKey.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2010 by J. Brisbin - * - * Licensed 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. - */ - -package org.springframework.datastore.riak.core; - -/** - * @author J. Brisbin - */ -public class KeyValueStoreKey { - - protected Object family; - protected Object key; - - public KeyValueStoreKey() { - } - - public KeyValueStoreKey(Object family, Object key) { - this.family = family; - this.key = key; - } - - public Object getFamily() { - return family; - } - - public void setFamily(Object family) { - this.family = family; - } - - public Object getKey() { - return key; - } - - public void setKey(Object key) { - this.key = key; - } - - @Override - public String toString() { - if (null == family && null == key) { - return super.toString(); - } else { - return (null != family ? family.toString() : "") + ":" + (null != key ? key.toString() : ""); - } - } -} diff --git a/spring-datastore-riak/src/main/java/org/springframework/datastore/riak/core/RiakOperationCallback.java b/spring-datastore-riak/src/main/java/org/springframework/datastore/riak/core/RiakOperationCallback.java deleted file mode 100644 index a0f1d6883..000000000 --- a/spring-datastore-riak/src/main/java/org/springframework/datastore/riak/core/RiakOperationCallback.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2010 by J. Brisbin - * - * Licensed 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. - */ - -package org.springframework.datastore.riak.core; - -import org.springframework.datastore.riak.DataStoreOperationException; - -/** - * @author J. Brisbin - */ -public interface RiakOperationCallback { - - public OUT execute(IN in) throws DataStoreOperationException; - -} diff --git a/spring-datastore-riak/src/main/java/org/springframework/datastore/riak/core/RiakTemplate.java b/spring-datastore-riak/src/main/java/org/springframework/datastore/riak/core/RiakTemplate.java index c812cdc7d..e5ff6c24f 100644 --- a/spring-datastore-riak/src/main/java/org/springframework/datastore/riak/core/RiakTemplate.java +++ b/spring-datastore-riak/src/main/java/org/springframework/datastore/riak/core/RiakTemplate.java @@ -691,7 +691,6 @@ public class RiakTemplate extends RestGatewaySupport implements KeyValueStoreOpe } } - /*----------------- Utilities -----------------*/ protected BucketKeyPair resolveBucketKeyPair(Object key, Object val) { diff --git a/spring-datastore-riak/src/test/groovy/org/springframework/datastore/riak/core/RiakTemplateSpec.groovy b/spring-datastore-riak/src/test/groovy/org/springframework/datastore/riak/core/RiakTemplateSpec.groovy index 025142072..b309851f5 100644 --- a/spring-datastore-riak/src/test/groovy/org/springframework/datastore/riak/core/RiakTemplateSpec.groovy +++ b/spring-datastore-riak/src/test/groovy/org/springframework/datastore/riak/core/RiakTemplateSpec.groovy @@ -160,18 +160,18 @@ class RiakTemplateSpec extends Specification { given: MapReduceJob job = riak.createMapReduceJob() - def mapJs = new JavascriptMapReduceOperation("function(m){ var o=Riak.mapValuesJson(m); return [1]; }") + def mapJs = new JavascriptMapReduceOperation("function(v){ var o=Riak.mapValuesJson(v); return [o[0].integer]; }") def mapPhase = new RiakMapReducePhase("map", "javascript", mapJs) - def reduceJs = new JavascriptMapReduceOperation("function(r){ return r.length; }") + def reduceJs = new JavascriptMapReduceOperation("function(v){ return v.length; }") def reducePhase = new RiakMapReducePhase("reduce", "javascript", reduceJs) - reducePhase.keepResults = true job.addInputs(["test"]). addPhase(mapPhase). addPhase(reducePhase) when: + println "M/R: ${job.toJson()}" def result = riak.execute(job, Integer) then: