Repository: gora
Updated Branches:
  refs/heads/master 64380fd32 -> e9c561e5c


GORA-547 Upgrade Aerospike client to 4.2.2


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

Branch: refs/heads/master
Commit: 6a90102ca121229db1e172fd4f84481117a71dbc
Parents: 446f42e
Author: Kevin Ratnasekera <djkevi...@yahoo.com>
Authored: Wed Nov 21 01:01:57 2018 +0530
Committer: Kevin Ratnasekera <djkevi...@yahoo.com>
Committed: Wed Nov 21 01:01:57 2018 +0530

----------------------------------------------------------------------
 gora-aerospike/pom.xml                                 |  1 -
 .../gora/aerospike/query/AerospikeQueryResult.java     |  5 ++++-
 .../mapreduce/TestAerospikeStoreCountQuery.java        |  2 +-
 .../TestAerospikeStoreMapReduceSerialization.java      |  2 +-
 .../mapreduce/TestAerospikeStoreWordCount.java         |  2 +-
 .../gora/aerospike/store/TestAerospikeStore.java       |  2 +-
 pom.xml                                                | 13 ++++++++++---
 7 files changed, 18 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/gora/blob/6a90102c/gora-aerospike/pom.xml
----------------------------------------------------------------------
diff --git a/gora-aerospike/pom.xml b/gora-aerospike/pom.xml
index 266bb3f..dba032e 100644
--- a/gora-aerospike/pom.xml
+++ b/gora-aerospike/pom.xml
@@ -135,7 +135,6 @@
     <dependency>
       <groupId>com.aerospike</groupId>
       <artifactId>aerospike-client</artifactId>
-      <version>${aerospike.version}</version>
     </dependency>
 
     <dependency>

http://git-wip-us.apache.org/repos/asf/gora/blob/6a90102c/gora-aerospike/src/main/java/org/apache/gora/aerospike/query/AerospikeQueryResult.java
----------------------------------------------------------------------
diff --git 
a/gora-aerospike/src/main/java/org/apache/gora/aerospike/query/AerospikeQueryResult.java
 
b/gora-aerospike/src/main/java/org/apache/gora/aerospike/query/AerospikeQueryResult.java
index beef25d..6977805 100644
--- 
a/gora-aerospike/src/main/java/org/apache/gora/aerospike/query/AerospikeQueryResult.java
+++ 
b/gora-aerospike/src/main/java/org/apache/gora/aerospike/query/AerospikeQueryResult.java
@@ -88,6 +88,9 @@ public class AerospikeQueryResult<K, T extends Persistent> 
extends ResultBase<K,
 
   @Override
   public int size() {
-    return resultRecords.size();
+    // Fix query limit natively from Aerospike client
+    int totalSize = resultRecords.size();
+    int intLimit = (int) this.limit;
+    return intLimit > 0 && totalSize > intLimit ? intLimit : totalSize;
   }
 }

http://git-wip-us.apache.org/repos/asf/gora/blob/6a90102c/gora-aerospike/src/test/java/org/apache/gora/aerospike/mapreduce/TestAerospikeStoreCountQuery.java
----------------------------------------------------------------------
diff --git 
a/gora-aerospike/src/test/java/org/apache/gora/aerospike/mapreduce/TestAerospikeStoreCountQuery.java
 
