You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gora.apache.org by dj...@apache.org on 2017/07/28 03:57:09 UTC
gora git commit: Update aerospike java client and remove unsupported
policies
Repository: gora
Updated Branches:
refs/heads/GORA-515 [created] 1500916bf
Update aerospike java client and remove unsupported policies
Project: http://git-wip-us.apache.org/repos/asf/gora/repo
Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/1500916b
Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/1500916b
Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/1500916b
Branch: refs/heads/GORA-515
Commit: 1500916bf165064d370c3583a19350010a88e2a1
Parents: 0e8b046
Author: nishadi <nd...@gmail.com>
Authored: Fri Jul 28 01:43:13 2017 +0530
Committer: nishadi <nd...@gmail.com>
Committed: Fri Jul 28 01:43:13 2017 +0530
----------------------------------------------------------------------
.../store/AerospikeMappingBuilder.java | 36 ++------------------
pom.xml | 2 +-
2 files changed, 3 insertions(+), 35 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/gora/blob/1500916b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMappingBuilder.java
----------------------------------------------------------------------
diff --git a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMappingBuilder.java b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMappingBuilder.java
index 6d4f901..5973be8 100644
--- a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMappingBuilder.java
+++ b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMappingBuilder.java
@@ -96,12 +96,8 @@ public class AerospikeMappingBuilder {
writePolicy.sendKey = getKeyUsagePolicy(
policyElement.getAttributeValue("key").toUpperCase(Locale.getDefault()));
}
- if (policyElement.getAttributeValue("retry") != null) {
- writePolicy.retryOnTimeout = getRetryOnTimeoutPolicy(
- policyElement.getAttributeValue("retry").toUpperCase(Locale.getDefault()));
- }
if (policyElement.getAttributeValue("timeout") != null) {
- writePolicy.timeout = getTimeoutValue(policyElement.getAttributeValue("timeout"));
+ writePolicy.timeoutDelay = getTimeoutValue(policyElement.getAttributeValue("timeout"));
}
aerospikeMapping.setWritePolicy(writePolicy);
} else if (policy.equals("read")) {
@@ -111,7 +107,7 @@ public class AerospikeMappingBuilder {
policyElement.getAttributeValue("key").toUpperCase(Locale.getDefault()));
}
if (policyElement.getAttributeValue("timeout") != null) {
- readPolicy.timeout = getTimeoutValue(policyElement.getAttributeValue("timeout"));
+ readPolicy.timeoutDelay = getTimeoutValue(policyElement.getAttributeValue("timeout"));
}
aerospikeMapping.setReadPolicy(readPolicy);
}
@@ -265,34 +261,6 @@ public class AerospikeMappingBuilder {
}
/**
- * Returns the corresponding retry on timeout policy from the user specified retry policy name
- *
- * @param retry retry policy name
- * @return corresponding retry on timeout policy
- */
- private boolean getRetryOnTimeoutPolicy(String retry) {
-
- if (retry == null) {
- return false;
- }
-
- boolean retryOnTimeout;
- switch (retry) {
- case "NONE":
- retryOnTimeout = false;
- break;
- case "ONCE":
- retryOnTimeout = true;
- break;
- default: {
- LOG.warn("Invalid key retry policy provided, using the default retry policy");
- retryOnTimeout = false;
- }
- }
- return retryOnTimeout;
- }
-
- /**
* Returns the timeout value from the user specified timeout value
*
* @param timeout user specified timeout value
http://git-wip-us.apache.org/repos/asf/gora/blob/1500916b/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 09af363..652abee 100644
--- a/pom.xml
+++ b/pom.xml
@@ -762,7 +762,7 @@
<restlet.version>2.3.1</restlet.version>
<spark.version>1.4.1</spark.version>
- <aerospike.version>3.3.2</aerospike.version>
+ <aerospike.version>4.0.6</aerospike.version>
<!-- Misc Dependencies -->
<guava.version>13.0</guava.version>
<commons-lang.version>2.6</commons-lang.version>