forked from aerospike/aerospike-client-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move query engine code from aerospike-helper repository to extensions…
… directory.
- Loading branch information
1 parent
50b8566
commit 03fc607
Showing
27 changed files
with
3,630 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>com.aerospike</groupId> | ||
<artifactId>aerospike-parent</artifactId> | ||
<version>4.1.11</version> | ||
</parent> | ||
<artifactId>aerospike-client-extensions</artifactId> | ||
<packaging>pom</packaging> | ||
<parent> | ||
<groupId>com.aerospike</groupId> | ||
<artifactId>aerospike-parent</artifactId> | ||
<version>4.1.11</version> | ||
</parent> | ||
<artifactId>aerospike-client-extensions</artifactId> | ||
<packaging>pom</packaging> | ||
|
||
<name>aerospike-client-extensions</name> | ||
<name>aerospike-client-extensions</name> | ||
|
||
<modules> | ||
<module>reactor-client</module> | ||
</modules> | ||
<modules> | ||
<module>query-engine</module> | ||
<module>reactor-client</module> | ||
</modules> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Aerospike Query Engine | ||
====================== | ||
|
||
This project contains the files necessary to build the Aerospike Query Engine library. | ||
Aerospike Query Engine will automatically choose an index if one is available to qualify | ||
the results, and then use PredExp further qualify the results. | ||
|
||
Query Engine uses a `Statement` and zero or more `Qualifier` objects and produces a closable `KeyRecordIterator` to iterate over the results of the query. | ||
|
||
Java Package `com.aerospike.helper.query` | ||
|
||
[Documentation](doc/query.md) | ||
|
||
### Build | ||
|
||
The source code can be imported into your IDE and/or built using Maven. | ||
|
||
mvn install | ||
|
||
### Test | ||
|
||
Tests are disabled by default. To run tests, edit host arguments in | ||
src/test/java/com/aerospike/helper/query/TestQueryEngine.java and execute | ||
script: | ||
|
||
./run_tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,170 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>com.aerospike</groupId> | ||
<artifactId>aerospike-client-extensions</artifactId> | ||
<version>4.1.11</version> | ||
</parent> | ||
<artifactId>aerospike-query-engine</artifactId> | ||
<packaging>jar</packaging> | ||
|
||
<name>aerospike-query-engine</name> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
<skipTests>true</skipTests> | ||
</properties> | ||
|
||
<licenses> | ||
<license> | ||
<name>The Apache License, Version 2.0</name> | ||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> | ||
</license> | ||
</licenses> | ||
|
||
<developers> | ||
<developer> | ||
<id>Peter Milne</id> | ||
<name>Peter Milne</name> | ||
<email>[email protected]</email> | ||
<url>http://www.aerospike.com</url> | ||
<organization>Aerospike Inc.</organization> | ||
<organizationUrl>http://www.aerospike.com</organizationUrl> | ||
<roles> | ||
<role>developer</role> | ||
</roles> | ||
<timezone>-6</timezone> | ||
</developer> | ||
<developer> | ||
<id>Michael Zhang</id> | ||
<name>Michael Zhang</name> | ||
<email>[email protected]</email> | ||
<url>http://www.aerospike.com</url> | ||
<organization>Aerospike Inc.</organization> | ||
<organizationUrl>http://www.aerospike.com</organizationUrl> | ||
<roles> | ||
<role>developer</role> | ||
</roles> | ||
<timezone>-8</timezone> | ||
</developer> | ||
<developer> | ||
<id>Jeff Boone</id> | ||
<name>Jeff Boone</name> | ||
<email>[email protected]</email> | ||
<url>http://www.aerospike.com</url> | ||
<organization>Aerospike Inc.</organization> | ||
<organizationUrl>http://www.aerospike.com</organizationUrl> | ||
<roles> | ||
<role>developer</role> | ||
</roles> | ||
<timezone>-8</timezone> | ||
</developer> | ||
</developers> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>com.aerospike</groupId> | ||
<artifactId>aerospike-client</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>commons-cli</groupId> | ||
<artifactId>commons-cli</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
<version>[1.7.25,)</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<sourceDirectory>${project.basedir}/src/main/java</sourceDirectory> | ||
|
||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<source>${java.version}</source> | ||
<target>${java.version}</target> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<artifactId>maven-assembly-plugin</artifactId> | ||
<configuration> | ||
<descriptorRefs> | ||
<descriptorRef>jar-with-dependencies</descriptorRef> | ||
</descriptorRefs> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>make-my-jar-with-dependencies</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>single</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-source-plugin</artifactId> | ||
<version>2.2.1</version> | ||
<executions> | ||
<execution> | ||
<id>attach-sources</id> | ||
<goals> | ||
<goal>jar-no-fork</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
<version>2.9.1</version> | ||
<executions> | ||
<execution> | ||
<id>attach-javadocs</id> | ||
<goals> | ||
<goal>jar</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
|
||
<resources> | ||
<resource> | ||
<directory>${project.basedir}/src/main/java</directory> | ||
<includes> | ||
<include>**/*.java</include> | ||
<include>**/*.properties</include> | ||
</includes> | ||
</resource> | ||
<resource> | ||
<directory>${project.basedir}/src/main/lua</directory> | ||
<includes> | ||
<include>**/*.lua</include> | ||
</includes> | ||
</resource> | ||
</resources> | ||
</build> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
for i in $* | ||
do | ||
if [[ $i == -D* ]] | ||
then | ||
def="$def $i" | ||
else | ||
arg="$arg $i" | ||
fi | ||
done | ||
|
||
mvn test -DskipTests=false $def -Dargs="$arg" |
41 changes: 41 additions & 0 deletions
41
extensions/query-engine/src/main/java/com/aerospike/helper/model/Function.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright 2012-2018 Aerospike, Inc. | ||
* | ||
* Portions may be licensed to Aerospike, Inc. under one or more contributor | ||
* license agreements WHICH ARE COMPATIBLE WITH THE APACHE LICENSE, VERSION 2.0. | ||
* | ||
* 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 com.aerospike.helper.model; | ||
|
||
/** | ||
* This class represents a User Defined Function | ||
* registered with a cluster | ||
* | ||
* @author peter | ||
*/ | ||
public class Function { | ||
private String name; | ||
|
||
public Function(Module parent, String name) { | ||
super(); | ||
this.name = name; | ||
} | ||
|
||
public String getName() { | ||
return this.name; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return getName(); | ||
} | ||
} |
Oops, something went wrong.