b/gora-aerospike/src/test/java/org/apache/gora/aerospike/mapreduce/TestAerospikeStoreCountQuery.java
index 51d115e..f710f07 100644
--- 
a/gora-aerospike/src/test/java/org/apache/gora/aerospike/mapreduce/TestAerospikeStoreCountQuery.java
+++ 
b/gora-aerospike/src/test/java/org/apache/gora/aerospike/mapreduce/TestAerospikeStoreCountQuery.java
@@ -35,7 +35,7 @@ import java.time.Duration;
  */
 public class TestAerospikeStoreCountQuery {
 
-  private static final String DOCKER_CONTAINER_NAME = 
"aerospike/aerospike-server:latest";
+  private static final String DOCKER_CONTAINER_NAME = 
"aerospike/aerospike-server:4.3.1.4";
 
   @ClassRule
   public static GenericContainer aerospikeContainer = new 
GenericContainer(DOCKER_CONTAINER_NAME)

http://git-wip-us.apache.org/repos/asf/gora/blob/6a90102c/gora-aerospike/src/test/java/org/apache/gora/aerospike/mapreduce/TestAerospikeStoreMapReduceSerialization.java
----------------------------------------------------------------------
diff --git 
a/gora-aerospike/src/test/java/org/apache/gora/aerospike/mapreduce/TestAerospikeStoreMapReduceSerialization.java
 
b/gora-aerospike/src/test/java/org/apache/gora/aerospike/mapreduce/TestAerospikeStoreMapReduceSerialization.java
index 276aefd..a2cc51c 100644
--- 
a/gora-aerospike/src/test/java/org/apache/gora/aerospike/mapreduce/TestAerospikeStoreMapReduceSerialization.java
+++ 
b/gora-aerospike/src/test/java/org/apache/gora/aerospike/mapreduce/TestAerospikeStoreMapReduceSerialization.java
@@ -36,7 +36,7 @@ import java.time.Duration;
  */
 public class TestAerospikeStoreMapReduceSerialization {
 
-  private static final String DOCKER_CONTAINER_NAME = 
"aerospike/aerospike-server:latest";
+  private static final String DOCKER_CONTAINER_NAME = 
"aerospike/aerospike-server:4.3.1.4";
 
   @ClassRule
   public static GenericContainer aerospikeContainer = new 
GenericContainer(DOCKER_CONTAINER_NAME)

http://git-wip-us.apache.org/repos/asf/gora/blob/6a90102c/gora-aerospike/src/test/java/org/apache/gora/aerospike/mapreduce/TestAerospikeStoreWordCount.java
----------------------------------------------------------------------
diff --git 
a/gora-aerospike/src/test/java/org/apache/gora/aerospike/mapreduce/TestAerospikeStoreWordCount.java
 
b/gora-aerospike/src/test/java/org/apache/gora/aerospike/mapreduce/TestAerospikeStoreWordCount.java
index 3e24469..8d9d7e9 100644
--- 
a/gora-aerospike/src/test/java/org/apache/gora/aerospike/mapreduce/TestAerospikeStoreWordCount.java
+++ 
b/gora-aerospike/src/test/java/org/apache/gora/aerospike/mapreduce/TestAerospikeStoreWordCount.java
@@ -36,7 +36,7 @@ import java.time.Duration;
  */
 public class TestAerospikeStoreWordCount {
 
-  private static final String DOCKER_CONTAINER_NAME = 
"aerospike/aerospike-server:latest";
+  private static final String DOCKER_CONTAINER_NAME = 
"aerospike/aerospike-server:4.3.1.4";
 
   @ClassRule
   public static GenericContainer aerospikeContainer = new 
GenericContainer(DOCKER_CONTAINER_NAME)

http://git-wip-us.apache.org/repos/asf/gora/blob/6a90102c/gora-aerospike/src/test/java/org/apache/gora/aerospike/store/TestAerospikeStore.java
----------------------------------------------------------------------
diff --git 
a/gora-aerospike/src/test/java/org/apache/gora/aerospike/store/TestAerospikeStore.java
 
b/gora-aerospike/src/test/java/org/apache/gora/aerospike/store/TestAerospikeStore.java
index df85258..97f33d1 100644
--- 
a/gora-aerospike/src/test/java/org/apache/gora/aerospike/store/TestAerospikeStore.java
+++ 
b/gora-aerospike/src/test/java/org/apache/gora/aerospike/store/TestAerospikeStore.java
@@ -39,7 +39,7 @@ import static 
org.apache.gora.examples.WebPageDataCreator.URLS;
  */
 public class TestAerospikeStore extends DataStoreTestBase {
 
-  private static final String DOCKER_CONTAINER_NAME = 
"aerospike/aerospike-server:latest";
+  private static final String DOCKER_CONTAINER_NAME = 
"aerospike/aerospike-server:4.3.1.4";
 
   @ClassRule
   public static GenericContainer aerospikeContainer = new 
GenericContainer(DOCKER_CONTAINER_NAME)

http://git-wip-us.apache.org/repos/asf/gora/blob/6a90102c/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index ddd0d14..5a56c5b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -757,10 +757,10 @@
     <module>gora-maven-plugin</module>
     <module>gora-mongodb</module>
     <module>gora-solr</module>
-    <module>gora-tutorial</module>
-    <module>sources-dist</module>
     <module>gora-aerospike</module>
     <module>gora-ignite</module>
+    <module>gora-tutorial</module>
+    <module>sources-dist</module>
   </modules>
 
   <properties>
@@ -793,7 +793,7 @@
     <restlet.version>2.3.1</restlet.version>
 
     <spark.version>2.2.1</spark.version>
-    <aerospike.version>4.0.6</aerospike.version>
+    <aerospike.version>4.2.2</aerospike.version>
     <!-- Misc Dependencies -->
     <guava.version>13.0</guava.version>
     <commons-lang.version>2.6</commons-lang.version>
@@ -1570,6 +1570,13 @@
         <version>${orientqb.version}</version>
       </dependency>
 
+      <!--Aerospike Dependency -->
+      <dependency>
+        <groupId>com.aerospike</groupId>
+        <artifactId>aerospike-client</artifactId>
+        <version>${aerospike.version}</version>
+      </dependency>
+
       <!-- Testing Dependencies -->
       <dependency>
         <groupId>org.apache.hadoop</groupId>

Reply via email to