[AT-969] Update aerospike client to 4.0.8; Support Query API #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Testing
aql> select * from test.cpu_utilization
+---------------------------------------------+-------------------+---------------+-------------+
| PK | avgCpu | timeStamp | trafficType |
+---------------------------------------------+-------------------+---------------+-------------+
| "ec2-54-159-69-124.compute-1.amazonaws.com" | 79.42760969673394 | 1510175324188 | "exchange" |
| "ec2-54-84-112-189.compute-1.amazonaws.com" | 73.41829342827779 | 1510175335763 | "exchange" |
+---------------------------------------------+-------------------+---------------+-------------+
2 rows in set (0.028 secs)
Test code:
val stmt = new Statement()
stmt.setNamespace("test")
stmt.setSetName("cpu_utilization")
stmt.setFilter(Filter.equal("trafficType", "exchange"))
UserstoreAerospikeClient.UserProfileSetOps.query(stmt) foreach { m =>
logger.info("PHUTEST map = " + m)
}
Output:
Map(ec2-54-159-69-124.compute-1.amazonaws.com -> (gen:16),(exp:250464224),(bins:(timeStamp:1510176224164),(avgCpu:78.23558607858752),(trafficType:exchange)), ec2-54-84-112-189.compute-1.amazonaws.com -> (gen:16),(exp:250464235),(bins:(timeStamp:1510176235721),(avgCpu:73.03427051274991),(trafficType:exchange)))