gora git commit: GORA-501 Fix Javadoc for JDK1.8
Repository: gora Updated Branches: refs/heads/pull_93 [created] d5d673cdf GORA-501 Fix Javadoc for JDK1.8 Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/d5d673cd Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/d5d673cd Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/d5d673cd Branch: refs/heads/pull_93 Commit: d5d673cdf06aacf707c3aff8134a713e189d15b9 Parents: fb7622f Author: Kevin RatnasekeraAuthored: Sun Jan 29 22:52:35 2017 +0530 Committer: Kevin Ratnasekera Committed: Sun Jan 29 22:52:35 2017 +0530 -- .../java/org/apache/gora/util/AvroUtils.java| 36 ++- .../java/org/apache/gora/util/ByteUtils.java| 293 +++ .../org/apache/gora/util/ClassLoadingUtils.java | 12 +- .../main/java/org/apache/gora/util/IOUtils.java | 220 +++--- .../java/org/apache/gora/util/NodeWalker.java | 4 +- .../org/apache/gora/util/ReflectionUtils.java | 53 +++- .../java/org/apache/gora/util/StringUtils.java | 29 +- .../java/org/apache/gora/util/VersionInfo.java | 25 +- pom.xml | 34 +++ 9 files changed, 513 insertions(+), 193 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/d5d673cd/gora-core/src/main/java/org/apache/gora/util/AvroUtils.java -- diff --git a/gora-core/src/main/java/org/apache/gora/util/AvroUtils.java b/gora-core/src/main/java/org/apache/gora/util/AvroUtils.java index d07c6c2..c1e3a88 100644 --- a/gora-core/src/main/java/org/apache/gora/util/AvroUtils.java +++ b/gora-core/src/main/java/org/apache/gora/util/AvroUtils.java @@ -36,12 +36,15 @@ import org.apache.avro.specific.SpecificDatumWriter; import org.apache.gora.persistency.impl.PersistentBase; /** - * An utility class for Avro related tasks + * An utility class for Avro related tasks. */ public class AvroUtils { /** * Returns a map of field name to Field for schema's fields. + * + * @param schema the schema object to get the map of field name to Field. + * @return map of field name to Field. */ public static Map getFieldMap(Schema schema) { List fields = schema.getFields(); @@ -63,7 +66,16 @@ public class AvroUtils { } /** - * Returns the schema of the class + * Returns the schema of the class. + * + * @param clazz Class instance of the persistent bean. + * @throws SecurityException if the caller's class loader is not the same as the + * class loader of above class. + * @throws NoSuchFieldException if a field with the specified name is not found. + * @throws IllegalArgumentException this will not be thrown since field.get(obj) passing obj is ignored + * since the SCHEMA field is a static class level variable inside the persistent bean class. + * @throws IllegalAccessException if the field is inaccessible due to java language access control. + * @return the schema of persistent bean instance. */ public static Schema getSchema(Class clazz) throws SecurityException, NoSuchFieldException, IllegalArgumentException, @@ -74,21 +86,20 @@ public class AvroUtils { } /** - * Return the field names from a persistent object + * Return the field names from a persistent object. * - * @param persistent - * the persistent object to get the fields names from - * @return the field names + * @param persistent the persistent object to get the fields names from. + * @return the field names String array. */ public static String[] getPersistentFieldNames(PersistentBase persistent) { return getSchemaFieldNames(persistent.getSchema()); } /** - * Return the field names from a schema object + * Return the field names from a schema object. * - * @param schema the schema object to get the fields names from - * @return the field names + * @param schema the schema object to get the fields names from. + * @return the field names String array. */ public static String[] getSchemaFieldNames(Schema schema) { List fields = schema.getFields(); @@ -99,6 +110,13 @@ public class AvroUtils { return fieldNames; } + /** + * Utility method for deep clone a given AVRO persistent bean instance. + * + * @param persistent source persistent bean instance. + * @param persistent bean type. + * @return cloned persistent bean to be returned. + */ public static T deepClonePersistent(T persistent) { final SpecificDatumWriter writer = new SpecificDatumWriter<>(persistent.getSchema()); final byte[] byteData; http://git-wip-us.apache.org/repos/asf/gora/blob/d5d673cd/gora-core/src/main/java/org/apache/gora/util/ByteUtils.java
[gora] Git Push Summary
Repository: gora Updated Branches: refs/heads/pull_93 [deleted] d5d673cdf
[2/2] gora git commit: Merge branch 'master' of https://github.com/apache/gora into GORA-501
Merge branch 'master' of https://github.com/apache/gora into GORA-501 Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/f8706c99 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/f8706c99 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/f8706c99 Branch: refs/heads/master Commit: f8706c99cbe2f3f1d1eb8bf96d445b6d9c47171c Parents: d5d673c fbf5d58 Author: Kevin RatnasekeraAuthored: Wed Feb 1 12:51:00 2017 +0530 Committer: Kevin Ratnasekera Committed: Wed Feb 1 12:51:00 2017 +0530 -- .../java/org/apache/gora/cassandra/store/CassandraClient.java| 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --
svn commit: r1805054 - in /gora/site/trunk/content/current: gora-aerospike.md index.md overview.md
Author: djkevincr Date: Tue Aug 15 05:53:31 2017 New Revision: 1805054 URL: http://svn.apache.org/viewvc?rev=1805054=rev Log: Add aerospike module doc Added: gora/site/trunk/content/current/gora-aerospike.md Modified: gora/site/trunk/content/current/index.md gora/site/trunk/content/current/overview.md Added: gora/site/trunk/content/current/gora-aerospike.md URL: http://svn.apache.org/viewvc/gora/site/trunk/content/current/gora-aerospike.md?rev=1805054=auto == --- gora/site/trunk/content/current/gora-aerospike.md (added) +++ gora/site/trunk/content/current/gora-aerospike.md Tue Aug 15 05:53:31 2017 @@ -0,0 +1,76 @@ +Title: Gora Aerospike Module + +##Overview +This is the main documentation for the gora-aerospike module. gora-aerospike module enables [Aerospike](http://www.aerospike.com/) backend support for Gora. + +[TOC] + +##gora.properties + +* gora.datastore.default=org.apache.gora.aerospike.store.AerospikeStore - Implementation of the persistent Java storage class for Aerospike +* gora.aerospikestore.server.ip=localhost - Property pointing to the host where the server is running +* gora.aerospikestore.server.port=3000 - Property pointing to the port where the server is running +* gora.datastore.mapping.file=gora-aerospike-mapping.xml - The XML mapping file to be used. If no value is used this defaults to gora-aerospike-mapping.xml +* gora.aerospikestore.server.username=user_name - An optional property defining the username of the server if available +* gora.aerospikestore.server.password=password - An optional property defining the password of the server if available + +##Gora Aerospike mappings +You should then create a gora-aerospike-mapping.xml which will describe how you want to store each of your Gora persistent objects along with the read and write policies in Aerospike: + + + + + + + + + + + + + + + +Here you can see that we require the definition of child elements within the gora-otd mapping configuration. We can define the classes and the policies. + +Each class element should contain the following elements; + +1. a parameter defining the Persistent class name e.g. org.apache.gora.examples.generated.Employee, + +2. a parameter defining the keyClass e.g. java.lang.String which specifies the key which maps to the field values, + +3. a parameter defining the Aerospike set e.g. Employee which will be used to persist each Gora object, + +4. a parameter defining the Aerospike namespace e.g. test which will be used to persist each Gora object, + +In addition, within the class field we should specify the fields and for which bin each field value maps to. We do not need to explicitly specify the type of each field, as the type is automatically detected in Aerospike server when creating the bin values. Thus each field should contain the field name and the corresponding bin it gets mapped to. e.g. name="webpage" bin="webpage" + +Further, we can define the policies on reading and writing data from/to the server. + +Write policy can have following fields and each field values are the default values supported by [Aerospike Write Policy API](https://www.aerospike.com/apidocs/java/com/aerospike/client/policy/WritePolicy.html) + +1. gen - [generation policy](https://www.aerospike.com/apidocs/java/com/aerospike/client/policy/GenerationPolicy.html) (values: EXPECT_GEN_EQUAL, EXPECT_GEN_GT, NONE) + +2. recordExists - [record exists action](https://www.aerospike.com/apidocs/java/com/aerospike/client/policy/RecordExistsAction.html) (values: CREATE_ONLY, REPLACE, REPLACE_ONLY, UPDATE, UPDATE_ONLY) + +3. commitLevel - [commit level](https://www.aerospike.com/apidocs/java/com/aerospike/client/policy/CommitLevel.html) (values: COMMIT_ALL, COMMIT_MASTER) + +4. durableDelete - [durable delete](https://www.aerospike.com/apidocs/java/com/aerospike/client/policy/WritePolicy.html#durableDelete) (values: true, false) + +5. expiration - [record expiration](https://www.aerospike.com/apidocs/java/com/aerospike/client/policy/WritePolicy.html#expiration) (values: 0, 10) + +Read policy can have following fields and each field values are the default values supported by [Aerospike Read Policy API](https://www.aerospike.com/apidocs/java/com/aerospike/client/policy/Policy.html) + +1. priority - [priority policy](https://www.aerospike.com/apidocs/java/com/aerospike/client/policy/Priority.html) (values: DEFAULT, HIGH, LOW, MEDIUM) + +2. consistencyLevel - [consistency level](https://www.aerospike.com/apidocs/java/com/aerospike/client/policy/ConsistencyLevel.html) (values: CONSISTENCY_ALL, CONSISTENCY_ONE) + +3. replica - [replica](https
[04/32] gora git commit: Add put functionality for aerospike module
Add put functionality for aerospike module Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/8571ad90 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/8571ad90 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/8571ad90 Branch: refs/heads/master Commit: 8571ad90db93507118897e7fb51500ac4821c47c Parents: 5608731 Author: nishadiAuthored: Sun Jun 18 14:10:27 2017 +0530 Committer: nishadi Committed: Sun Jun 18 14:12:57 2017 +0530 -- .../store/AerospikeMappingBuilder.java | 92 +++- .../gora/aerospike/store/AerospikeStore.java| 43 + 2 files changed, 92 insertions(+), 43 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/8571ad90/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 4e2b997..8744709 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 @@ -69,59 +69,65 @@ public class AerospikeMappingBuilder { for (Element policyElement : policyElements) { String policy = policyElement.getAttributeValue("name"); - -if (policy.equals("write")) { - - WritePolicy writePolicy = new WritePolicy(); - if (policyElement.getAttributeValue("gen") != null) -writePolicy.generationPolicy = getGenerationPolicyMapping(policyElement.getAttributeValue - ("gen").toUpperCase(Locale.getDefault())); - if (policyElement.getAttributeValue("exists") != null) -writePolicy.recordExistsAction = getRecordExistsAction(policyElement.getAttributeValue - ("exists").toUpperCase(Locale.getDefault())); - if (policyElement.getAttributeValue("key") != null) -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")); - aerospikeMapping.setWritePolicy(writePolicy); -} else if (policy.equals("read")) { - - Policy readPolicy = new Policy(); - if (policyElement.getAttributeValue("key") != null) -readPolicy.sendKey = getKeyUsagePolicy(policyElement.getAttributeValue("key").toUpperCase(Locale - .getDefault())); - if (policyElement.getAttributeValue("timeout") != null) -readPolicy.timeout = getTimeoutValue(policyElement.getAttributeValue("timeout")); - aerospikeMapping.setReadPolicy(readPolicy); +if (policy != null) { + if (policy.equals("write")) { +WritePolicy writePolicy = new WritePolicy(); +if (policyElement.getAttributeValue("gen") != null) + writePolicy.generationPolicy = getGenerationPolicyMapping(policyElement.getAttributeValue +("gen").toUpperCase(Locale.getDefault())); +if (policyElement.getAttributeValue("exists") != null) + writePolicy.recordExistsAction = getRecordExistsAction(policyElement.getAttributeValue +("exists").toUpperCase(Locale.getDefault())); +if (policyElement.getAttributeValue("key") != null) + 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")); +aerospikeMapping.setWritePolicy(writePolicy); + } else if (policy.equals("read")) { +Policy readPolicy = new Policy(); +if (policyElement.getAttributeValue("key") != null) + readPolicy.sendKey = getKeyUsagePolicy(policyElement.getAttributeValue("key").toUpperCase(Locale +
[29/32] gora git commit: Update the query results to get the progress for aerospike module
Update the query results to get the progress for aerospike module Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/c0aa76eb Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/c0aa76eb Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/c0aa76eb Branch: refs/heads/master Commit: c0aa76eb16031973f3e897ea535a0b38bfb7f11f Parents: 360c604 Author: nishadiAuthored: Thu Jul 27 10:18:13 2017 +0530 Committer: nishadi Committed: Thu Jul 27 10:18:13 2017 +0530 -- .../gora/aerospike/query/AerospikeQueryResult.java | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/c0aa76eb/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 e135dc3..c843082 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 @@ -17,8 +17,6 @@ */ package org.apache.gora.aerospike.query; -import com.aerospike.client.Record; -import com.aerospike.client.query.RecordSet; import org.apache.gora.aerospike.store.AerospikeStore; import org.apache.gora.persistency.Persistent; import org.apache.gora.query.Query; @@ -26,7 +24,6 @@ import org.apache.gora.query.impl.ResultBase; import org.apache.gora.store.DataStore; import java.io.IOException; -import java.util.ArrayList; import java.util.List; /** @@ -46,10 +43,20 @@ public class AerospikeQueryResult extends ResultBase 0) { + return (float) offset / (float) resultRecords.size(); +} else { + return 0; +} } /**
[18/32] gora git commit: Add log4j properties for tests
Add log4j properties for tests Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/65201d14 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/65201d14 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/65201d14 Branch: refs/heads/master Commit: 65201d14389de67719d14edc5ede1496b21d17e2 Parents: 3b44781 Author: nishadiAuthored: Thu Jun 29 07:02:25 2017 +0530 Committer: nishadi Committed: Thu Jun 29 07:02:25 2017 +0530 -- gora-aerospike/src/test/conf/log4j.properties | 22 ++ 1 file changed, 22 insertions(+) -- http://git-wip-us.apache.org/repos/asf/gora/blob/65201d14/gora-aerospike/src/test/conf/log4j.properties -- diff --git a/gora-aerospike/src/test/conf/log4j.properties b/gora-aerospike/src/test/conf/log4j.properties new file mode 100644 index 000..25272aa --- /dev/null +++ b/gora-aerospike/src/test/conf/log4j.properties @@ -0,0 +1,22 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. + +log4j.rootLogger=INFO, Console + +log4j.appender.Console=org.apache.log4j.ConsoleAppender +log4j.appender.Console.layout=org.apache.log4j.PatternLayout + +log4j.appender.Console.layout.ConversionPattern=%d{ISO8601} %x %-5p [%c{3}] [%t] %m%n +
[27/32] gora git commit: Add a profile to run test cases
Add a profile to run test cases Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/360c6046 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/360c6046 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/360c6046 Branch: refs/heads/master Commit: 360c6046623fc425c2125b2f9410290dbe5d69c6 Parents: 7414720 Author: nishadiAuthored: Wed Jul 26 22:40:00 2017 +0530 Committer: nishadi Committed: Wed Jul 26 22:40:00 2017 +0530 -- gora-aerospike/pom.xml | 18 ++ 1 file changed, 18 insertions(+) -- http://git-wip-us.apache.org/repos/asf/gora/blob/360c6046/gora-aerospike/pom.xml -- diff --git a/gora-aerospike/pom.xml b/gora-aerospike/pom.xml index 8dab5b1..a70c3e4 100644 --- a/gora-aerospike/pom.xml +++ b/gora-aerospike/pom.xml @@ -54,6 +54,24 @@ org.apache.gora.aerospike*;version="${project.version}";-noimport:=true + + + aerospike-with-test + + + +org.apache.maven.plugins +maven-surefire-plugin +2.4.2 + + false + + + + + + + target target/classes
[17/32] gora git commit: Refactor code
Refactor code Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/3b44781f Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/3b44781f Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/3b44781f Branch: refs/heads/master Commit: 3b44781f9514988a31e2748416b1cb7015e2767a Parents: d3a44b2 Author: nishadiAuthored: Thu Jun 29 07:01:58 2017 +0530 Committer: nishadi Committed: Thu Jun 29 07:01:58 2017 +0530 -- .../org/apache/gora/aerospike/package-info.java | 2 +- .../store/AerospikeMappingBuilder.java | 82 +++- .../aerospike/store/AerospikeParameters.java| 17 ++-- .../gora/aerospike/store/AerospikeStore.java| 40 ++ .../gora/aerospike/store/package-info.java | 2 +- .../gora/aerospike/GoraAerospikeTestDriver.java | 4 +- 6 files changed, 82 insertions(+), 65 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/3b44781f/gora-aerospike/src/main/java/org/apache/gora/aerospike/package-info.java -- diff --git a/gora-aerospike/src/main/java/org/apache/gora/aerospike/package-info.java b/gora-aerospike/src/main/java/org/apache/gora/aerospike/package-info.java index 0dbf8dd..7c1eae4 100644 --- a/gora-aerospike/src/main/java/org/apache/gora/aerospike/package-info.java +++ b/gora-aerospike/src/main/java/org/apache/gora/aerospike/package-info.java @@ -1,4 +1,4 @@ -/** +/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. http://git-wip-us.apache.org/repos/asf/gora/blob/3b44781f/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 ca51c5d..f24c08f 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 @@ -39,7 +39,7 @@ public class AerospikeMappingBuilder { private static final Logger LOG = LoggerFactory.getLogger(AerospikeMappingBuilder.class); - private AerospikeMapping aerospikeMapping; + private final AerospikeMapping aerospikeMapping; public AerospikeMappingBuilder() { this.aerospikeMapping = new AerospikeMapping(); @@ -81,28 +81,35 @@ public class AerospikeMappingBuilder { if (policy != null) { if (policy.equals("write")) { WritePolicy writePolicy = new WritePolicy(); -if (policyElement.getAttributeValue("gen") != null) +if (policyElement.getAttributeValue("gen") != null) { writePolicy.generationPolicy = getGenerationPolicyMapping( policyElement.getAttributeValue("gen").toUpperCase(Locale.getDefault())); -if (policyElement.getAttributeValue("exists") != null) +} +if (policyElement.getAttributeValue("exists") != null) { writePolicy.recordExistsAction = getRecordExistsAction( policyElement.getAttributeValue("exists").toUpperCase(Locale.getDefault())); -if (policyElement.getAttributeValue("key") != null) +} +if (policyElement.getAttributeValue("key") != null) { writePolicy.sendKey = getKeyUsagePolicy( policyElement.getAttributeValue("key").toUpperCase(Locale.getDefault())); -if (policyElement.getAttributeValue("retry") != null) +} +if (policyElement.getAttributeValue("retry") != null) { writePolicy.retryOnTimeout = getRetryOnTimeoutPolicy( policyElement.getAttributeValue("retry").toUpperCase(Locale.getDefault())); -if (policyElement.getAttributeValue("timeout") != null) +} +if (policyElement.getAttributeValue("timeout") != null) { writePolicy.timeout = getTimeoutValue(policyElement.getAttributeValue("timeout")); +} aerospikeMapping.setWritePolicy(writePolicy); } else if (policy.equals("read")) { Policy readPolicy = new Policy(); -if (policyElement.getAttributeValue("key") != null) +if (policyElement.getAttributeValue("key") != null) { readPolicy.sendKey = getKeyUsagePolicy(
[09/32] gora git commit: Add get functionality for aerospike module
Add get functionality for aerospike module Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/00d392f2 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/00d392f2 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/00d392f2 Branch: refs/heads/master Commit: 00d392f2c71e4c6b3e1c8a2fefff0b30afd7c05a Parents: eae36f4 Author: nishadiAuthored: Thu Jun 22 10:43:16 2017 +0530 Committer: nishadi Committed: Thu Jun 22 10:43:16 2017 +0530 -- .../gora/aerospike/store/AerospikeMapping.java | 6 +- .../gora/aerospike/store/AerospikeStore.java| 119 +-- 2 files changed, 115 insertions(+), 10 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/00d392f2/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMapping.java -- diff --git a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMapping.java b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMapping.java index ae8284d..1a17241 100644 --- a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMapping.java +++ b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMapping.java @@ -1,4 +1,4 @@ -/** +/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -74,4 +74,8 @@ public class AerospikeMapping { public void setBinMapping(Map binMapping) { this.binMapping = binMapping; } + + public String getBinName(String fieldName){ +return binMapping.get(fieldName); + } } http://git-wip-us.apache.org/repos/asf/gora/blob/00d392f2/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java -- diff --git a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java index df2f38d..653cbf8 100644 --- a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java +++ b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java @@ -1,4 +1,4 @@ -/** +/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -28,7 +28,6 @@ import org.apache.gora.persistency.impl.PersistentBase; import org.apache.gora.query.PartitionQuery; import org.apache.gora.query.Query; import org.apache.gora.query.Result; -import org.apache.gora.store.DataStoreFactory; import org.apache.gora.store.impl.DataStoreBase; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -41,7 +40,7 @@ import org.slf4j.LoggerFactory; */ public class AerospikeStore extends DataStoreBase { - public static final Logger LOG = LoggerFactory.getLogger(AerospikeStore.class); + public static final Logger logger = LoggerFactory.getLogger(AerospikeStore.class); private static final String PARSE_MAPPING_FILE_KEY = "gora.aerospike.mapping.file"; @@ -51,7 +50,17 @@ public class AerospikeStore extends DataStoreBase keyClass, Class persistentClass, + /** + * {@inheritDoc} + * In initializing the aerospike datastore, read the mapping file, sets the basic + * aerospike specific parameters and creates the client with the user defined policies + * + * @param keyClasskey class + * @param persistentClass persistent class + * @param properties properties + */ + @Override + public void initialize(Class keyClass, Class persistentClass, Properties properties) { super.initialize(keyClass, persistentClass, properties); @@ -87,11 +96,36 @@ public class AerospikeStore extends DataStoreBase extends DataStoreBase extends DataStoreBase extends DataStoreBase
[2/2] gora git commit: Merge remote-tracking branch 'upstream/master' into issue-502
Merge remote-tracking branch 'upstream/master' into issue-502 Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/0e8b046e Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/0e8b046e Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/0e8b046e Branch: refs/heads/master Commit: 0e8b046e38af1dbf1fe4b2437b0865cb83bedfad Parents: d555d56 7a56d24 Author: nishadiAuthored: Fri Jul 28 00:30:13 2017 +0530 Committer: nishadi Committed: Fri Jul 28 00:30:13 2017 +0530 -- --
[1/2] gora git commit: Remove unwanted container stopping
Repository: gora Updated Branches: refs/heads/master 7a56d2484 -> 0e8b046e3 Remove unwanted container stopping Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/d555d563 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/d555d563 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/d555d563 Branch: refs/heads/master Commit: d555d56324cfa620bba111242931fbb7337bfe4e Parents: 7a5d767 Author: nishadiAuthored: Thu Jul 27 23:50:52 2017 +0530 Committer: nishadi Committed: Thu Jul 27 23:53:10 2017 +0530 -- .../java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/d555d563/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java -- diff --git a/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java b/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java index 88ae360..6fc120c 100644 --- a/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java +++ b/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java @@ -46,6 +46,7 @@ public class GoraAerospikeTestDriver extends GoraTestDriver { @Override public void setUpClass() throws Exception { +log.info("Setting up Aerospike test driver"); properties.setProperty("gora.aerospikestore.server.ip", "localhost"); properties.setProperty("gora.aerospikestore.server.port", aerospikeContainer.getMappedPort(3000).toString()); @@ -53,7 +54,7 @@ public class GoraAerospikeTestDriver extends GoraTestDriver { @Override public void tearDownClass() throws Exception { -aerospikeContainer.stop(); +log.info("Tearing down Aerospike test driver"); } /**
[2/2] gora git commit: Merge remote-tracking branch 'upstream/master' into issue-502
Merge remote-tracking branch 'upstream/master' into issue-502 Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/0e8b046e Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/0e8b046e Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/0e8b046e Branch: refs/heads/GORA-502 Commit: 0e8b046e38af1dbf1fe4b2437b0865cb83bedfad Parents: d555d56 7a56d24 Author: nishadiAuthored: Fri Jul 28 00:30:13 2017 +0530 Committer: nishadi Committed: Fri Jul 28 00:30:13 2017 +0530 -- --
[1/2] gora git commit: Remove unwanted container stopping
Repository: gora Updated Branches: refs/heads/GORA-502 [created] 0e8b046e3 Remove unwanted container stopping Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/d555d563 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/d555d563 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/d555d563 Branch: refs/heads/GORA-502 Commit: d555d56324cfa620bba111242931fbb7337bfe4e Parents: 7a5d767 Author: nishadiAuthored: Thu Jul 27 23:50:52 2017 +0530 Committer: nishadi Committed: Thu Jul 27 23:53:10 2017 +0530 -- .../java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/d555d563/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java -- diff --git a/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java b/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java index 88ae360..6fc120c 100644 --- a/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java +++ b/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java @@ -46,6 +46,7 @@ public class GoraAerospikeTestDriver extends GoraTestDriver { @Override public void setUpClass() throws Exception { +log.info("Setting up Aerospike test driver"); properties.setProperty("gora.aerospikestore.server.ip", "localhost"); properties.setProperty("gora.aerospikestore.server.port", aerospikeContainer.getMappedPort(3000).toString()); @@ -53,7 +54,7 @@ public class GoraAerospikeTestDriver extends GoraTestDriver { @Override public void tearDownClass() throws Exception { -aerospikeContainer.stop(); +log.info("Tearing down Aerospike test driver"); } /**
[11/32] gora git commit: Add initial test base for aerorospike module
Add initial test base for aerorospike module Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/7c3390d0 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/7c3390d0 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/7c3390d0 Branch: refs/heads/master Commit: 7c3390d0a7cf72afe3ffb3e3748f993e85cce48b Parents: d68be8d Author: nishadiAuthored: Fri Jun 23 19:37:05 2017 +0530 Committer: nishadi Committed: Fri Jun 23 19:37:05 2017 +0530 -- gora-aerospike/pom.xml | 9 +- .../src/test/conf/gora-aerospike-mapping.xml| 49 +++ gora-aerospike/src/test/conf/gora.properties| 17 + .../gora/aerospike/GoraAerospikeTestDriver.java | 74 + .../org/apache/gora/aerospike/package-info.java | 17 + .../aerospike/store/TestAerospikeStore.java | 330 +++ .../gora/aerospike/store/package-info.java | 21 ++ pom.xml | 6 + 8 files changed, 522 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/7c3390d0/gora-aerospike/pom.xml -- diff --git a/gora-aerospike/pom.xml b/gora-aerospike/pom.xml index b15693e..828f45d 100644 --- a/gora-aerospike/pom.xml +++ b/gora-aerospike/pom.xml @@ -63,7 +63,7 @@ src/main/java -${project.basedir}/src/test/resources +${project.basedir}/src/test/conf **/* @@ -141,6 +141,13 @@ junit + + org.testcontainers + testcontainers + 1.1.0 + test + + http://git-wip-us.apache.org/repos/asf/gora/blob/7c3390d0/gora-aerospike/src/test/conf/gora-aerospike-mapping.xml -- diff --git a/gora-aerospike/src/test/conf/gora-aerospike-mapping.xml b/gora-aerospike/src/test/conf/gora-aerospike-mapping.xml new file mode 100644 index 000..f3f6eee --- /dev/null +++ b/gora-aerospike/src/test/conf/gora-aerospike-mapping.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/gora/blob/7c3390d0/gora-aerospike/src/test/conf/gora.properties -- diff --git a/gora-aerospike/src/test/conf/gora.properties b/gora-aerospike/src/test/conf/gora.properties new file mode 100644 index 000..c0230ec --- /dev/null +++ b/gora-aerospike/src/test/conf/gora.properties @@ -0,0 +1,17 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. + +gora.datastore.default=org.apache.gora.aerospike.store.AerospikeStore +gora.datastore.mapping.file=gora-aerospike-mapping.xml \ No newline at end of file http://git-wip-us.apache.org/repos/asf/gora/blob/7c3390d0/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java -- diff --git a/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java b/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java new file mode 100644 index 000..1281d9b --- /dev/null +++ b/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java @@ -0,0 +1,74 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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, + *
[05/32] gora git commit: Add support for aerospike in tutorial
Add support for aerospike in tutorial Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/3900a41d Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/3900a41d Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/3900a41d Branch: refs/heads/master Commit: 3900a41d9a517025618f346b57bd0c5a1fbe89bd Parents: 8571ad9 Author: nishadiAuthored: Sun Jun 18 14:14:34 2017 +0530 Committer: nishadi Committed: Sun Jun 18 14:14:34 2017 +0530 -- gora-tutorial/conf/gora-aerospike-mapping.xml | 30 ++ gora-tutorial/conf/gora.properties| 3 ++- gora-tutorial/pom.xml | 4 +++ 3 files changed, 36 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/3900a41d/gora-tutorial/conf/gora-aerospike-mapping.xml -- diff --git a/gora-tutorial/conf/gora-aerospike-mapping.xml b/gora-tutorial/conf/gora-aerospike-mapping.xml new file mode 100644 index 000..676f52c --- /dev/null +++ b/gora-tutorial/conf/gora-aerospike-mapping.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/gora/blob/3900a41d/gora-tutorial/conf/gora.properties -- diff --git a/gora-tutorial/conf/gora.properties b/gora-tutorial/conf/gora.properties index 80de06d..296d191 100644 --- a/gora-tutorial/conf/gora.properties +++ b/gora-tutorial/conf/gora.properties @@ -16,7 +16,8 @@ ##gora.datastore.default is the default detastore implementation to use ##if it is not passed to the DataStoreFactory#createDataStore() method. -gora.datastore.default=org.apache.gora.hbase.store.HBaseStore +gora.datastore.default=org.apache.gora.aerospike.store.AerospikeStore +#gora.datastore.default=org.apache.gora.hbase.store.HBaseStore #gora.datastore.default=org.apache.gora.couchdb.store.CouchDBStore #gora.datastore.default=org.apache.gora.cassandra.store.CassandraStore #gora.datastore.default=org.apache.gora.solr.store.SolrStore http://git-wip-us.apache.org/repos/asf/gora/blob/3900a41d/gora-tutorial/pom.xml -- diff --git a/gora-tutorial/pom.xml b/gora-tutorial/pom.xml index 26011a9..99ba41d 100644 --- a/gora-tutorial/pom.xml +++ b/gora-tutorial/pom.xml @@ -123,6 +123,10 @@ gora-solr + + org.apache.gora + gora-aerospike + org.apache.hadoop
[20/32] gora git commit: Add initial query model for gora-aerospike
Add initial query model for gora-aerospike Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/2d667edb Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/2d667edb Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/2d667edb Branch: refs/heads/master Commit: 2d667edb08ac241e857c9922d05f13a00c91fdc3 Parents: ecd3c59 Author: nishadiAuthored: Wed Jul 19 20:44:57 2017 +0530 Committer: nishadi Committed: Wed Jul 19 20:44:57 2017 +0530 -- .../gora/aerospike/query/AerospikeQuery.java| 33 +++ .../aerospike/query/AerospikeQueryResult.java | 80 .../aerospike/query/AerospikeResultRecord.java | 51 ++ .../gora/aerospike/store/AerospikeStore.java| 99 +++- .../src/test/conf/gora-aerospike-mapping.xml| 2 +- .../aerospike/store/TestAerospikeStore.java | 23 + 6 files changed, 262 insertions(+), 26 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/2d667edb/gora-aerospike/src/main/java/org/apache/gora/aerospike/query/AerospikeQuery.java -- diff --git a/gora-aerospike/src/main/java/org/apache/gora/aerospike/query/AerospikeQuery.java b/gora-aerospike/src/main/java/org/apache/gora/aerospike/query/AerospikeQuery.java new file mode 100644 index 000..d87fe6a --- /dev/null +++ b/gora-aerospike/src/main/java/org/apache/gora/aerospike/query/AerospikeQuery.java @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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.apache.gora.aerospike.query; + +import org.apache.gora.persistency.impl.PersistentBase; +import org.apache.gora.query.Query; +import org.apache.gora.query.impl.QueryBase; +import org.apache.gora.store.DataStore; + +/** + * Aerospike specific implementation of the {@link Query} interface. + */ +public class AerospikeQuery extends QueryBase { + public AerospikeQuery(DataStore dataStore) { +super(dataStore); + } + +} http://git-wip-us.apache.org/repos/asf/gora/blob/2d667edb/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 new file mode 100644 index 000..8858f34 --- /dev/null +++ b/gora-aerospike/src/main/java/org/apache/gora/aerospike/query/AerospikeQueryResult.java @@ -0,0 +1,80 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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.apache.gora.aerospike.query; + +import com.aerospike.client.Record; +import com.aerospike.client.query.RecordSet; +import org.apache.gora.aerospike.store.AerospikeStore; +import org.apache.gora.persistency.Persistent; +import org.apache.gora.query.Query; +import org.apache.gora.query.impl.ResultBase; +import org.apache.gora.store.DataStore; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * Aerospike specific implementation of the {@link org.apache.gora.query.Result} + * interface. + */ +public class AerospikeQueryResult
[15/32] gora git commit: Revert gora-tutorial module default datastore
Revert gora-tutorial module default datastore Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/4163a062 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/4163a062 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/4163a062 Branch: refs/heads/master Commit: 4163a062f4f2986874a4e80a3e38ecf426559b0c Parents: b61eeaf Author: nishadiAuthored: Tue Jun 27 06:00:56 2017 +0530 Committer: nishadi Committed: Tue Jun 27 06:00:56 2017 +0530 -- gora-tutorial/conf/gora.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/4163a062/gora-tutorial/conf/gora.properties -- diff --git a/gora-tutorial/conf/gora.properties b/gora-tutorial/conf/gora.properties index 296d191..439755e 100644 --- a/gora-tutorial/conf/gora.properties +++ b/gora-tutorial/conf/gora.properties @@ -16,11 +16,11 @@ ##gora.datastore.default is the default detastore implementation to use ##if it is not passed to the DataStoreFactory#createDataStore() method. -gora.datastore.default=org.apache.gora.aerospike.store.AerospikeStore -#gora.datastore.default=org.apache.gora.hbase.store.HBaseStore +gora.datastore.default=org.apache.gora.hbase.store.HBaseStore #gora.datastore.default=org.apache.gora.couchdb.store.CouchDBStore #gora.datastore.default=org.apache.gora.cassandra.store.CassandraStore #gora.datastore.default=org.apache.gora.solr.store.SolrStore +#gora.datastore.default=org.apache.gora.aerospike.store.AerospikeStore #gora.datastore.default=org.apache.gora.avro.store.AvroStore #gora.avrostore.input.path=hdfs://localhost:9000/gora.avrostore.test.input
[30/32] gora git commit: Add dependency management for test-containers
Add dependency management for test-containers Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/38037ca9 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/38037ca9 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/38037ca9 Branch: refs/heads/master Commit: 38037ca9530c84c8b7d88284d19b47bbc3f0ab58 Parents: 9c38409 Author: nishadiAuthored: Thu Jul 27 14:07:07 2017 +0530 Committer: nishadi Committed: Thu Jul 27 22:33:54 2017 +0530 -- gora-aerospike/pom.xml | 1 - gora-couchdb/pom.xml | 1 - pom.xml| 7 +++ 3 files changed, 7 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/38037ca9/gora-aerospike/pom.xml -- diff --git a/gora-aerospike/pom.xml b/gora-aerospike/pom.xml index a70c3e4..c8cab41 100644 --- a/gora-aerospike/pom.xml +++ b/gora-aerospike/pom.xml @@ -165,7 +165,6 @@ org.testcontainers testcontainers - 1.1.0 test http://git-wip-us.apache.org/repos/asf/gora/blob/38037ca9/gora-couchdb/pom.xml -- diff --git a/gora-couchdb/pom.xml b/gora-couchdb/pom.xml index f23c097..163ed4a 100644 --- a/gora-couchdb/pom.xml +++ b/gora-couchdb/pom.xml @@ -217,7 +217,6 @@ org.testcontainers testcontainers - 1.1.0 test http://git-wip-us.apache.org/repos/asf/gora/blob/38037ca9/pom.xml -- diff --git a/pom.xml b/pom.xml index 2d05a71..09af363 100644 --- a/pom.xml +++ b/pom.xml @@ -780,6 +780,7 @@ 4.10 +1.4.2 3.1 @@ -1538,6 +1539,12 @@ 4.4 + +org.testcontainers +testcontainers +${test.container.version} + +
[03/32] gora git commit: Merge remote-tracking branch 'upstream/master' into issue-502
Merge remote-tracking branch 'upstream/master' into issue-502 Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/56087311 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/56087311 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/56087311 Branch: refs/heads/master Commit: 5608731163dc05b7f8d66ea4071d0a1af04911f2 Parents: 1ad1cc9 d5e5560 Author: nishadiAuthored: Sat Jun 17 22:26:45 2017 +0530 Committer: nishadi Committed: Sat Jun 17 22:26:45 2017 +0530 -- .../gora/accumulo/store/AccumuloStoreTest.java | 13 +- .../cassandra/store/TestCassandraStore.java | 12 - .../apache/gora/memory/store/MemStoreTest.java | 16 +- .../gora/memory/store/MemStoreTestDriver.java | 44 + .../apache/gora/store/DataStoreTestBase.java| 13 - .../gora/couchdb/store/TestCouchDBStore.java| 12 - .../org/apache/gora/hbase/store/HBaseStore.java |7 +- .../test/conf/gora-hbase-mapping-mismatch.xml | 47 + .../apache/gora/hbase/store/TestHBaseStore.java | 33 +- .../infinispan/store/InfinispanStoreTest.java | 12 - .../jcache/store/JCacheGoraDataStoreTest.java | 10 - .../gora/mongodb/store/TestMongoStore.java | 14 - gora-solr-5/pom.xml | 275 .../java/org/apache/gora/solr/package-info.java | 20 - .../org/apache/gora/solr/query/SolrQuery.java | 80 - .../org/apache/gora/solr/query/SolrResult.java | 121 -- .../apache/gora/solr/query/package-info.java| 21 - .../org/apache/gora/solr/store/SolrMapping.java | 58 - .../org/apache/gora/solr/store/SolrStore.java | 841 --- .../apache/gora/solr/store/package-info.java| 20 - gora-solr-5/src/test/conf/gora-solr-mapping.xml | 40 - gora-solr-5/src/test/conf/gora.properties | 21 - gora-solr-5/src/test/conf/log4j.properties | 35 - .../solr/Employee/conf/lang/stopwords_en.txt| 54 - .../test/conf/solr/Employee/conf/protwords.txt | 21 - .../src/test/conf/solr/Employee/conf/schema.xml | 45 - .../test/conf/solr/Employee/conf/solrconfig.xml | 107 -- .../test/conf/solr/Employee/conf/stopwords.txt | 14 - .../test/conf/solr/Employee/conf/synonyms.txt | 29 - .../solr/WebPage/conf/lang/stopwords_en.txt | 54 - .../test/conf/solr/WebPage/conf/protwords.txt | 21 - .../src/test/conf/solr/WebPage/conf/schema.xml | 46 - .../test/conf/solr/WebPage/conf/solrconfig.xml | 107 -- .../test/conf/solr/WebPage/conf/stopwords.txt | 14 - .../test/conf/solr/WebPage/conf/synonyms.txt| 29 - .../test/conf/solr/collection1/conf/schema.xml | 32 - .../conf/solr/collection1/conf/solrconfig.xml | 113 -- .../test/conf/solr/collection1/core.properties |1 - gora-solr-5/src/test/conf/solr/solr.xml | 69 - gora-solr-5/src/test/conf/solr/zoo.cfg | 17 - .../apache/gora/solr/GoraSolrTestDriver.java| 94 -- .../java/org/apache/gora/solr/package-info.java | 21 - .../apache/gora/solr/store/TestSolrStore.java | 120 -- .../apache/gora/solr/store/package-info.java| 21 - gora-solr/pom.xml | 90 +- .../java/org/apache/gora/solr/package-info.java | 20 + .../org/apache/gora/solr/query/SolrQuery.java | 22 +- .../org/apache/gora/solr/query/SolrResult.java | 22 +- .../apache/gora/solr/query/package-info.java| 21 + .../org/apache/gora/solr/store/SolrMapping.java |3 + .../org/apache/gora/solr/store/SolrStore.java | 117 +- .../apache/gora/solr/store/package-info.java| 20 + .../Employee/conf/elevate.xml | 42 + .../Employee/conf/lang/stopwords_en.txt | 54 + .../Employee/conf/managed-schema| 33 + .../Employee/conf/protwords.txt | 21 + .../Employee/conf/solrconfig.xml| 1411 ++ .../Employee/conf/synonyms.txt | 29 + .../WebPage/conf/elevate.xml| 42 + .../WebPage/conf/lang/stopwords_en.txt | 54 + .../WebPage/conf/managed-schema | 34 + .../WebPage/conf/protwords.txt | 21 + .../WebPage/conf/solrconfig.xml | 1411 ++ .../WebPage/conf/synonyms.txt | 29 + .../collection1/conf/elevate.xml| 42 + .../collection1/conf/managed-schema | 26 + .../collection1/conf/solrconfig.xml | 1403 + .../collection1/core.properties | 18 + .../src/test/conf/solr-managed-schema/solr.xml | 53 + .../src/test/conf/solr-managed-schema/zoo.cfg | 35 + .../test/conf/solr/Employee/conf/solrconfig.xml |2 +- .../test/conf/solr/Employee/conf/stopwords.txt | 14 - .../src/test/conf/solr/Employee/core.properties |1 -
[26/32] gora git commit: Configure maven to skip the tests by default
Configure maven to skip the tests by default Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/74147203 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/74147203 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/74147203 Branch: refs/heads/master Commit: 74147203997d0ff078b5847a0749b3e0f30d2137 Parents: 08fb5dd Author: nishadiAuthored: Wed Jul 26 22:18:43 2017 +0530 Committer: nishadi Committed: Wed Jul 26 22:18:43 2017 +0530 -- gora-aerospike/pom.xml | 8 1 file changed, 8 insertions(+) -- http://git-wip-us.apache.org/repos/asf/gora/blob/74147203/gora-aerospike/pom.xml -- diff --git a/gora-aerospike/pom.xml b/gora-aerospike/pom.xml index b08611f..8dab5b1 100644 --- a/gora-aerospike/pom.xml +++ b/gora-aerospike/pom.xml @@ -71,6 +71,14 @@ +org.apache.maven.plugins +maven-surefire-plugin +2.4.2 + + true + + + org.codehaus.mojo build-helper-maven-plugin ${build-helper-maven-plugin.version}
[19/32] gora git commit: Refactor code
Refactor code Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/ecd3c598 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/ecd3c598 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/ecd3c598 Branch: refs/heads/master Commit: ecd3c598b98212cbd47cd415819b62614496839e Parents: 65201d1 Author: nishadiAuthored: Thu Jun 29 09:44:37 2017 +0530 Committer: nishadi Committed: Thu Jun 29 09:44:37 2017 +0530 -- .../org/apache/gora/aerospike/store/AerospikeParameters.java | 4 ++-- .../java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/ecd3c598/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeParameters.java -- diff --git a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeParameters.java b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeParameters.java index 5cb91e2..61ea17a 100644 --- a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeParameters.java +++ b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeParameters.java @@ -39,9 +39,9 @@ public class AerospikeParameters { private boolean isSingleBinEnabled; // Property names - private static final String AS_SERVER_IP = "server.ip"; + private static final String AS_SERVER_IP = "gora.aerospikestore.server.ip"; - private static final String AS_SERVER_PORT = "server.port"; + private static final String AS_SERVER_PORT = "gora.aerospikestore.server.port"; // Default property values private static final String DEFAULT_SERVER_IP = "localhost"; http://git-wip-us.apache.org/repos/asf/gora/blob/ecd3c598/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java -- diff --git a/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java b/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java index 6c025e4..5a086d8 100644 --- a/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java +++ b/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java @@ -62,7 +62,7 @@ public class GoraAerospikeTestDriver extends GoraTestDriver { * @param keyClass The key class. * @param persistentClass The value class. * @return A new store instance. - * @throws GoraException + * @throws GoraException If an error occur in creating the data store */ @Override public DataStore createDataStore(Class keyClass, Class persistentClass)
[02/32] gora git commit: Add mapping reading and initialization for aerospike module
Add mapping reading and initialization for aerospike module Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/1ad1cc9c Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/1ad1cc9c Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/1ad1cc9c Branch: refs/heads/master Commit: 1ad1cc9c96d0e2a12612a9efa76503218a935316 Parents: e796c8c Author: nishadiAuthored: Sat Jun 17 22:26:05 2017 +0530 Committer: nishadi Committed: Sat Jun 17 22:26:05 2017 +0530 -- gora-aerospike/pom.xml | 6 + .../gora/aerospike/store/AerospikeMapping.java | 64 + .../store/AerospikeMappingBuilder.java | 246 +++ .../aerospike/store/AerospikeParameters.java| 127 ++ .../gora/aerospike/store/AerospikeStore.java| 49 ++-- 5 files changed, 477 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/1ad1cc9c/gora-aerospike/pom.xml -- diff --git a/gora-aerospike/pom.xml b/gora-aerospike/pom.xml index 1a557f4..ddf17a1 100644 --- a/gora-aerospike/pom.xml +++ b/gora-aerospike/pom.xml @@ -124,6 +124,12 @@ hadoop-client + + org.jdom + jdom + compile + + org.slf4j http://git-wip-us.apache.org/repos/asf/gora/blob/1ad1cc9c/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMapping.java -- diff --git a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMapping.java b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMapping.java new file mode 100644 index 000..5df8a92 --- /dev/null +++ b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMapping.java @@ -0,0 +1,64 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.apache.gora.aerospike.store; + +import com.aerospike.client.policy.Policy; +import com.aerospike.client.policy.WritePolicy; + +public class AerospikeMapping { + private String namespace; + private String set; + private WritePolicy writePolicy; + private Policy readPolicy; + + public AerospikeMapping() { +writePolicy = new WritePolicy(); +readPolicy = new Policy(); + } + + public String getNamespace() { +return namespace; + } + + public void setNamespace(String namespace) { +this.namespace = namespace; + } + + public String getSet() { +return set; + } + + public void setSet(String set) { +this.set = set; + } + + public WritePolicy getWritePolicy() { +return writePolicy; + } + + public void setWritePolicy(WritePolicy writePolicy) { +this.writePolicy = writePolicy; + } + + public Policy getReadPolicy() { +return readPolicy; + } + + public void setReadPolicy(Policy readPolicy) { +this.readPolicy = readPolicy; + } +} http://git-wip-us.apache.org/repos/asf/gora/blob/1ad1cc9c/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 new file mode 100644 index 000..4e2b997 --- /dev/null +++ b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMappingBuilder.java @@ -0,0 +1,246 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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
[01/32] gora git commit: Add initial gora-aerospike module
Repository: gora Updated Branches: refs/heads/master d5e5560ba -> 7a56d2484 Add initial gora-aerospike module Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/e796c8c5 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/e796c8c5 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/e796c8c5 Branch: refs/heads/master Commit: e796c8c511463cefdb6da785baf9373d19795995 Parents: 1b20b10 Author: nishadiAuthored: Thu Jun 8 21:03:29 2017 +0530 Committer: nishadi Committed: Thu Jun 8 21:03:29 2017 +0530 -- gora-aerospike/pom.xml | 141 +++ .../org/apache/gora/aerospike/package-info.java | 20 +++ .../gora/aerospike/store/AerospikeStore.java| 110 +++ .../gora/aerospike/store/package-info.java | 20 +++ pom.xml | 7 + 5 files changed, 298 insertions(+) -- http://git-wip-us.apache.org/repos/asf/gora/blob/e796c8c5/gora-aerospike/pom.xml -- diff --git a/gora-aerospike/pom.xml b/gora-aerospike/pom.xml new file mode 100644 index 000..1a557f4 --- /dev/null +++ b/gora-aerospike/pom.xml @@ -0,0 +1,141 @@ + + +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/xsd/maven-4.0.0.xsd;> + 4.0.0 + + +org.apache.gora +gora +0.8-SNAPSHOT +../ + + gora-aerospike + bundle + + Apache Gora :: Aerospike + http://gora.apache.org + The Apache Gora open source framework provides an in-memory data model and +persistence for big data. Gora supports persisting to column stores, key value stores, +document stores and RDBMSs, and analyzing the data with extensive Apache Hadoop MapReduce +support. + 2010 + +The Apache Software Foundation +http://www.apache.org/ + + +JIRA +https://issues.apache.org/jira/browse/GORA + + +Jenkins +https://builds.apache.org/job/Gora-trunk/ + + + +3.3.2 +* + org.apache.gora.aerospike*;version="${project.version}";-noimport:=true + + + +target +target/classes +${project.artifactId}-${project.version} +target/test-classes +src/test/java +src/main/java + + +${project.basedir}/src/test/resources + + **/* + + + + + +org.codehaus.mojo +build-helper-maven-plugin +${build-helper-maven-plugin.version} + + +generate-sources + + add-source + + + +src/examples/java + + + + + + + + + + + + org.apache.gora + gora-core + + + + org.apache.gora + gora-core + test-jar + test + + + + + com.aerospike + aerospike-client + ${aerospike.version} + + + + org.apache.avro + avro + + + + + org.apache.hadoop + hadoop-client + + + + + org.slf4j + slf4j-log4j12 + + + + + junit + junit + + + + + http://git-wip-us.apache.org/repos/asf/gora/blob/e796c8c5/gora-aerospike/src/main/java/org/apache/gora/aerospike/package-info.java -- diff --git a/gora-aerospike/src/main/java/org/apache/gora/aerospike/package-info.java b/gora-aerospike/src/main/java/org/apache/gora/aerospike/package-info.java new file mode 100644 index 000..0dbf8dd --- /dev/null +++ b/gora-aerospike/src/main/java/org/apache/gora/aerospike/package-info.java @@ -0,0 +1,20 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ +/** + * This package contains Aerospike datastore related all classes. + */ +package org.apache.gora.aerospike; \ No newline at end of file
[28/32] gora git commit: Fix formatting issues and update java doc comments
Fix formatting issues and update java doc comments Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/9c384099 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/9c384099 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/9c384099 Branch: refs/heads/master Commit: 9c384099633c80249316af35922c99a70cbbc5be Parents: c0aa76e Author: nishadiAuthored: Thu Jul 27 06:22:58 2017 +0530 Committer: nishadi Committed: Thu Jul 27 06:22:58 2017 +0530 -- .../gora/aerospike/query/AerospikeQuery.java| 1 - .../aerospike/query/AerospikeResultRecord.java | 3 +- .../gora/aerospike/store/AerospikeMapping.java | 3 + .../store/AerospikeMappingBuilder.java | 3 + .../aerospike/store/AerospikeParameters.java| 3 + .../gora/aerospike/store/AerospikeStore.java| 60 ++-- .../gora/aerospike/GoraAerospikeTestDriver.java | 15 +++-- .../aerospike/store/TestAerospikeStore.java | 1 - 8 files changed, 50 insertions(+), 39 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/9c384099/gora-aerospike/src/main/java/org/apache/gora/aerospike/query/AerospikeQuery.java -- diff --git a/gora-aerospike/src/main/java/org/apache/gora/aerospike/query/AerospikeQuery.java b/gora-aerospike/src/main/java/org/apache/gora/aerospike/query/AerospikeQuery.java index d87fe6a..2f97f5f 100644 --- a/gora-aerospike/src/main/java/org/apache/gora/aerospike/query/AerospikeQuery.java +++ b/gora-aerospike/src/main/java/org/apache/gora/aerospike/query/AerospikeQuery.java @@ -29,5 +29,4 @@ public class AerospikeQuery extends QueryBase public AerospikeQuery(DataStore dataStore) { super(dataStore); } - } http://git-wip-us.apache.org/repos/asf/gora/blob/9c384099/gora-aerospike/src/main/java/org/apache/gora/aerospike/query/AerospikeResultRecord.java -- diff --git a/gora-aerospike/src/main/java/org/apache/gora/aerospike/query/AerospikeResultRecord.java b/gora-aerospike/src/main/java/org/apache/gora/aerospike/query/AerospikeResultRecord.java index 07d4309..069e568 100644 --- a/gora-aerospike/src/main/java/org/apache/gora/aerospike/query/AerospikeResultRecord.java +++ b/gora-aerospike/src/main/java/org/apache/gora/aerospike/query/AerospikeResultRecord.java @@ -21,11 +21,12 @@ import com.aerospike.client.Key; import com.aerospike.client.Record; /** - * Class to hold Aerospike result records + * Class to represent Aerospike result records */ public class AerospikeResultRecord { private Key key; + private Record record; public AerospikeResultRecord(Key key, Record record) { http://git-wip-us.apache.org/repos/asf/gora/blob/9c384099/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMapping.java -- diff --git a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMapping.java b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMapping.java index cb000a0..7de7a2d 100644 --- a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMapping.java +++ b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMapping.java @@ -22,6 +22,9 @@ import com.aerospike.client.policy.WritePolicy; import java.util.HashMap; import java.util.Map; +/** + * Class to represent the Aerospike Mapping + */ public class AerospikeMapping { private String namespace; http://git-wip-us.apache.org/repos/asf/gora/blob/9c384099/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 f24c08f..6d4f901 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 @@ -35,6 +35,9 @@ import java.util.Locale; import java.util.Map; import java.util.HashMap; +/** + * Class to represent the Aerospike mapping builder + */ public class AerospikeMappingBuilder { private static final Logger LOG = LoggerFactory.getLogger(AerospikeMappingBuilder.class); http://git-wip-us.apache.org/repos/asf/gora/blob/9c384099/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeParameters.java -- diff --git
[23/32] gora git commit: Update the test cases
Update the test cases Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/dbe962a2 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/dbe962a2 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/dbe962a2 Branch: refs/heads/master Commit: dbe962a24475a2d288e1e1ff681c21ccd05b5cbc Parents: 390a435 Author: nishadiAuthored: Mon Jul 24 22:43:30 2017 +0530 Committer: nishadi Committed: Mon Jul 24 22:43:30 2017 +0530 -- .../gora/aerospike/store/AerospikeStore.java| 38 +++- .../aerospike/store/TestAerospikeStore.java | 47 +++- 2 files changed, 54 insertions(+), 31 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/dbe962a2/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java -- diff --git a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java index 56f2bdb..5b3a1b9 100644 --- a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java +++ b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java @@ -255,7 +255,7 @@ public class AerospikeStore extends DataStoreBase extends DataStoreBase= 0 && input +// .compareToIgnoreCase(upperBound) <= 0; // -// if(isSpecifiedRange){ -//AerospikeResultRecord aerospikeRecord = new AerospikeResultRecord(key,record); +// if (isSpecifiedRange) { +//AerospikeResultRecord aerospikeRecord = new AerospikeResultRecord(key, record); //resultRecords.add(aerospikeRecord); // } // //} - } - +// } +//} return new AerospikeQueryResult<>(this, query, resultRecords, getFieldsToQuery(null)); } @@ -320,6 +313,9 @@ public class AerospikeStore extends DataStoreBase(this); } + /** + * The functionality is not supported as query key ranges are not supported + */ @Override public List > getPartitions(Query query) throws IOException { return null; http://git-wip-us.apache.org/repos/asf/gora/blob/dbe962a2/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 9e38e4d..9e66327 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 @@ -23,11 +23,14 @@ import org.apache.gora.examples.WebPageDataCreator; import org.apache.gora.examples.generated.WebPage; import org.apache.gora.query.Query; import org.apache.gora.store.DataStoreTestBase; +import org.apache.gora.store.DataStoreTestUtil; +import org.apache.gora.util.AvroUtils; import org.junit.ClassRule; import org.junit.Ignore; import org.junit.Test; import org.testcontainers.containers.GenericContainer; +import static org.apache.gora.examples.WebPageDataCreator.SORTED_URLS; import static org.apache.gora.examples.WebPageDataCreator.URLS; /** @@ -88,21 +91,21 @@ public class TestAerospikeStore extends DataStoreTestBase { } @Test - @Ignore("Functionality is to be implemented in the next iteration") + @Ignore("Query key ranges based on primary key is not supported via the java client") @Override public void testQueryStartKey() throws Exception { super.testQueryStartKey(); } @Test - @Ignore("Functionality is to be implemented in the next iteration") + @Ignore("Query key ranges based on primary key is not supported via the java client") @Override public void testQueryEndKey() throws Exception { super.testQueryEndKey(); } @Test - @Ignore("Functionality is to be implemented in the next iteration") + @Ignore("Query key ranges based on primary key is not supported via the java client") @Override public void testQueryKeyRange() throws Exception { super.testQueryKeyRange(); @@ -121,23 +124,47 @@ public class TestAerospikeStore extends DataStoreTestBase { } @Test - @Ignore("Functionality is to be implemented in the next iteration") @Override public void testDeleteByQuery() throws Exception { -super.testDeleteByQuery(); + +// Can not use the super method as they query key ranges are not supported +Query query; +//test 1 - delete all +
[06/32] gora git commit: Update mapping reading to support mappings of field names to bin values in aerospike module
Update mapping reading to support mappings of field names to bin values in aerospike module Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/b0c19774 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/b0c19774 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/b0c19774 Branch: refs/heads/master Commit: b0c197744e40816bd5a1780684e9f31081949790 Parents: 3900a41 Author: nishadiAuthored: Mon Jun 19 17:35:44 2017 +0530 Committer: nishadi Committed: Mon Jun 19 17:35:44 2017 +0530 -- .../gora/aerospike/store/AerospikeMapping.java | 13 ++ .../store/AerospikeMappingBuilder.java | 165 ++- .../gora/aerospike/store/AerospikeStore.java| 76 - 3 files changed, 132 insertions(+), 122 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/b0c19774/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMapping.java -- diff --git a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMapping.java b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMapping.java index 5df8a92..ae8284d 100644 --- a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMapping.java +++ b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMapping.java @@ -19,15 +19,20 @@ package org.apache.gora.aerospike.store; import com.aerospike.client.policy.Policy; import com.aerospike.client.policy.WritePolicy; +import java.util.HashMap; +import java.util.Map; + public class AerospikeMapping { private String namespace; private String set; private WritePolicy writePolicy; private Policy readPolicy; + private Map binMapping; public AerospikeMapping() { writePolicy = new WritePolicy(); readPolicy = new Policy(); +binMapping = new HashMap<>(); } public String getNamespace() { @@ -61,4 +66,12 @@ public class AerospikeMapping { public void setReadPolicy(Policy readPolicy) { this.readPolicy = readPolicy; } + + public Map getBinMapping() { +return binMapping; + } + + public void setBinMapping(Map binMapping) { +this.binMapping = binMapping; + } } http://git-wip-us.apache.org/repos/asf/gora/blob/b0c19774/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 8744709..7b422f1 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 @@ -25,12 +25,14 @@ import org.jdom.Element; import org.jdom.input.SAXBuilder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; - +import org.jdom.JDOMException; import javax.naming.ConfigurationException; import java.io.IOException; import java.io.InputStream; import java.util.List; import java.util.Locale; +import java.util.Map; +import java.util.HashMap; public class AerospikeMappingBuilder { @@ -38,107 +40,108 @@ public class AerospikeMappingBuilder { private AerospikeMapping aerospikeMapping; - public AerospikeMappingBuilder(String mappingFile, Class keyClass, Class persistentClass) throws IOException { + public AerospikeMappingBuilder() throws IOException { this.aerospikeMapping = new AerospikeMapping(); -this.readMappingFile(mappingFile, keyClass, persistentClass); } public AerospikeMapping getAerospikeMapping() { return this.aerospikeMapping; } - private void readMappingFile(String fileName, Class keyClass, Class persistentClass) throws IOException { -try { - SAXBuilder saxBuilder = new SAXBuilder(); - InputStream inputStream = getClass().getClassLoader().getResourceAsStream(fileName); - if (inputStream == null) { -LOG.warn("Mapping file '" + fileName + "' could not be found!"); -throw new IOException("Mapping file '" + fileName + "' could not be found!"); - } - Document document = saxBuilder.build(inputStream); - if (document == null) { -LOG.warn("Mapping file '" + fileName + "' could not be found!"); -throw new IOException("Mapping file '" + fileName + "' could not be found!"); - } + public void readMappingFile(String mappingFile, Class keyClass, Class persistentClass) + throws IOException, JDOMException, ConfigurationException { - Element root =
[14/32] gora git commit: Add delete functionality for aerospike module
Add delete functionality for aerospike module Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/b61eeaf0 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/b61eeaf0 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/b61eeaf0 Branch: refs/heads/master Commit: b61eeaf0529f070ba19db904821b517a9e5528dc Parents: c72f418 Author: nishadiAuthored: Mon Jun 26 19:07:07 2017 +0530 Committer: nishadi Committed: Mon Jun 26 19:07:07 2017 +0530 -- .../gora/aerospike/store/AerospikeStore.java| 49 .../aerospike/store/TestAerospikeStore.java | 2 +- 2 files changed, 31 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/b61eeaf0/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java -- diff --git a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java index 5a880d6..66de783 100644 --- a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java +++ b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java @@ -143,16 +143,9 @@ public class AerospikeStore extends DataStoreBase extends DataStoreBase fields = persistent.getSchema().getFields(); for (int i = 0; i < fields.size(); i++) { @@ -204,9 +189,17 @@ public class AerospikeStore extends DataStoreBase extends DataStoreBasehttp://git-wip-us.apache.org/repos/asf/gora/blob/b61eeaf0/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 8b63414..9e93fb0 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 @@ -134,7 +134,7 @@ public class TestAerospikeStore extends DataStoreTestBase { } @Test - @Ignore("To be implemented") + @Ignore("Functionality is to be implemented in the next iteration as this incurs query execution") @Override public void testDelete() throws Exception { super.testDelete();
[10/32] gora git commit: Refactor code with comments, logging and exception handling
Refactor code with comments, logging and exception handling Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/d68be8df Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/d68be8df Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/d68be8df Branch: refs/heads/master Commit: d68be8dfb013d7f8d1e56c94d554166d6440de35 Parents: 00d392f Author: nishadiAuthored: Thu Jun 22 19:53:52 2017 +0530 Committer: nishadi Committed: Thu Jun 22 19:53:52 2017 +0530 -- gora-aerospike/pom.xml | 1 - .../gora/aerospike/store/AerospikeMapping.java | 6 +- .../store/AerospikeMappingBuilder.java | 224 +++ .../aerospike/store/AerospikeParameters.java| 111 ++--- .../gora/aerospike/store/AerospikeStore.java| 84 --- 5 files changed, 271 insertions(+), 155 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/d68be8df/gora-aerospike/pom.xml -- diff --git a/gora-aerospike/pom.xml b/gora-aerospike/pom.xml index ddf17a1..b15693e 100644 --- a/gora-aerospike/pom.xml +++ b/gora-aerospike/pom.xml @@ -50,7 +50,6 @@ -3.3.2 * org.apache.gora.aerospike*;version="${project.version}";-noimport:=true http://git-wip-us.apache.org/repos/asf/gora/blob/d68be8df/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMapping.java -- diff --git a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMapping.java b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMapping.java index 1a17241..cb000a0 100644 --- a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMapping.java +++ b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeMapping.java @@ -24,9 +24,13 @@ import java.util.Map; public class AerospikeMapping { private String namespace; + private String set; + private WritePolicy writePolicy; + private Policy readPolicy; + private Map binMapping; public AerospikeMapping() { @@ -75,7 +79,7 @@ public class AerospikeMapping { this.binMapping = binMapping; } - public String getBinName(String fieldName){ + public String getBinName(String fieldName) { return binMapping.get(fieldName); } } http://git-wip-us.apache.org/repos/asf/gora/blob/d68be8df/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 7b422f1..ca51c5d 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 @@ -1,4 +1,4 @@ -/** +/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -26,6 +26,7 @@ import org.jdom.input.SAXBuilder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.jdom.JDOMException; + import javax.naming.ConfigurationException; import java.io.IOException; import java.io.InputStream; @@ -36,11 +37,11 @@ import java.util.HashMap; public class AerospikeMappingBuilder { - public static final Logger LOG = LoggerFactory.getLogger(AerospikeMappingBuilder.class); + private static final Logger LOG = LoggerFactory.getLogger(AerospikeMappingBuilder.class); private AerospikeMapping aerospikeMapping; - public AerospikeMappingBuilder() throws IOException { + public AerospikeMappingBuilder() { this.aerospikeMapping = new AerospikeMapping(); } @@ -48,102 +49,125 @@ public class AerospikeMappingBuilder { return this.aerospikeMapping; } - public void readMappingFile(String mappingFile, Class keyClass, Class persistentClass) - throws IOException, JDOMException, ConfigurationException { + /** + * Reads the gora aerospike mapping file + * + * @param mappingFile mapping file path + * @param keyClasskey class + * @param persistentClass persistent class + */ + public void readMappingFile(String mappingFile, Class keyClass, Class persistentClass) { -SAXBuilder saxBuilder = new SAXBuilder(); -InputStream inputStream = getClass().getClassLoader().getResourceAsStream(mappingFile); -if (inputStream == null) { -
[07/32] gora git commit: Update aerospike mapping file to support field to bin value mapping
Update aerospike mapping file to support field to bin value mapping Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/13f252e5 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/13f252e5 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/13f252e5 Branch: refs/heads/master Commit: 13f252e525e103155502953ebdad1006909747ba Parents: b0c1977 Author: nishadiAuthored: Mon Jun 19 17:37:02 2017 +0530 Committer: nishadi Committed: Mon Jun 19 17:37:02 2017 +0530 -- gora-tutorial/conf/gora-aerospike-mapping.xml | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/13f252e5/gora-tutorial/conf/gora-aerospike-mapping.xml -- diff --git a/gora-tutorial/conf/gora-aerospike-mapping.xml b/gora-tutorial/conf/gora-aerospike-mapping.xml index 676f52c..aca18ca 100644 --- a/gora-tutorial/conf/gora-aerospike-mapping.xml +++ b/gora-tutorial/conf/gora-aerospike-mapping.xml @@ -24,7 +24,21 @@ - - + + + + + + + + + + + + + + + +
[22/32] gora git commit: Add persistent base dirty check
Add persistent base dirty check Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/390a4358 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/390a4358 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/390a4358 Branch: refs/heads/master Commit: 390a4358394c91b08ac7903d69689a62cc8c0fc8 Parents: c485f5b Author: nishadiAuthored: Sat Jul 22 08:13:40 2017 +0530 Committer: nishadi Committed: Sat Jul 22 08:13:40 2017 +0530 -- .../apache/gora/aerospike/store/AerospikeStore.java | 11 ++- .../gora/aerospike/store/TestAerospikeStore.java | 14 -- 2 files changed, 10 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/390a4358/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java -- diff --git a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java index dfa8ed9..56f2bdb 100644 --- a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java +++ b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java @@ -177,7 +177,14 @@ public class AerospikeStore extends DataStoreBase fields = persistent.getSchema().getFields(); + +if (aerospikeClient.exists(null, recordKey)) { + this.delete(key); +} for (int i = 0; i < fields.size(); i++) { + if (!persistent.isDirty(i)) { +continue; + } Object persistentValue = persistent.get(i); if (persistentValue != null) { String mappingBinName = aerospikeParameters.getAerospikeMapping().getBinMapping() @@ -269,7 +276,7 @@ public class AerospikeStore extends DataStoreBase extends DataStoreBase extends DataStoreBasehttp://git-wip-us.apache.org/repos/asf/gora/blob/390a4358/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 d88ea1a..9e38e4d 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 @@ -76,20 +76,6 @@ public class TestAerospikeStore extends DataStoreTestBase { } @Test - @Ignore("Functionality is to be implemented in the next iteration") - @Override - public void testUpdate() throws Exception { -super.testUpdate(); - } - - @Test - @Ignore("Functionality is to be implemented in the next iteration") - @Override - public void testEmptyUpdate() throws Exception { -super.testEmptyUpdate(); - } - - @Test @Override public void testQuery() throws Exception { // Clearing the test data in the database
[25/32] gora git commit: Update test driver properties for aerospike module
Update test driver properties for aerospike module Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/08fb5dd3 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/08fb5dd3 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/08fb5dd3 Branch: refs/heads/master Commit: 08fb5dd3465bf636093b056b059c8ce2deda42df Parents: 6ee55e9 Author: nishadiAuthored: Wed Jul 26 21:15:01 2017 +0530 Committer: nishadi Committed: Wed Jul 26 21:15:01 2017 +0530 -- .../java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/08fb5dd3/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java -- diff --git a/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java b/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java index 5a086d8..302f605 100644 --- a/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java +++ b/gora-aerospike/src/test/java/org/apache/gora/aerospike/GoraAerospikeTestDriver.java @@ -48,8 +48,8 @@ public class GoraAerospikeTestDriver extends GoraTestDriver { // Wait for the aerospike server to be started in the container Thread.sleep(5000); -properties.setProperty("server.ip", "localhost"); -properties.setProperty("server.port", aerospikeContainer.getMappedPort(3000).toString()); +properties.setProperty("gora.aerospikestore.server.ip", "localhost"); +properties.setProperty("gora.aerospikestore.server.port", aerospikeContainer.getMappedPort(3000).toString()); } @Override
[08/32] gora git commit: Update put method to support field mapping in aerospike module
Update put method to support field mapping in aerospike module Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/eae36f47 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/eae36f47 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/eae36f47 Branch: refs/heads/master Commit: eae36f4752f0e22465df552b1c8da1cb5db347fb Parents: 13f252e Author: nishadiAuthored: Mon Jun 19 21:55:15 2017 +0530 Committer: nishadi Committed: Tue Jun 20 17:33:36 2017 +0530 -- .../gora/aerospike/store/AerospikeStore.java | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/eae36f47/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java -- diff --git a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java index c452857..df2f38d 100644 --- a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java +++ b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java @@ -91,18 +91,21 @@ public class AerospikeStore extends DataStoreBase fields = value.getSchema().getFields(); - +List fields = persistent.getSchema().getFields(); for (int i = 0; i < fields.size(); i++) { - - // In retrieving the bin name, it is checked whether the server is single bin valued - String binName = aerospikeParameters.getBinName(fields.get(i).name()); - Bin bin = getBin(binName, value.get(i), fields.get(i)); + String mappingBinName = aerospikeParameters.getAerospikeMapping().getBinMapping() + .get(fields.get(i).name()); + if (mappingBinName == null) { +throw new RuntimeException( +"Aerospike mapping for field [" + persistent.getClass().getName() + "#" + fields +.get(i).name() + "] not found. Wrong gora-aerospike-mapping.xml?"); + } + Bin bin = getBin(mappingBinName, persistent.get(i), fields.get(i)); aerospikeClient .put(aerospikeParameters.getAerospikeMapping().getWritePolicy(), recordKey, bin); }
gora git commit: [GORA-517] Upgrade Mongodb Java Driver to version 3.5.0
Repository: gora Updated Branches: refs/heads/master 1500916bf -> a2a484054 [GORA-517] Upgrade Mongodb Java Driver to version 3.5.0 Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/a2a48405 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/a2a48405 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/a2a48405 Branch: refs/heads/master Commit: a2a4840549f7468500a8c903612b0383d0b7b975 Parents: 1500916 Author: Andrea CosentinoAuthored: Fri Aug 4 15:08:10 2017 +0200 Committer: Andrea Cosentino Committed: Fri Aug 4 15:08:10 2017 +0200 -- gora-mongodb/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/a2a48405/gora-mongodb/pom.xml -- diff --git a/gora-mongodb/pom.xml b/gora-mongodb/pom.xml index 56568b3..a0532c7 100644 --- a/gora-mongodb/pom.xml +++ b/gora-mongodb/pom.xml @@ -52,7 +52,7 @@ * org.apache.gora.mongodb*;version="${project.version}";-noimport:=true -3.4.2 +3.5.0 2.0.0
gora git commit: Update the policies as per the 4.0.6 aerospike java client
Repository: gora Updated Branches: refs/heads/master a2a484054 -> 170b62aea Update the policies as per the 4.0.6 aerospike java client Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/170b62ae Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/170b62ae Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/170b62ae Branch: refs/heads/master Commit: 170b62aeae48d2cff474edf0b275b0f2bb3a5f88 Parents: a2a4840 Author: nishadiAuthored: Mon Aug 7 19:23:32 2017 +0530 Committer: nishadi Committed: Mon Aug 7 20:07:15 2017 +0530 -- .../store/AerospikeMappingBuilder.java | 270 +-- .../aerospike/store/AerospikePolicyConst.java | 54 gora-tutorial/conf/gora-aerospike-mapping.xml | 4 +- 3 files changed, 246 insertions(+), 82 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/170b62ae/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 5973be8..795959d 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 @@ -19,6 +19,10 @@ package org.apache.gora.aerospike.store; import com.aerospike.client.policy.GenerationPolicy; import com.aerospike.client.policy.Policy; import com.aerospike.client.policy.RecordExistsAction; +import com.aerospike.client.policy.CommitLevel; +import com.aerospike.client.policy.Priority; +import com.aerospike.client.policy.ConsistencyLevel; +import com.aerospike.client.policy.Replica; import com.aerospike.client.policy.WritePolicy; import org.jdom.Document; import org.jdom.Element; @@ -31,7 +35,6 @@ import javax.naming.ConfigurationException; import java.io.IOException; import java.io.InputStream; import java.util.List; -import java.util.Locale; import java.util.Map; import java.util.HashMap; @@ -82,32 +85,67 @@ public class AerospikeMappingBuilder { String policy = policyElement.getAttributeValue("name"); if (policy != null) { - if (policy.equals("write")) { + + // Write Policies + if (policy.equals(AerospikePolicyConst.WRITE_POLICY_NAME)) { WritePolicy writePolicy = new WritePolicy(); -if (policyElement.getAttributeValue("gen") != null) { +if (policyElement.getAttributeValue(AerospikePolicyConst.GENERATION_POLICY_NAME) +!= null) { writePolicy.generationPolicy = getGenerationPolicyMapping( - policyElement.getAttributeValue("gen").toUpperCase(Locale.getDefault())); + policyElement.getAttributeValue(AerospikePolicyConst.GENERATION_POLICY_NAME)); +} +if (policyElement.getAttributeValue(AerospikePolicyConst.RECORD_EXISTS_ACTION_NAME) +!= null) { + writePolicy.recordExistsAction = getRecordExistsAction(policyElement + .getAttributeValue(AerospikePolicyConst.RECORD_EXISTS_ACTION_NAME)); } -if (policyElement.getAttributeValue("exists") != null) { - writePolicy.recordExistsAction = getRecordExistsAction( - policyElement.getAttributeValue("exists").toUpperCase(Locale.getDefault())); +if (policyElement.getAttributeValue(AerospikePolicyConst.COMMIT_LEVEL_NAME) != null) { + writePolicy.commitLevel = getCommitLevel( + policyElement.getAttributeValue(AerospikePolicyConst.COMMIT_LEVEL_NAME)); } -if (policyElement.getAttributeValue("key") != null) { - writePolicy.sendKey = getKeyUsagePolicy( - policyElement.getAttributeValue("key").toUpperCase(Locale.getDefault())); +if (policyElement.getAttributeValue(AerospikePolicyConst.DURABLE_DELETE_NAME) != null) { + writePolicy.durableDelete = isDurableDelete( + policyElement.getAttributeValue(AerospikePolicyConst.DURABLE_DELETE_NAME)); } -if (policyElement.getAttributeValue("timeout") != null) { - writePolicy.timeoutDelay = getTimeoutValue(policyElement.getAttributeValue("timeout")); +if (policyElement.getAttributeValue(AerospikePolicyConst.EXPIRATION_NAME) != null) { + writePolicy.expiration = getTimeDuration( +
gora git commit: Add support for connecting to authenticated servers in aerospike module
Repository: gora Updated Branches: refs/heads/master 170b62aea -> b26691806 Add support for connecting to authenticated servers in aerospike module Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/b2669180 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/b2669180 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/b2669180 Branch: refs/heads/master Commit: b26691806891840645059fa5e3a6c86f167f32cb Parents: 170b62a Author: nishadiAuthored: Mon Aug 7 21:32:49 2017 +0530 Committer: nishadi Committed: Wed Aug 9 17:44:13 2017 +0530 -- .../gora/aerospike/store/AerospikeParameters.java | 16 +++- .../apache/gora/aerospike/store/AerospikeStore.java | 8 gora-tutorial/conf/gora.properties | 6 ++ 3 files changed, 25 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/b2669180/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeParameters.java -- diff --git a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeParameters.java b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeParameters.java index 4fe61cd..e4aab26 100644 --- a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeParameters.java +++ b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeParameters.java @@ -33,7 +33,7 @@ public class AerospikeParameters { private int port; - private String user; + private String username; private String password; @@ -46,6 +46,10 @@ public class AerospikeParameters { private static final String AS_SERVER_PORT = "gora.aerospikestore.server.port"; + private static final String AS_SERVER_USERNAME = "gora.aerospikestore.server.username"; + + private static final String AS_SERVER_PASSWORD = "gora.aerospikestore.server.password"; + // Default property values private static final String DEFAULT_SERVER_IP = "localhost"; @@ -63,6 +67,8 @@ public class AerospikeParameters { this.aerospikeMapping = aerospikeMapping; this.host = properties.getProperty(AS_SERVER_IP, DEFAULT_SERVER_IP); this.port = Integer.parseInt(properties.getProperty(AS_SERVER_PORT, DEFAULT_SERVER_PORT)); +this.username = properties.getProperty(AS_SERVER_USERNAME, null); +this.password = properties.getProperty(AS_SERVER_PASSWORD, null); } public String getHost() { @@ -81,12 +87,12 @@ public class AerospikeParameters { this.port = port; } - public String getUser() { -return user; + public String getUsername() { +return username; } - public void setUser(String user) { -this.user = user; + public void setUsername(String username) { +this.username = username; } public String getPassword() { http://git-wip-us.apache.org/repos/asf/gora/blob/b2669180/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java -- diff --git a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java index 8bd8d9f..6775167 100644 --- a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java +++ b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java @@ -95,6 +95,14 @@ public class AerospikeStore extends DataStoreBasehttp://git-wip-us.apache.org/repos/asf/gora/blob/b2669180/gora-tutorial/conf/gora.properties -- diff --git a/gora-tutorial/conf/gora.properties b/gora-tutorial/conf/gora.properties index 439755e..be8421e 100644 --- a/gora-tutorial/conf/gora.properties +++ b/gora-tutorial/conf/gora.properties @@ -60,3 +60,9 @@ gora.datastore.jcache.provider=com.hazelcast.cache.impl.HazelcastServerCachingPr #gora.datastore.jcache.provider=com.hazelcast.client.cache.impl.HazelcastClientCachingProvider #gora.datastore.jcache.hazelcast.config=hazelcast-client.xml gora.datastore.jcache.hazelcast.config=hazelcast.xml + +##Aerospike dataStore properties +#gora.aerospikestore.server.ip=localhost +#gora.aerospikestore.server.port=3000 +#gora.aerospikestore.server.username= +#gora.aerospikestore.server.password=
gora git commit: Update aerospike java client and remove unsupported policies
Repository: gora Updated Branches: refs/heads/master 0e8b046e3 -> 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/master Commit: 1500916bf165064d370c3583a19350010a88e2a1 Parents: 0e8b046 Author: nishadiAuthored: Fri Jul 28 01:43:13 2017 +0530 Committer: nishadi 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 @@ 2.3.1 1.4.1 -3.3.2 +4.0.6 13.0 2.6
gora git commit: Add support to retrieve partitions in aerospike module
Repository: gora Updated Branches: refs/heads/master b26691806 -> 460f9f5b0 Add support to retrieve partitions in aerospike module Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/460f9f5b Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/460f9f5b Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/460f9f5b Branch: refs/heads/master Commit: 460f9f5b0f30b4ddd5d568ea4c381779e9dcf6f3 Parents: b266918 Author: nishadiAuthored: Sun Aug 13 19:47:51 2017 +0530 Committer: nishadi Committed: Sun Aug 13 19:47:51 2017 +0530 -- .../gora/aerospike/store/AerospikeStore.java| 15 +++- .../aerospike/store/TestAerospikeStore.java | 85 +--- 2 files changed, 53 insertions(+), 47 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/460f9f5b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java -- diff --git a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java index 6775167..0d5e23f 100644 --- a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java +++ b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java @@ -45,6 +45,7 @@ import org.apache.gora.persistency.impl.PersistentBase; import org.apache.gora.query.PartitionQuery; import org.apache.gora.query.Query; import org.apache.gora.query.Result; +import org.apache.gora.query.impl.PartitionQueryImpl; import org.apache.gora.store.impl.DataStoreBase; import org.apache.gora.util.AvroUtils; import org.slf4j.Logger; @@ -322,11 +323,21 @@ public class AerospikeStore extends DataStoreBase> getPartitions(Query query) throws IOException { -return null; +List > partitions = new ArrayList<>(); +PartitionQueryImpl partitionQuery = new PartitionQueryImpl<>( +query); +partitionQuery.setConf(getConf()); +partitions.add(partitionQuery); +return partitions; } @Override http://git-wip-us.apache.org/repos/asf/gora/blob/460f9f5b/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 c1b4e2d..df85258 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 @@ -61,27 +61,6 @@ public class TestAerospikeStore extends DataStoreTestBase { } @Test - @Ignore("Explicit schema creation related functionality is not supported in Aerospike") - @Override - public void testTruncateSchema() throws Exception { -super.testTruncateSchema(); - } - - @Test - @Ignore("Explicit schema creation related functionality is not supported in Aerospike") - @Override - public void testDeleteSchema() throws Exception { -super.testDeleteSchema(); - } - - @Test - @Ignore("Explicit schema creation related functionality is not supported in Aerospike") - @Override - public void testSchemaExists() throws Exception { -super.testSchemaExists(); - } - - @Test @Override public void testQuery() throws Exception { // Clearing the test data in the database @@ -94,27 +73,6 @@ public class TestAerospikeStore extends DataStoreTestBase { } @Test - @Ignore("Query key ranges based on primary key is not supported via the java client") - @Override - public void testQueryStartKey() throws Exception { -super.testQueryStartKey(); - } - - @Test - @Ignore("Query key ranges based on primary key is not supported via the java client") - @Override - public void testQueryEndKey() throws Exception { -super.testQueryEndKey(); - } - - @Test - @Ignore("Query key ranges based on primary key is not supported via the java client") - @Override - public void testQueryKeyRange() throws Exception { -super.testQueryKeyRange(); - } - - @Test @Override public void testDelete() throws Exception { // Clearing the test data in the database @@ -156,11 +114,48 @@ public class TestAerospikeStore extends DataStoreTestBase { webPageStore.truncateSchema(); } + // Unsupported functionality due to the limitations in Aerospike java client + + @Test + @Ignore("Explicit schema creation related functionality is not supported in Aerospike") + @Override + public void
[1/2] gora git commit: GORA-310: Fix partial field delete in solr
Repository: gora Updated Branches: refs/heads/master 3a2e1ccfe -> 976a5c1db GORA-310: Fix partial field delete in solr Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/9b632c5e Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/9b632c5e Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/9b632c5e Branch: refs/heads/master Commit: 9b632c5e1a951fbf06126063a3cee9ed65bea9a9 Parents: 3a2e1cc Author: madhawa-gunasekaraAuthored: Wed May 10 16:17:36 2017 +0530 Committer: madhawa-gunasekara Committed: Wed May 10 20:07:19 2017 +0530 -- .../org/apache/gora/solr/store/SolrStore.java | 44 +--- .../apache/gora/solr/store/TestSolrStore.java | 76 ++-- 2 files changed, 105 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/9b632c5e/gora-solr-5/src/main/java/org/apache/gora/solr/store/SolrStore.java -- diff --git a/gora-solr-5/src/main/java/org/apache/gora/solr/store/SolrStore.java b/gora-solr-5/src/main/java/org/apache/gora/solr/store/SolrStore.java index 5d34cf0..9303f76 100644 --- a/gora-solr-5/src/main/java/org/apache/gora/solr/store/SolrStore.java +++ b/gora-solr-5/src/main/java/org/apache/gora/solr/store/SolrStore.java @@ -17,11 +17,7 @@ package org.apache.gora.solr.store; import java.io.IOException; import java.net.MalformedURLException; import java.nio.ByteBuffer; -import java.util.ArrayList; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.Properties; +import java.util.*; import java.util.concurrent.ConcurrentHashMap; import org.apache.avro.Schema; @@ -741,11 +737,41 @@ public class SolrStore extends DataStoreBase @Override public long deleteByQuery(Query query) { -String q = ((SolrQuery ) query).toSolrQuery(); +UpdateResponse rsp; try { - UpdateResponse rsp = server.deleteByQuery(q); - server.commit(); - LOG.info(rsp.toString()); + /* +In this If block we check whether, user needs to delete full document or some fields in the document. We can't delete fields in a document by using solr deleteByQuery method. +therefore what we have done here is setting the particular fields values into null. + */ + if (query.getFields() != null && query.getFields().length < mapping.mapping.size() && !(Arrays.asList(query.getFields()).contains(mapping.getPrimaryKey( { +Result result = query.execute(); +Map partialUpdateNull = new HashMap<>(); +partialUpdateNull.put("set", null); +while (result.next()) { + SolrInputDocument inputDoc = new SolrInputDocument(); + inputDoc.setField(mapping.getPrimaryKey(), result.getKey()); + for (String field : query.getFields()) { +inputDoc.setField(field, partialUpdateNull); + } + batch.add(inputDoc); +} +if (commitWithin == 0) { + rsp = server.add(batch); + server.commit(false, true, true); + batch.clear(); + LOG.info(rsp.toString()); +} else { + rsp = server.add(batch, commitWithin); + batch.clear(); + LOG.info(rsp.toString()); +} + } else { +SolrQuery solrQuery = (SolrQuery ) query; +String q = solrQuery.toSolrQuery(); +rsp = server.deleteByQuery(q); +server.commit(); +LOG.info(rsp.toString()); + } } catch (Exception e) { LOG.error(e.getMessage(), e); } http://git-wip-us.apache.org/repos/asf/gora/blob/9b632c5e/gora-solr-5/src/test/java/org/apache/gora/solr/store/TestSolrStore.java -- diff --git a/gora-solr-5/src/test/java/org/apache/gora/solr/store/TestSolrStore.java b/gora-solr-5/src/test/java/org/apache/gora/solr/store/TestSolrStore.java index da33e6b..4c86e1c 100644 --- a/gora-solr-5/src/test/java/org/apache/gora/solr/store/TestSolrStore.java +++ b/gora-solr-5/src/test/java/org/apache/gora/solr/store/TestSolrStore.java @@ -17,17 +17,30 @@ */ package org.apache.gora.solr.store; -import java.io.IOException; - +import org.apache.gora.examples.WebPageDataCreator; import org.apache.gora.examples.generated.Employee; import org.apache.gora.examples.generated.WebPage; +import org.apache.gora.query.Query; import org.apache.gora.solr.GoraSolrTestDriver; import org.apache.gora.store.DataStore; import org.apache.gora.store.DataStoreFactory; import org.apache.gora.store.DataStoreTestBase; -import org.junit.Ignore; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import
[2/2] gora git commit: Fix imports properly in SolrStore
Fix imports properly in SolrStore Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/976a5c1d Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/976a5c1d Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/976a5c1d Branch: refs/heads/master Commit: 976a5c1db12d61ac2345f5aa6afcda8c1f3f4ed8 Parents: 9b632c5 Author: madhawa-gunasekaraAuthored: Wed May 10 23:44:26 2017 +0530 Committer: madhawa-gunasekara Committed: Wed May 10 23:44:26 2017 +0530 -- .../src/main/java/org/apache/gora/solr/store/SolrStore.java | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/976a5c1d/gora-solr-5/src/main/java/org/apache/gora/solr/store/SolrStore.java -- diff --git a/gora-solr-5/src/main/java/org/apache/gora/solr/store/SolrStore.java b/gora-solr-5/src/main/java/org/apache/gora/solr/store/SolrStore.java index 9303f76..ac44a06 100644 --- a/gora-solr-5/src/main/java/org/apache/gora/solr/store/SolrStore.java +++ b/gora-solr-5/src/main/java/org/apache/gora/solr/store/SolrStore.java @@ -17,7 +17,13 @@ package org.apache.gora.solr.store; import java.io.IOException; import java.net.MalformedURLException; import java.nio.ByteBuffer; -import java.util.*; +import java.util.Arrays; +import java.util.ArrayList; +import java.util.List; +import java.util.Locale; +import java.util.HashMap; +import java.util.Map; +import java.util.Properties; import java.util.concurrent.ConcurrentHashMap; import org.apache.avro.Schema;
[11/20] gora git commit: Remove old solr module and Rename solr5 module into solr module
http://git-wip-us.apache.org/repos/asf/gora/blob/3b2f282d/gora-solr/src/test/java/org/apache/gora/solr/store/package-info.java -- diff --git a/gora-solr/src/test/java/org/apache/gora/solr/store/package-info.java b/gora-solr/src/test/java/org/apache/gora/solr/store/package-info.java new file mode 100644 index 000..2b49c8b --- /dev/null +++ b/gora-solr/src/test/java/org/apache/gora/solr/store/package-info.java @@ -0,0 +1,21 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ +/** + * This package contains all the unit tests for basic CRUD operations + * functionality of the Solr dataStore. + */ +package org.apache.gora.solr.store; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/gora/blob/3b2f282d/pom.xml -- diff --git a/pom.xml b/pom.xml index 69178b9..3e6298a 100644 --- a/pom.xml +++ b/pom.xml @@ -729,8 +729,7 @@ gora-maven-plugin gora-mongodb - -gora-solr-5 +gora-solr gora-tutorial sources-dist @@ -753,10 +752,8 @@ 2.0.2 1.1-4 -4.10.3 -4.10.3 -6.5.1 -6.5.1 +6.5.1 +6.5.1 9.3.14.v20161028 1.12 4.4.1
[08/20] gora git commit: Add managed schema tests
http://git-wip-us.apache.org/repos/asf/gora/blob/a4b26e6c/gora-solr-5/src/test/conf/solr6/WebPage/conf/solrconfig.xml -- diff --git a/gora-solr-5/src/test/conf/solr6/WebPage/conf/solrconfig.xml b/gora-solr-5/src/test/conf/solr6/WebPage/conf/solrconfig.xml new file mode 100644 index 000..a75b607 --- /dev/null +++ b/gora-solr-5/src/test/conf/solr6/WebPage/conf/solrconfig.xml @@ -0,0 +1,1411 @@ + + + + + + + + + 6.5.1 + + + + + + + + + + + + + + + + + + + + ${solr.data.dir:} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +${solr.lock.type:native} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${solr.ulog.dir:} + ${solr.ulog.numVersionBuckets:65536} + + + + + ${solr.autoCommit.maxTime:15000} + false + + + + + + ${solr.autoSoftCommit.maxTime:-1} + + + + + + + + + + + + + + + +1024 + + + + + + + + + + + + + + + + + + + + + + + + +true + + + + + +20 + + +200 + + + + + + + + + + + + + + + +false + + + + + + + + + + + + + + + + + + + + + + + explicit + 10 + + + + + + + + + + + + + + + explicit + json + true + + + + + + + + explicit + + + + + + _text_ + + + + + + + + + true + ignored_ + _text_ + + + + + + + +text_general + + + + + + default + _text_ + solr.DirectSolrSpellChecker + + internal + + 0.5 + + 2 + + 1 + + 5 + + 4 + + 0.01 + + + + + + + + + + + + default + on + true + 10 + 5 + 5 + true + true + 10 + 5 + + + spellcheck + + + + + + + + + + true + + + tvComponent + + + + + + + + + + + + true + false + + + terms + + + + + + + +string +elevate.xml + + + + + + explicit + + + elevator + + + + + + + + + + + 100 + + + + + + + + 70 + + 0.5 + + [-\w ,/\n\]{20,200} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10 + .,!? + + + + + + + WORD + + + en + US + + + + + + + + + + + + + + [^\w-\.] + _ + + + + + + + + + + + + + + + + + + + + + + + + + + +text/plain; charset=UTF-8 + + + + +${velocity.template.base.dir:} +${velocity.solr.resource.loader.enabled:true} +${velocity.params.resource.loader.enabled:false} + + + + +5 + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/gora/blob/a4b26e6c/gora-solr-5/src/test/conf/solr6/WebPage/conf/stopwords.txt -- diff --git a/gora-solr-5/src/test/conf/solr6/WebPage/conf/stopwords.txt b/gora-solr-5/src/test/conf/solr6/WebPage/conf/stopwords.txt new file mode 100644 index 000..25b47f6 --- /dev/null +++ b/gora-solr-5/src/test/conf/solr6/WebPage/conf/stopwords.txt @@ -0,0 +1,14 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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.
[15/20] gora git commit: Remove old solr module and Rename solr5 module into solr module
http://git-wip-us.apache.org/repos/asf/gora/blob/3b2f282d/gora-solr-5/src/test/conf/solr/WebPage/conf/synonyms.txt -- diff --git a/gora-solr-5/src/test/conf/solr/WebPage/conf/synonyms.txt b/gora-solr-5/src/test/conf/solr/WebPage/conf/synonyms.txt deleted file mode 100644 index f00294b..000 --- a/gora-solr-5/src/test/conf/solr/WebPage/conf/synonyms.txt +++ /dev/null @@ -1,29 +0,0 @@ -# The ASF licenses this file to You 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. - -#--- -#some test synonym mappings unlikely to appear in real input text -aaafoo => aaabar -bbbfoo => bbbfoo ar -cccfoo => cccbar cccbaz -fooaaa,baraaa,bazaaa - -# Some synonym groups specific to this example -GB,gib,gigabyte,gigabytes -MB,mib,megabyte,megabytes -Television, Televisions, TV, TVs -#notice we use "gib" instead of "GiB" so any WordDelimiterFilter coming -#after us won't split it into two words. - -# Synonym mappings can be used for spelling correction too -pixima => pixma - http://git-wip-us.apache.org/repos/asf/gora/blob/3b2f282d/gora-solr-5/src/test/conf/solr/collection1/conf/schema.xml -- diff --git a/gora-solr-5/src/test/conf/solr/collection1/conf/schema.xml b/gora-solr-5/src/test/conf/solr/collection1/conf/schema.xml deleted file mode 100644 index 77465c4..000 --- a/gora-solr-5/src/test/conf/solr/collection1/conf/schema.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - id - - - - - - http://git-wip-us.apache.org/repos/asf/gora/blob/3b2f282d/gora-solr-5/src/test/conf/solr/collection1/conf/solrconfig.xml -- diff --git a/gora-solr-5/src/test/conf/solr/collection1/conf/solrconfig.xml b/gora-solr-5/src/test/conf/solr/collection1/conf/solrconfig.xml deleted file mode 100644 index cd05f61..000 --- a/gora-solr-5/src/test/conf/solr/collection1/conf/solrconfig.xml +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - 6.5.1 - ${solr.data.dir:} - - - - -${solr.lock.type:native} - - - - - - - ${solr.ulog.dir:} - - - 15000 - false - - - - -1024 - - - -true -20 -200 - - - - - - - - static firstSearcher warming in solrconfig.xml - - - -false -2 - - - - - - - - - - explicit - 10 - id - - - - - - explicit - json - true - id - - - - - - true - json - true - - - - - - http://git-wip-us.apache.org/repos/asf/gora/blob/3b2f282d/gora-solr-5/src/test/conf/solr/collection1/core.properties -- diff --git a/gora-solr-5/src/test/conf/solr/collection1/core.properties b/gora-solr-5/src/test/conf/solr/collection1/core.properties deleted file mode 100644 index 4f7a094..000 --- a/gora-solr-5/src/test/conf/solr/collection1/core.properties +++ /dev/null @@ -1,18 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You 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. -# - -name=collection1 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/gora/blob/3b2f282d/gora-solr-5/src/test/conf/solr/solr.xml -- diff --git a/gora-solr-5/src/test/conf/solr/solr.xml b/gora-solr-5/src/test/conf/solr/solr.xml deleted file mode 100644 index be78e1f..000 --- a/gora-solr-5/src/test/conf/solr/solr.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - -
[04/20] gora git commit: Fix code reviews
http://git-wip-us.apache.org/repos/asf/gora/blob/c506f44f/gora-solr-5/src/test/conf/solr-managed-schema/collection1/conf/solrconfig.xml -- diff --git a/gora-solr-5/src/test/conf/solr-managed-schema/collection1/conf/solrconfig.xml b/gora-solr-5/src/test/conf/solr-managed-schema/collection1/conf/solrconfig.xml new file mode 100644 index 000..d212403 --- /dev/null +++ b/gora-solr-5/src/test/conf/solr-managed-schema/collection1/conf/solrconfig.xml @@ -0,0 +1,1403 @@ + + + + + + + + + 6.5.1 + + + + + + + + + + + + + + + + + + + + ${solr.data.dir:} + + + + + + + + + + + + + + + + + + + + + + + + + + + + +${solr.lock.type:native} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${solr.ulog.dir:} + ${solr.ulog.numVersionBuckets:65536} + + + + + ${solr.autoCommit.maxTime:15000} + false + + + + + + ${solr.autoSoftCommit.maxTime:-1} + + + + + + + + + + + + + + + +1024 + + + + + + + + + + + + + + + + + + + + + + + + +true + + + + + +20 + + +200 + + + + + + + + + + + + + + + +false + + + + + + + + + + + + + + + + + + + + + + + explicit + 10 + + + + + + + + + + + + + + + explicit + json + true + + + + + + + + explicit + + + + + + _text_ + + + + + + + + + true + ignored_ + _text_ + + + + + + + +text_general + + + + + + default + _text_ + solr.DirectSolrSpellChecker + + internal + + 0.5 + + 2 + + 1 + + 5 + + 4 + + 0.01 + + + + + + + + + + + + default + on + true + 10 + 5 + 5 + true + true + 10 + 5 + + + spellcheck + + + + + + + + + + true + + + tvComponent + + + + + + + + + + + + true + false + + + terms + + + + + + + +string +elevate.xml + + + + + + explicit + + + elevator + + + + + + + + + + + 100 + + + + + + + + 70 + + 0.5 + + [-\w ,/\n\]{20,200} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10 + .,!? + + + + + + + WORD + + + en + US + + + + + + + + + + + + + + [^\w-\.] + _ + + + + + + + + + + + + + + + + + + + + + + + + + + + +${velocity.template.base.dir:} +${velocity.solr.resource.loader.enabled:true} +${velocity.params.resource.loader.enabled:false} + + + + +5 + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/gora/blob/c506f44f/gora-solr-5/src/test/conf/solr-managed-schema/collection1/core.properties -- diff --git a/gora-solr-5/src/test/conf/solr-managed-schema/collection1/core.properties b/gora-solr-5/src/test/conf/solr-managed-schema/collection1/core.properties new file mode 100644 index 000..4f7a094 --- /dev/null +++ b/gora-solr-5/src/test/conf/solr-managed-schema/collection1/core.properties @@ -0,0 +1,18 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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 +#
[16/20] gora git commit: Remove old solr module and Rename solr5 module into solr module
http://git-wip-us.apache.org/repos/asf/gora/blob/3b2f282d/gora-solr-5/src/test/conf/solr-managed-schema/collection1/conf/solrconfig.xml -- diff --git a/gora-solr-5/src/test/conf/solr-managed-schema/collection1/conf/solrconfig.xml b/gora-solr-5/src/test/conf/solr-managed-schema/collection1/conf/solrconfig.xml deleted file mode 100644 index d212403..000 --- a/gora-solr-5/src/test/conf/solr-managed-schema/collection1/conf/solrconfig.xml +++ /dev/null @@ -1,1403 +0,0 @@ - - - - - - - - - 6.5.1 - - - - - - - - - - - - - - - - - - - - ${solr.data.dir:} - - - - - - - - - - - - - - - - - - - - - - - - - - - - -${solr.lock.type:native} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${solr.ulog.dir:} - ${solr.ulog.numVersionBuckets:65536} - - - - - ${solr.autoCommit.maxTime:15000} - false - - - - - - ${solr.autoSoftCommit.maxTime:-1} - - - - - - - - - - - - - - - -1024 - - - - - - - - - - - - - - - - - - - - - - - - -true - - - - - -20 - - -200 - - - - - - - - - - - - - - - -false - - - - - - - - - - - - - - - - - - - - - - - explicit - 10 - - - - - - - - - - - - - - - explicit - json - true - - - - - - - - explicit - - - - - - _text_ - - - - - - - - - true - ignored_ - _text_ - - - - - - - -text_general - - - - - - default - _text_ - solr.DirectSolrSpellChecker - - internal - - 0.5 - - 2 - - 1 - - 5 - - 4 - - 0.01 - - - - - - - - - - - - default - on - true - 10 - 5 - 5 - true - true - 10 - 5 - - - spellcheck - - - - - - - - - - true - - - tvComponent - - - - - - - - - - - - true - false - - - terms - - - - - - - -string -elevate.xml - - - - - - explicit - - - elevator - - - - - - - - - - - 100 - - - - - - - - 70 - - 0.5 - - [-\w ,/\n\]{20,200} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 10 - .,!? - - - - - - - WORD - - - en - US - - - - - - - - - - - - - - [^\w-\.] - _ - - - - - - - - - - - - - - - - - - - - - - - - - - - -${velocity.template.base.dir:} -${velocity.solr.resource.loader.enabled:true} -${velocity.params.resource.loader.enabled:false} - - - - -5 - - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/gora/blob/3b2f282d/gora-solr-5/src/test/conf/solr-managed-schema/collection1/core.properties -- diff --git a/gora-solr-5/src/test/conf/solr-managed-schema/collection1/core.properties b/gora-solr-5/src/test/conf/solr-managed-schema/collection1/core.properties deleted file mode 100644 index 4f7a094..000 --- a/gora-solr-5/src/test/conf/solr-managed-schema/collection1/core.properties +++ /dev/null @@ -1,18 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You 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 -#
[19/20] gora git commit: Remove old solr module and Rename solr5 module into solr module
Remove old solr module and Rename solr5 module into solr module Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/3b2f282d Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/3b2f282d Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/3b2f282d Branch: refs/heads/master Commit: 3b2f282dd68e6e3bae74c43fdd0b42039a9193d1 Parents: c506f44 Author: madhawa-gunasekaraAuthored: Tue May 30 01:18:37 2017 +0530 Committer: madhawa-gunasekara Committed: Sun Jun 4 20:16:48 2017 +0530 -- gora-solr-5/pom.xml | 320 .../java/org/apache/gora/solr/package-info.java | 20 - .../org/apache/gora/solr/query/SolrQuery.java | 80 - .../org/apache/gora/solr/query/SolrResult.java | 121 -- .../apache/gora/solr/query/package-info.java| 21 - .../org/apache/gora/solr/store/SolrMapping.java | 58 - .../org/apache/gora/solr/store/SolrStore.java | 841 --- .../apache/gora/solr/store/package-info.java| 20 - gora-solr-5/src/test/conf/gora-solr-mapping.xml | 40 - gora-solr-5/src/test/conf/gora.properties | 21 - gora-solr-5/src/test/conf/log4j.properties | 35 - .../Employee/conf/elevate.xml | 42 - .../Employee/conf/lang/stopwords_en.txt | 54 - .../Employee/conf/managed-schema| 33 - .../Employee/conf/protwords.txt | 21 - .../Employee/conf/solrconfig.xml| 1411 -- .../Employee/conf/stopwords.txt | 14 - .../Employee/conf/synonyms.txt | 29 - .../WebPage/conf/elevate.xml| 42 - .../WebPage/conf/lang/stopwords_en.txt | 54 - .../WebPage/conf/managed-schema | 34 - .../WebPage/conf/protwords.txt | 21 - .../WebPage/conf/solrconfig.xml | 1411 -- .../WebPage/conf/stopwords.txt | 14 - .../WebPage/conf/synonyms.txt | 29 - .../collection1/conf/elevate.xml| 42 - .../collection1/conf/managed-schema | 26 - .../collection1/conf/solrconfig.xml | 1403 - .../collection1/core.properties | 18 - .../src/test/conf/solr-managed-schema/solr.xml | 53 - .../src/test/conf/solr-managed-schema/zoo.cfg | 35 - .../solr/Employee/conf/lang/stopwords_en.txt| 54 - .../test/conf/solr/Employee/conf/protwords.txt | 21 - .../src/test/conf/solr/Employee/conf/schema.xml | 45 - .../test/conf/solr/Employee/conf/solrconfig.xml | 107 -- .../test/conf/solr/Employee/conf/stopwords.txt | 14 - .../test/conf/solr/Employee/conf/synonyms.txt | 29 - .../solr/WebPage/conf/lang/stopwords_en.txt | 54 - .../test/conf/solr/WebPage/conf/protwords.txt | 21 - .../src/test/conf/solr/WebPage/conf/schema.xml | 46 - .../test/conf/solr/WebPage/conf/solrconfig.xml | 107 -- .../test/conf/solr/WebPage/conf/stopwords.txt | 14 - .../test/conf/solr/WebPage/conf/synonyms.txt| 29 - .../test/conf/solr/collection1/conf/schema.xml | 32 - .../conf/solr/collection1/conf/solrconfig.xml | 113 -- .../test/conf/solr/collection1/core.properties | 18 - gora-solr-5/src/test/conf/solr/solr.xml | 69 - gora-solr-5/src/test/conf/solr/zoo.cfg | 34 - .../solr/GoraSolrManagedSchemaTestDriver.java | 89 -- .../apache/gora/solr/GoraSolrTestDriver.java| 92 -- .../java/org/apache/gora/solr/package-info.java | 21 - .../solr/store/TestSolrManagedSchemaStore.java | 31 - .../apache/gora/solr/store/package-info.java| 21 - gora-solr/pom.xml | 90 +- .../java/org/apache/gora/solr/package-info.java | 20 + .../org/apache/gora/solr/query/SolrQuery.java | 22 +- .../org/apache/gora/solr/query/SolrResult.java | 22 +- .../apache/gora/solr/query/package-info.java| 21 + .../org/apache/gora/solr/store/SolrMapping.java |3 + .../org/apache/gora/solr/store/SolrStore.java | 117 +- .../apache/gora/solr/store/package-info.java| 20 + .../Employee/conf/elevate.xml | 42 + .../Employee/conf/lang/stopwords_en.txt | 54 + .../Employee/conf/managed-schema| 33 + .../Employee/conf/protwords.txt | 21 + .../Employee/conf/solrconfig.xml| 1411 ++ .../Employee/conf/synonyms.txt | 29 + .../WebPage/conf/elevate.xml| 42 + .../WebPage/conf/lang/stopwords_en.txt | 54 + .../WebPage/conf/managed-schema | 34 + .../WebPage/conf/protwords.txt | 21 + .../WebPage/conf/solrconfig.xml | 1411 ++ .../WebPage/conf/synonyms.txt |
[09/20] gora git commit: Add managed schema tests
Add managed schema tests Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/a4b26e6c Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/a4b26e6c Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/a4b26e6c Branch: refs/heads/master Commit: a4b26e6c8b320b88d6a802f653a30b5d971d58fa Parents: 47d6d67 Author: madhawaAuthored: Sun May 28 19:08:54 2017 +0530 Committer: madhawa-gunasekara Committed: Sun Jun 4 20:13:10 2017 +0530 -- .../test/conf/solr6/Employee/conf/elevate.xml | 42 + .../solr6/Employee/conf/lang/stopwords_en.txt | 54 + .../conf/solr6/Employee/conf/managed-schema | 16 + .../test/conf/solr6/Employee/conf/protwords.txt | 21 + .../conf/solr6/Employee/conf/solrconfig.xml | 1411 ++ .../test/conf/solr6/Employee/conf/stopwords.txt | 14 + .../test/conf/solr6/Employee/conf/synonyms.txt | 29 + .../test/conf/solr6/WebPage/conf/elevate.xml| 42 + .../solr6/WebPage/conf/lang/stopwords_en.txt| 54 + .../test/conf/solr6/WebPage/conf/managed-schema | 17 + .../test/conf/solr6/WebPage/conf/protwords.txt | 21 + .../test/conf/solr6/WebPage/conf/solrconfig.xml | 1411 ++ .../test/conf/solr6/WebPage/conf/stopwords.txt | 14 + .../test/conf/solr6/WebPage/conf/synonyms.txt | 29 + .../conf/solr6/collection1/conf/elevate.xml | 42 + .../conf/solr6/collection1/conf/managed-schema |9 + .../conf/solr6/collection1/conf/solrconfig.xml | 1403 + .../test/conf/solr6/collection1/core.properties |1 + .../solr6/collection1/data/index/segments_1 | Bin 0 -> 71 bytes .../solr6/collection1/data/index/write.lock |0 gora-solr-5/src/test/conf/solr6/solr.xml| 53 + gora-solr-5/src/test/conf/solr6/zoo.cfg | 17 + .../apache/gora/solr/GoraSolr6TestDriver.java | 72 + .../apache/gora/solr/GoraSolrTestDriver.java|5 +- .../apache/gora/solr/store/TestSolr6Store.java | 120 ++ 25 files changed, 4894 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/a4b26e6c/gora-solr-5/src/test/conf/solr6/Employee/conf/elevate.xml -- diff --git a/gora-solr-5/src/test/conf/solr6/Employee/conf/elevate.xml b/gora-solr-5/src/test/conf/solr6/Employee/conf/elevate.xml new file mode 100644 index 000..ed6a886 --- /dev/null +++ b/gora-solr-5/src/test/conf/solr6/Employee/conf/elevate.xml @@ -0,0 +1,42 @@ + + + + + + + + http://git-wip-us.apache.org/repos/asf/gora/blob/a4b26e6c/gora-solr-5/src/test/conf/solr6/Employee/conf/lang/stopwords_en.txt -- diff --git a/gora-solr-5/src/test/conf/solr6/Employee/conf/lang/stopwords_en.txt b/gora-solr-5/src/test/conf/solr6/Employee/conf/lang/stopwords_en.txt new file mode 100644 index 000..224230c --- /dev/null +++ b/gora-solr-5/src/test/conf/solr6/Employee/conf/lang/stopwords_en.txt @@ -0,0 +1,54 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. + +# a couple of test stopwords to test that the words are really being +# configured from this file: +stopworda +stopwordb + +# Standard english stop words taken from Lucene's StopAnalyzer +a +an +and +are +as +at +be +but +by +for +if +in +into +is +it +no +not +of +on +or +such +that +the +their +then +there +these +they +this +to +was +will +with http://git-wip-us.apache.org/repos/asf/gora/blob/a4b26e6c/gora-solr-5/src/test/conf/solr6/Employee/conf/managed-schema -- diff --git a/gora-solr-5/src/test/conf/solr6/Employee/conf/managed-schema b/gora-solr-5/src/test/conf/solr6/Employee/conf/managed-schema new file mode 100644 index 000..bf73c97 --- /dev/null +++ b/gora-solr-5/src/test/conf/solr6/Employee/conf/managed-schema @@ -0,0 +1,16 @@ + + + + ssn + + + + + + + + + + + + \ No newline at end of file
[18/20] gora git commit: Remove old solr module and Rename solr5 module into solr module
http://git-wip-us.apache.org/repos/asf/gora/blob/3b2f282d/gora-solr-5/src/test/conf/solr-managed-schema/Employee/conf/solrconfig.xml -- diff --git a/gora-solr-5/src/test/conf/solr-managed-schema/Employee/conf/solrconfig.xml b/gora-solr-5/src/test/conf/solr-managed-schema/Employee/conf/solrconfig.xml deleted file mode 100644 index a75b607..000 --- a/gora-solr-5/src/test/conf/solr-managed-schema/Employee/conf/solrconfig.xml +++ /dev/null @@ -1,1411 +0,0 @@ - - - - - - - - - 6.5.1 - - - - - - - - - - - - - - - - - - - - ${solr.data.dir:} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -${solr.lock.type:native} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${solr.ulog.dir:} - ${solr.ulog.numVersionBuckets:65536} - - - - - ${solr.autoCommit.maxTime:15000} - false - - - - - - ${solr.autoSoftCommit.maxTime:-1} - - - - - - - - - - - - - - - -1024 - - - - - - - - - - - - - - - - - - - - - - - - -true - - - - - -20 - - -200 - - - - - - - - - - - - - - - -false - - - - - - - - - - - - - - - - - - - - - - - explicit - 10 - - - - - - - - - - - - - - - explicit - json - true - - - - - - - - explicit - - - - - - _text_ - - - - - - - - - true - ignored_ - _text_ - - - - - - - -text_general - - - - - - default - _text_ - solr.DirectSolrSpellChecker - - internal - - 0.5 - - 2 - - 1 - - 5 - - 4 - - 0.01 - - - - - - - - - - - - default - on - true - 10 - 5 - 5 - true - true - 10 - 5 - - - spellcheck - - - - - - - - - - true - - - tvComponent - - - - - - - - - - - - true - false - - - terms - - - - - - - -string -elevate.xml - - - - - - explicit - - - elevator - - - - - - - - - - - 100 - - - - - - - - 70 - - 0.5 - - [-\w ,/\n\]{20,200} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 10 - .,!? - - - - - - - WORD - - - en - US - - - - - - - - - - - - - - [^\w-\.] - _ - - - - - - - - - - - - - - - - - - - - - - - - - - -text/plain; charset=UTF-8 - - - - -${velocity.template.base.dir:} -${velocity.solr.resource.loader.enabled:true} -${velocity.params.resource.loader.enabled:false} - - - - -5 - - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/gora/blob/3b2f282d/gora-solr-5/src/test/conf/solr-managed-schema/Employee/conf/stopwords.txt -- diff --git a/gora-solr-5/src/test/conf/solr-managed-schema/Employee/conf/stopwords.txt b/gora-solr-5/src/test/conf/solr-managed-schema/Employee/conf/stopwords.txt deleted file mode 100644 index 25b47f6..000 --- a/gora-solr-5/src/test/conf/solr-managed-schema/Employee/conf/stopwords.txt +++ /dev/null @@ -1,14 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You 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
[02/20] gora git commit: Fix code reviews
http://git-wip-us.apache.org/repos/asf/gora/blob/c506f44f/gora-solr-5/src/test/conf/solr6/WebPage/conf/solrconfig.xml -- diff --git a/gora-solr-5/src/test/conf/solr6/WebPage/conf/solrconfig.xml b/gora-solr-5/src/test/conf/solr6/WebPage/conf/solrconfig.xml deleted file mode 100644 index a75b607..000 --- a/gora-solr-5/src/test/conf/solr6/WebPage/conf/solrconfig.xml +++ /dev/null @@ -1,1411 +0,0 @@ - - - - - - - - - 6.5.1 - - - - - - - - - - - - - - - - - - - - ${solr.data.dir:} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -${solr.lock.type:native} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${solr.ulog.dir:} - ${solr.ulog.numVersionBuckets:65536} - - - - - ${solr.autoCommit.maxTime:15000} - false - - - - - - ${solr.autoSoftCommit.maxTime:-1} - - - - - - - - - - - - - - - -1024 - - - - - - - - - - - - - - - - - - - - - - - - -true - - - - - -20 - - -200 - - - - - - - - - - - - - - - -false - - - - - - - - - - - - - - - - - - - - - - - explicit - 10 - - - - - - - - - - - - - - - explicit - json - true - - - - - - - - explicit - - - - - - _text_ - - - - - - - - - true - ignored_ - _text_ - - - - - - - -text_general - - - - - - default - _text_ - solr.DirectSolrSpellChecker - - internal - - 0.5 - - 2 - - 1 - - 5 - - 4 - - 0.01 - - - - - - - - - - - - default - on - true - 10 - 5 - 5 - true - true - 10 - 5 - - - spellcheck - - - - - - - - - - true - - - tvComponent - - - - - - - - - - - - true - false - - - terms - - - - - - - -string -elevate.xml - - - - - - explicit - - - elevator - - - - - - - - - - - 100 - - - - - - - - 70 - - 0.5 - - [-\w ,/\n\]{20,200} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 10 - .,!? - - - - - - - WORD - - - en - US - - - - - - - - - - - - - - [^\w-\.] - _ - - - - - - - - - - - - - - - - - - - - - - - - - - -text/plain; charset=UTF-8 - - - - -${velocity.template.base.dir:} -${velocity.solr.resource.loader.enabled:true} -${velocity.params.resource.loader.enabled:false} - - - - -5 - - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/gora/blob/c506f44f/gora-solr-5/src/test/conf/solr6/WebPage/conf/stopwords.txt -- diff --git a/gora-solr-5/src/test/conf/solr6/WebPage/conf/stopwords.txt b/gora-solr-5/src/test/conf/solr6/WebPage/conf/stopwords.txt deleted file mode 100644 index 25b47f6..000 --- a/gora-solr-5/src/test/conf/solr6/WebPage/conf/stopwords.txt +++ /dev/null @@ -1,14 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You 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.
[10/20] gora git commit: GORA-509: Upgrade solr library to 6.5.1
GORA-509: Upgrade solr library to 6.5.1 Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/47d6d678 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/47d6d678 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/47d6d678 Branch: refs/heads/master Commit: 47d6d678e4ad80aae798060495b0ea9f5a7f05fb Parents: 25188aa Author: madhawaAuthored: Sun May 28 12:04:40 2017 +0530 Committer: madhawa-gunasekara Committed: Sun Jun 4 20:13:10 2017 +0530 -- gora-solr-5/pom.xml | 47 ++- pom.xml | 57 +++- 2 files changed, 97 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/47d6d678/gora-solr-5/pom.xml -- diff --git a/gora-solr-5/pom.xml b/gora-solr-5/pom.xml index 4009ffb..816d04a 100644 --- a/gora-solr-5/pom.xml +++ b/gora-solr-5/pom.xml @@ -34,7 +34,7 @@ * org.apache.gora.solr*;version="${project.version}";-noimport:=true -9.2.13.v20150730 +9.3.14.v20161028 @@ -220,6 +220,51 @@ jetty-webapp runtime + + org.eclipse.jetty + jetty-http + runtime + + + org.eclipse.jetty + jetty-io + runtime + + + org.eclipse.jetty + jetty-deploy + runtime + + + org.eclipse.jetty + jetty-continuation + runtime + + + org.eclipse.jetty + jetty-jmx + runtime + + + org.eclipse.jetty + jetty-rewrite + runtime + + + org.eclipse.jetty + jetty-security + runtime + + + org.eclipse.jetty + jetty-servlets + runtime + + + org.eclipse.jetty + jetty-xml + runtime + http://git-wip-us.apache.org/repos/asf/gora/blob/47d6d678/pom.xml -- diff --git a/pom.xml b/pom.xml index f3f3058..c48d33b 100644 --- a/pom.xml +++ b/pom.xml @@ -755,12 +755,12 @@ 4.10.3 4.10.3 -5.5.1 -5.5.1 -8.1.8.v20121106 +6.5.1 +6.5.1 +9.3.14.v20161028 1.7 -4.3.1 -2.4 +4.4.1 +2.5 2.3.1 1.4.1 @@ -1283,7 +1283,7 @@ org.apache.zookeeper zookeeper -3.4.5 +3.4.6 org.carrot2 @@ -1313,6 +1313,51 @@ org.eclipse.jetty +jetty-http +${jetty.version} + + +org.eclipse.jetty +jetty-io +${jetty.version} + + +org.eclipse.jetty +jetty-deploy +${jetty.version} + + +org.eclipse.jetty +jetty-continuation +${jetty.version} + + +org.eclipse.jetty +jetty-jmx +${jetty.version} + + +org.eclipse.jetty +jetty-rewrite +${jetty.version} + + +org.eclipse.jetty +jetty-security +${jetty.version} + + +org.eclipse.jetty +jetty-servlets +${jetty.version} + + +org.eclipse.jetty +jetty-xml +${jetty.version} + + +org.eclipse.jetty jetty-servlet ${jetty.version}
[06/20] gora git commit: Fix code reviews
Fix code reviews Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/c506f44f Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/c506f44f Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/c506f44f Branch: refs/heads/master Commit: c506f44f53f474b0ed7f1ffad47d087dace680a1 Parents: a4b26e6 Author: madhawa-gunasekaraAuthored: Mon May 29 21:50:55 2017 +0530 Committer: madhawa-gunasekara Committed: Sun Jun 4 20:13:10 2017 +0530 -- .../Employee/conf/elevate.xml | 42 + .../Employee/conf/lang/stopwords_en.txt | 54 + .../Employee/conf/managed-schema| 33 + .../Employee/conf/protwords.txt | 21 + .../Employee/conf/solrconfig.xml| 1411 ++ .../Employee/conf/stopwords.txt | 14 + .../Employee/conf/synonyms.txt | 29 + .../WebPage/conf/elevate.xml| 42 + .../WebPage/conf/lang/stopwords_en.txt | 54 + .../WebPage/conf/managed-schema | 34 + .../WebPage/conf/protwords.txt | 21 + .../WebPage/conf/solrconfig.xml | 1411 ++ .../WebPage/conf/stopwords.txt | 14 + .../WebPage/conf/synonyms.txt | 29 + .../collection1/conf/elevate.xml| 42 + .../collection1/conf/managed-schema | 26 + .../collection1/conf/solrconfig.xml | 1403 + .../collection1/core.properties | 18 + .../src/test/conf/solr-managed-schema/solr.xml | 53 + .../src/test/conf/solr-managed-schema/zoo.cfg | 35 + .../test/conf/solr/Employee/conf/solrconfig.xml |2 +- .../test/conf/solr/WebPage/conf/solrconfig.xml |2 +- .../conf/solr/collection1/conf/solrconfig.xml |2 +- .../test/conf/solr/collection1/core.properties | 17 + gora-solr-5/src/test/conf/solr/zoo.cfg | 17 + .../test/conf/solr6/Employee/conf/elevate.xml | 42 - .../solr6/Employee/conf/lang/stopwords_en.txt | 54 - .../conf/solr6/Employee/conf/managed-schema | 16 - .../test/conf/solr6/Employee/conf/protwords.txt | 21 - .../conf/solr6/Employee/conf/solrconfig.xml | 1411 -- .../test/conf/solr6/Employee/conf/stopwords.txt | 14 - .../test/conf/solr6/Employee/conf/synonyms.txt | 29 - .../test/conf/solr6/WebPage/conf/elevate.xml| 42 - .../solr6/WebPage/conf/lang/stopwords_en.txt| 54 - .../test/conf/solr6/WebPage/conf/managed-schema | 17 - .../test/conf/solr6/WebPage/conf/protwords.txt | 21 - .../test/conf/solr6/WebPage/conf/solrconfig.xml | 1411 -- .../test/conf/solr6/WebPage/conf/stopwords.txt | 14 - .../test/conf/solr6/WebPage/conf/synonyms.txt | 29 - .../conf/solr6/collection1/conf/elevate.xml | 42 - .../conf/solr6/collection1/conf/managed-schema |9 - .../conf/solr6/collection1/conf/solrconfig.xml | 1403 - .../test/conf/solr6/collection1/core.properties |1 - .../solr6/collection1/data/index/segments_1 | Bin 71 -> 0 bytes .../solr6/collection1/data/index/write.lock |0 gora-solr-5/src/test/conf/solr6/solr.xml| 53 - gora-solr-5/src/test/conf/solr6/zoo.cfg | 17 - .../apache/gora/solr/GoraSolr6TestDriver.java | 72 - .../solr/GoraSolrManagedSchemaTestDriver.java | 89 ++ .../apache/gora/solr/GoraSolrTestDriver.java| 13 +- .../apache/gora/solr/store/TestSolr6Store.java | 120 -- .../solr/store/TestSolrManagedSchemaStore.java | 31 + .../apache/gora/solr/store/TestSolrStore.java |4 +- pom.xml |2 +- 54 files changed, 4952 insertions(+), 4905 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/c506f44f/gora-solr-5/src/test/conf/solr-managed-schema/Employee/conf/elevate.xml -- diff --git a/gora-solr-5/src/test/conf/solr-managed-schema/Employee/conf/elevate.xml b/gora-solr-5/src/test/conf/solr-managed-schema/Employee/conf/elevate.xml new file mode 100644 index 000..ed6a886 --- /dev/null +++ b/gora-solr-5/src/test/conf/solr-managed-schema/Employee/conf/elevate.xml @@ -0,0 +1,42 @@ + + + + + + + + http://git-wip-us.apache.org/repos/asf/gora/blob/c506f44f/gora-solr-5/src/test/conf/solr-managed-schema/Employee/conf/lang/stopwords_en.txt -- diff --git a/gora-solr-5/src/test/conf/solr-managed-schema/Employee/conf/lang/stopwords_en.txt b/gora-solr-5/src/test/conf/solr-managed-schema/Employee/conf/lang/stopwords_en.txt new file mode 100644 index 000..224230c --- /dev/null +++
[01/20] gora git commit: Fix code reviews
Repository: gora Updated Branches: refs/heads/master 25188aacd -> 9e95efe2c http://git-wip-us.apache.org/repos/asf/gora/blob/c506f44f/gora-solr-5/src/test/conf/solr6/collection1/conf/solrconfig.xml -- diff --git a/gora-solr-5/src/test/conf/solr6/collection1/conf/solrconfig.xml b/gora-solr-5/src/test/conf/solr6/collection1/conf/solrconfig.xml deleted file mode 100644 index d212403..000 --- a/gora-solr-5/src/test/conf/solr6/collection1/conf/solrconfig.xml +++ /dev/null @@ -1,1403 +0,0 @@ - - - - - - - - - 6.5.1 - - - - - - - - - - - - - - - - - - - - ${solr.data.dir:} - - - - - - - - - - - - - - - - - - - - - - - - - - - - -${solr.lock.type:native} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${solr.ulog.dir:} - ${solr.ulog.numVersionBuckets:65536} - - - - - ${solr.autoCommit.maxTime:15000} - false - - - - - - ${solr.autoSoftCommit.maxTime:-1} - - - - - - - - - - - - - - - -1024 - - - - - - - - - - - - - - - - - - - - - - - - -true - - - - - -20 - - -200 - - - - - - - - - - - - - - - -false - - - - - - - - - - - - - - - - - - - - - - - explicit - 10 - - - - - - - - - - - - - - - explicit - json - true - - - - - - - - explicit - - - - - - _text_ - - - - - - - - - true - ignored_ - _text_ - - - - - - - -text_general - - - - - - default - _text_ - solr.DirectSolrSpellChecker - - internal - - 0.5 - - 2 - - 1 - - 5 - - 4 - - 0.01 - - - - - - - - - - - - default - on - true - 10 - 5 - 5 - true - true - 10 - 5 - - - spellcheck - - - - - - - - - - true - - - tvComponent - - - - - - - - - - - - true - false - - - terms - - - - - - - -string -elevate.xml - - - - - - explicit - - - elevator - - - - - - - - - - - 100 - - - - - - - - 70 - - 0.5 - - [-\w ,/\n\]{20,200} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 10 - .,!? - - - - - - - WORD - - - en - US - - - - - - - - - - - - - - [^\w-\.] - _ - - - - - - - - - - - - - - - - - - - - - - - - - - - -${velocity.template.base.dir:} -${velocity.solr.resource.loader.enabled:true} -${velocity.params.resource.loader.enabled:false} - - - - -5 - - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/gora/blob/c506f44f/gora-solr-5/src/test/conf/solr6/collection1/core.properties -- diff --git a/gora-solr-5/src/test/conf/solr6/collection1/core.properties b/gora-solr-5/src/test/conf/solr6/collection1/core.properties deleted file mode 100644 index bc0cf7d..000 --- a/gora-solr-5/src/test/conf/solr6/collection1/core.properties +++ /dev/null @@ -1 +0,0 @@ -name=collection1 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/gora/blob/c506f44f/gora-solr-5/src/test/conf/solr6/collection1/data/index/segments_1 -- diff --git a/gora-solr-5/src/test/conf/solr6/collection1/data/index/segments_1 b/gora-solr-5/src/test/conf/solr6/collection1/data/index/segments_1 deleted file mode 100644 index 78b612a..000 Binary files a/gora-solr-5/src/test/conf/solr6/collection1/data/index/segments_1 and /dev/null differ http://git-wip-us.apache.org/repos/asf/gora/blob/c506f44f/gora-solr-5/src/test/conf/solr6/collection1/data/index/write.lock -- diff --git a/gora-solr-5/src/test/conf/solr6/collection1/data/index/write.lock
[07/20] gora git commit: Add managed schema tests
http://git-wip-us.apache.org/repos/asf/gora/blob/a4b26e6c/gora-solr-5/src/test/conf/solr6/collection1/conf/solrconfig.xml -- diff --git a/gora-solr-5/src/test/conf/solr6/collection1/conf/solrconfig.xml b/gora-solr-5/src/test/conf/solr6/collection1/conf/solrconfig.xml new file mode 100644 index 000..d212403 --- /dev/null +++ b/gora-solr-5/src/test/conf/solr6/collection1/conf/solrconfig.xml @@ -0,0 +1,1403 @@ + + + + + + + + + 6.5.1 + + + + + + + + + + + + + + + + + + + + ${solr.data.dir:} + + + + + + + + + + + + + + + + + + + + + + + + + + + + +${solr.lock.type:native} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${solr.ulog.dir:} + ${solr.ulog.numVersionBuckets:65536} + + + + + ${solr.autoCommit.maxTime:15000} + false + + + + + + ${solr.autoSoftCommit.maxTime:-1} + + + + + + + + + + + + + + + +1024 + + + + + + + + + + + + + + + + + + + + + + + + +true + + + + + +20 + + +200 + + + + + + + + + + + + + + + +false + + + + + + + + + + + + + + + + + + + + + + + explicit + 10 + + + + + + + + + + + + + + + explicit + json + true + + + + + + + + explicit + + + + + + _text_ + + + + + + + + + true + ignored_ + _text_ + + + + + + + +text_general + + + + + + default + _text_ + solr.DirectSolrSpellChecker + + internal + + 0.5 + + 2 + + 1 + + 5 + + 4 + + 0.01 + + + + + + + + + + + + default + on + true + 10 + 5 + 5 + true + true + 10 + 5 + + + spellcheck + + + + + + + + + + true + + + tvComponent + + + + + + + + + + + + true + false + + + terms + + + + + + + +string +elevate.xml + + + + + + explicit + + + elevator + + + + + + + + + + + 100 + + + + + + + + 70 + + 0.5 + + [-\w ,/\n\]{20,200} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10 + .,!? + + + + + + + WORD + + + en + US + + + + + + + + + + + + + + [^\w-\.] + _ + + + + + + + + + + + + + + + + + + + + + + + + + + + +${velocity.template.base.dir:} +${velocity.solr.resource.loader.enabled:true} +${velocity.params.resource.loader.enabled:false} + + + + +5 + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/gora/blob/a4b26e6c/gora-solr-5/src/test/conf/solr6/collection1/core.properties -- diff --git a/gora-solr-5/src/test/conf/solr6/collection1/core.properties b/gora-solr-5/src/test/conf/solr6/collection1/core.properties new file mode 100644 index 000..bc0cf7d --- /dev/null +++ b/gora-solr-5/src/test/conf/solr6/collection1/core.properties @@ -0,0 +1 @@ +name=collection1 \ No newline at end of file http://git-wip-us.apache.org/repos/asf/gora/blob/a4b26e6c/gora-solr-5/src/test/conf/solr6/collection1/data/index/segments_1 -- diff --git a/gora-solr-5/src/test/conf/solr6/collection1/data/index/segments_1 b/gora-solr-5/src/test/conf/solr6/collection1/data/index/segments_1 new file mode 100644 index 000..78b612a Binary files /dev/null and b/gora-solr-5/src/test/conf/solr6/collection1/data/index/segments_1 differ http://git-wip-us.apache.org/repos/asf/gora/blob/a4b26e6c/gora-solr-5/src/test/conf/solr6/collection1/data/index/write.lock -- diff --git a/gora-solr-5/src/test/conf/solr6/collection1/data/index/write.lock b/gora-solr-5/src/test/conf/solr6/collection1/data/index/write.lock new file mode 100644
[12/20] gora git commit: Remove old solr module and Rename solr5 module into solr module
http://git-wip-us.apache.org/repos/asf/gora/blob/3b2f282d/gora-solr/src/test/conf/solr-managed-schema/collection1/conf/solrconfig.xml -- diff --git a/gora-solr/src/test/conf/solr-managed-schema/collection1/conf/solrconfig.xml b/gora-solr/src/test/conf/solr-managed-schema/collection1/conf/solrconfig.xml new file mode 100644 index 000..d212403 --- /dev/null +++ b/gora-solr/src/test/conf/solr-managed-schema/collection1/conf/solrconfig.xml @@ -0,0 +1,1403 @@ + + + + + + + + + 6.5.1 + + + + + + + + + + + + + + + + + + + + ${solr.data.dir:} + + + + + + + + + + + + + + + + + + + + + + + + + + + + +${solr.lock.type:native} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${solr.ulog.dir:} + ${solr.ulog.numVersionBuckets:65536} + + + + + ${solr.autoCommit.maxTime:15000} + false + + + + + + ${solr.autoSoftCommit.maxTime:-1} + + + + + + + + + + + + + + + +1024 + + + + + + + + + + + + + + + + + + + + + + + + +true + + + + + +20 + + +200 + + + + + + + + + + + + + + + +false + + + + + + + + + + + + + + + + + + + + + + + explicit + 10 + + + + + + + + + + + + + + + explicit + json + true + + + + + + + + explicit + + + + + + _text_ + + + + + + + + + true + ignored_ + _text_ + + + + + + + +text_general + + + + + + default + _text_ + solr.DirectSolrSpellChecker + + internal + + 0.5 + + 2 + + 1 + + 5 + + 4 + + 0.01 + + + + + + + + + + + + default + on + true + 10 + 5 + 5 + true + true + 10 + 5 + + + spellcheck + + + + + + + + + + true + + + tvComponent + + + + + + + + + + + + true + false + + + terms + + + + + + + +string +elevate.xml + + + + + + explicit + + + elevator + + + + + + + + + + + 100 + + + + + + + + 70 + + 0.5 + + [-\w ,/\n\]{20,200} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10 + .,!? + + + + + + + WORD + + + en + US + + + + + + + + + + + + + + [^\w-\.] + _ + + + + + + + + + + + + + + + + + + + + + + + + + + + +${velocity.template.base.dir:} +${velocity.solr.resource.loader.enabled:true} +${velocity.params.resource.loader.enabled:false} + + + + +5 + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/gora/blob/3b2f282d/gora-solr/src/test/conf/solr-managed-schema/collection1/core.properties -- diff --git a/gora-solr/src/test/conf/solr-managed-schema/collection1/core.properties b/gora-solr/src/test/conf/solr-managed-schema/collection1/core.properties new file mode 100644 index 000..4f7a094 --- /dev/null +++ b/gora-solr/src/test/conf/solr-managed-schema/collection1/core.properties @@ -0,0 +1,18 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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
[03/20] gora git commit: Fix code reviews
http://git-wip-us.apache.org/repos/asf/gora/blob/c506f44f/gora-solr-5/src/test/conf/solr6/Employee/conf/solrconfig.xml -- diff --git a/gora-solr-5/src/test/conf/solr6/Employee/conf/solrconfig.xml b/gora-solr-5/src/test/conf/solr6/Employee/conf/solrconfig.xml deleted file mode 100644 index a75b607..000 --- a/gora-solr-5/src/test/conf/solr6/Employee/conf/solrconfig.xml +++ /dev/null @@ -1,1411 +0,0 @@ - - - - - - - - - 6.5.1 - - - - - - - - - - - - - - - - - - - - ${solr.data.dir:} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -${solr.lock.type:native} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${solr.ulog.dir:} - ${solr.ulog.numVersionBuckets:65536} - - - - - ${solr.autoCommit.maxTime:15000} - false - - - - - - ${solr.autoSoftCommit.maxTime:-1} - - - - - - - - - - - - - - - -1024 - - - - - - - - - - - - - - - - - - - - - - - - -true - - - - - -20 - - -200 - - - - - - - - - - - - - - - -false - - - - - - - - - - - - - - - - - - - - - - - explicit - 10 - - - - - - - - - - - - - - - explicit - json - true - - - - - - - - explicit - - - - - - _text_ - - - - - - - - - true - ignored_ - _text_ - - - - - - - -text_general - - - - - - default - _text_ - solr.DirectSolrSpellChecker - - internal - - 0.5 - - 2 - - 1 - - 5 - - 4 - - 0.01 - - - - - - - - - - - - default - on - true - 10 - 5 - 5 - true - true - 10 - 5 - - - spellcheck - - - - - - - - - - true - - - tvComponent - - - - - - - - - - - - true - false - - - terms - - - - - - - -string -elevate.xml - - - - - - explicit - - - elevator - - - - - - - - - - - 100 - - - - - - - - 70 - - 0.5 - - [-\w ,/\n\]{20,200} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 10 - .,!? - - - - - - - WORD - - - en - US - - - - - - - - - - - - - - [^\w-\.] - _ - - - - - - - - - - - - - - - - - - - - - - - - - - -text/plain; charset=UTF-8 - - - - -${velocity.template.base.dir:} -${velocity.solr.resource.loader.enabled:true} -${velocity.params.resource.loader.enabled:false} - - - - -5 - - - - - - - - - - - - - - http://git-wip-us.apache.org/repos/asf/gora/blob/c506f44f/gora-solr-5/src/test/conf/solr6/Employee/conf/stopwords.txt -- diff --git a/gora-solr-5/src/test/conf/solr6/Employee/conf/stopwords.txt b/gora-solr-5/src/test/conf/solr6/Employee/conf/stopwords.txt deleted file mode 100644 index 25b47f6..000 --- a/gora-solr-5/src/test/conf/solr6/Employee/conf/stopwords.txt +++ /dev/null @@ -1,14 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You 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.
[05/20] gora git commit: Fix code reviews
http://git-wip-us.apache.org/repos/asf/gora/blob/c506f44f/gora-solr-5/src/test/conf/solr-managed-schema/WebPage/conf/solrconfig.xml -- diff --git a/gora-solr-5/src/test/conf/solr-managed-schema/WebPage/conf/solrconfig.xml b/gora-solr-5/src/test/conf/solr-managed-schema/WebPage/conf/solrconfig.xml new file mode 100644 index 000..a75b607 --- /dev/null +++ b/gora-solr-5/src/test/conf/solr-managed-schema/WebPage/conf/solrconfig.xml @@ -0,0 +1,1411 @@ + + + + + + + + + 6.5.1 + + + + + + + + + + + + + + + + + + + + ${solr.data.dir:} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +${solr.lock.type:native} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${solr.ulog.dir:} + ${solr.ulog.numVersionBuckets:65536} + + + + + ${solr.autoCommit.maxTime:15000} + false + + + + + + ${solr.autoSoftCommit.maxTime:-1} + + + + + + + + + + + + + + + +1024 + + + + + + + + + + + + + + + + + + + + + + + + +true + + + + + +20 + + +200 + + + + + + + + + + + + + + + +false + + + + + + + + + + + + + + + + + + + + + + + explicit + 10 + + + + + + + + + + + + + + + explicit + json + true + + + + + + + + explicit + + + + + + _text_ + + + + + + + + + true + ignored_ + _text_ + + + + + + + +text_general + + + + + + default + _text_ + solr.DirectSolrSpellChecker + + internal + + 0.5 + + 2 + + 1 + + 5 + + 4 + + 0.01 + + + + + + + + + + + + default + on + true + 10 + 5 + 5 + true + true + 10 + 5 + + + spellcheck + + + + + + + + + + true + + + tvComponent + + + + + + + + + + + + true + false + + + terms + + + + + + + +string +elevate.xml + + + + + + explicit + + + elevator + + + + + + + + + + + 100 + + + + + + + + 70 + + 0.5 + + [-\w ,/\n\]{20,200} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10 + .,!? + + + + + + + WORD + + + en + US + + + + + + + + + + + + + + [^\w-\.] + _ + + + + + + + + + + + + + + + + + + + + + + + + + + +text/plain; charset=UTF-8 + + + + +${velocity.template.base.dir:} +${velocity.solr.resource.loader.enabled:true} +${velocity.params.resource.loader.enabled:false} + + + + +5 + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/gora/blob/c506f44f/gora-solr-5/src/test/conf/solr-managed-schema/WebPage/conf/stopwords.txt -- diff --git a/gora-solr-5/src/test/conf/solr-managed-schema/WebPage/conf/stopwords.txt b/gora-solr-5/src/test/conf/solr-managed-schema/WebPage/conf/stopwords.txt new file mode 100644 index 000..25b47f6 --- /dev/null +++ b/gora-solr-5/src/test/conf/solr-managed-schema/WebPage/conf/stopwords.txt @@ -0,0 +1,14 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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
[13/20] gora git commit: Remove old solr module and Rename solr5 module into solr module
http://git-wip-us.apache.org/repos/asf/gora/blob/3b2f282d/gora-solr/src/test/conf/solr-managed-schema/WebPage/conf/solrconfig.xml -- diff --git a/gora-solr/src/test/conf/solr-managed-schema/WebPage/conf/solrconfig.xml b/gora-solr/src/test/conf/solr-managed-schema/WebPage/conf/solrconfig.xml new file mode 100644 index 000..a75b607 --- /dev/null +++ b/gora-solr/src/test/conf/solr-managed-schema/WebPage/conf/solrconfig.xml @@ -0,0 +1,1411 @@ + + + + + + + + + 6.5.1 + + + + + + + + + + + + + + + + + + + + ${solr.data.dir:} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +${solr.lock.type:native} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${solr.ulog.dir:} + ${solr.ulog.numVersionBuckets:65536} + + + + + ${solr.autoCommit.maxTime:15000} + false + + + + + + ${solr.autoSoftCommit.maxTime:-1} + + + + + + + + + + + + + + + +1024 + + + + + + + + + + + + + + + + + + + + + + + + +true + + + + + +20 + + +200 + + + + + + + + + + + + + + + +false + + + + + + + + + + + + + + + + + + + + + + + explicit + 10 + + + + + + + + + + + + + + + explicit + json + true + + + + + + + + explicit + + + + + + _text_ + + + + + + + + + true + ignored_ + _text_ + + + + + + + +text_general + + + + + + default + _text_ + solr.DirectSolrSpellChecker + + internal + + 0.5 + + 2 + + 1 + + 5 + + 4 + + 0.01 + + + + + + + + + + + + default + on + true + 10 + 5 + 5 + true + true + 10 + 5 + + + spellcheck + + + + + + + + + + true + + + tvComponent + + + + + + + + + + + + true + false + + + terms + + + + + + + +string +elevate.xml + + + + + + explicit + + + elevator + + + + + + + + + + + 100 + + + + + + + + 70 + + 0.5 + + [-\w ,/\n\]{20,200} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 10 + .,!? + + + + + + + WORD + + + en + US + + + + + + + + + + + + + + [^\w-\.] + _ + + + + + + + + + + + + + + + + + + + + + + + + + + +text/plain; charset=UTF-8 + + + + +${velocity.template.base.dir:} +${velocity.solr.resource.loader.enabled:true} +${velocity.params.resource.loader.enabled:false} + + + + +5 + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/gora/blob/3b2f282d/gora-solr/src/test/conf/solr-managed-schema/WebPage/conf/synonyms.txt -- diff --git a/gora-solr/src/test/conf/solr-managed-schema/WebPage/conf/synonyms.txt b/gora-solr/src/test/conf/solr-managed-schema/WebPage/conf/synonyms.txt new file mode 100644 index 000..f00294b --- /dev/null +++ b/gora-solr/src/test/conf/solr-managed-schema/WebPage/conf/synonyms.txt @@ -0,0 +1,29 @@ +# The ASF licenses this file to You 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. + +#--- +#some test synonym mappings unlikely to appear in real input text +aaafoo => aaabar +bbbfoo => bbbfoo ar +cccfoo =>
[4/5] gora git commit: Resolve conflicts with master
Resolve conflicts with master Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/f6317e44 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/f6317e44 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/f6317e44 Branch: refs/heads/master Commit: f6317e44558135dcbb58b188900019fe21e4eea6 Parents: 2303e85 7a0174f Author: Kevin RatnasekeraAuthored: Mon Sep 11 01:08:43 2017 +0530 Committer: Kevin Ratnasekera Committed: Mon Sep 11 01:08:43 2017 +0530 -- .gitignore |1 + bin/gora|5 + gora-aerospike/pom.xml | 173 ++ .../org/apache/gora/aerospike/package-info.java | 20 + .../gora/aerospike/query/AerospikeQuery.java| 35 + .../aerospike/query/AerospikeQueryResult.java | 88 + .../aerospike/query/AerospikeResultRecord.java | 52 + .../gora/aerospike/store/AerospikeMapping.java | 88 + .../store/AerospikeMappingBuilder.java | 392 + .../aerospike/store/AerospikeParameters.java| 198 +++ .../aerospike/store/AerospikePolicyConst.java | 54 + .../gora/aerospike/store/AerospikeStore.java| 618 +++ .../gora/aerospike/store/package-info.java | 20 + .../src/test/conf/gora-aerospike-mapping.xml| 49 + gora-aerospike/src/test/conf/gora.properties| 18 + gora-aerospike/src/test/conf/log4j.properties | 22 + .../gora/aerospike/GoraAerospikeTestDriver.java | 76 + .../mapreduce/TestAerospikeStoreCountQuery.java | 68 + ...estAerospikeStoreMapReduceSerialization.java | 69 + .../mapreduce/TestAerospikeStoreWordCount.java | 74 + .../gora/aerospike/mapreduce/package-info.java | 21 + .../org/apache/gora/aerospike/package-info.java | 17 + .../store/AerospikeStartupLogWaitStrategy.java | 53 + .../aerospike/store/TestAerospikeStore.java | 167 ++ .../gora/aerospike/store/package-info.java | 21 + gora-cassandra/conf/.gitignore | 15 - gora-cassandra/pom.xml | 163 +- .../src/examples/avro/cassandraKey.json | 22 + .../src/examples/avro/cassandraRecord.json | 107 ++ gora-cassandra/src/examples/java/.gitignore | 15 - .../AvroSerialization/CassandraKey.java | 472 + .../AvroSerialization/CassandraRecord.java | 1648 ++ .../nativeSerialization/ComplexTypes.java | 199 +++ .../generated/nativeSerialization/Customer.java | 75 + .../generated/nativeSerialization/Document.java | 136 ++ .../generated/nativeSerialization/User.java | 159 ++ .../gora/cassandra/bean/CassandraKey.java | 91 + .../gora/cassandra/bean/ClusterKeyField.java| 54 + .../org/apache/gora/cassandra/bean/Field.java | 70 + .../apache/gora/cassandra/bean/KeySpace.java| 84 + .../gora/cassandra/bean/PartitionKeyField.java | 50 + .../compiler/GoraCassandraNativeCompiler.java | 326 .../org/apache/gora/cassandra/package-info.java |7 +- .../gora/cassandra/query/CassandraColumn.java | 97 -- .../gora/cassandra/query/CassandraQuery.java| 111 +- .../gora/cassandra/query/CassandraResult.java | 194 --- .../cassandra/query/CassandraResultSet.java | 102 +- .../gora/cassandra/query/CassandraRow.java | 58 - .../cassandra/query/CassandraSubColumn.java | 111 -- .../cassandra/query/CassandraSuperColumn.java | 197 --- .../gora/cassandra/query/package-info.java |7 +- .../serializers/AvroCassandraUtils.java | 354 .../cassandra/serializers/AvroSerializer.java | 446 + .../serializers/AvroSerializerUtil.java | 94 - .../serializers/CassandraQueryFactory.java | 836 + .../serializers/CassandraSerializer.java| 225 +++ .../serializers/CharSequenceSerializer.java | 64 - .../serializers/GoraSerializerTypeInferer.java | 230 --- .../cassandra/serializers/ListSerializer.java | 193 -- .../cassandra/serializers/MapSerializer.java| 223 --- .../cassandra/serializers/NativeSerializer.java | 243 +++ .../serializers/SpecificFixedSerializer.java| 119 -- .../gora/cassandra/serializers/TypeUtils.java | 232 --- .../cassandra/serializers/package-info.java |7 +- .../gora/cassandra/store/CassandraClient.java | 1029 +-- .../gora/cassandra/store/CassandraMapping.java | 427 ++--- .../store/CassandraMappingBuilder.java | 321 .../store/CassandraMappingManager.java | 158 -- .../gora/cassandra/store/CassandraStore.java| 776 +++-- .../store/CassandraStoreParameters.java | 236 +++ .../gora/cassandra/store/HectorUtils.java | 117 -- .../gora/cassandra/store/package-info.java |7 +- .../test/conf/avro/gora-cassandra-mapping.xml | 50 +
[3/5] gora git commit: Make batch arraylist thread safe
Make batch arraylist thread safe Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/2303e85c Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/2303e85c Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/2303e85c Branch: refs/heads/master Commit: 2303e85c5ba9e2aaa72b0e3ea88d589e312df104 Parents: 71a95b9 Author: Kevin RatnasekeraAuthored: Mon Sep 11 01:04:40 2017 +0530 Committer: Kevin Ratnasekera Committed: Mon Sep 11 01:04:40 2017 +0530 -- .../org/apache/gora/orientdb/store/OrientDBStore.java | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/2303e85c/gora-orientdb/src/main/java/org/apache/gora/orientdb/store/OrientDBStore.java -- diff --git a/gora-orientdb/src/main/java/org/apache/gora/orientdb/store/OrientDBStore.java b/gora-orientdb/src/main/java/org/apache/gora/orientdb/store/OrientDBStore.java index d0b901f..9561701 100644 --- a/gora-orientdb/src/main/java/org/apache/gora/orientdb/store/OrientDBStore.java +++ b/gora-orientdb/src/main/java/org/apache/gora/orientdb/store/OrientDBStore.java @@ -29,6 +29,8 @@ import java.util.ArrayList; import java.util.Date; import java.util.Calendar; import java.util.Collection; +import java.util.Collections; +import java.util.concurrent.locks.ReentrantLock; import java.util.TimeZone; import java.util.Locale; @@ -80,7 +82,8 @@ public class OrientDBStore extends DataStoreBase (); + private List docBatch = Collections.synchronizedList(new ArrayList<>()); + private ReentrantLock flushLock = new ReentrantLock(); /** * Initialize the OrientDB dataStore by {@link Properties} parameters. @@ -248,8 +251,10 @@ public class OrientDBStore extends DataStoreBase extends DataStoreBase
[5/5] gora git commit: Fix java doc issues
Fix java doc issues Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/96b9e96d Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/96b9e96d Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/96b9e96d Branch: refs/heads/master Commit: 96b9e96df165757f766e414633ae7ad05dd9d05e Parents: f6317e4 Author: Kevin RatnasekeraAuthored: Mon Sep 11 01:40:01 2017 +0530 Committer: Kevin Ratnasekera Committed: Mon Sep 11 01:40:01 2017 +0530 -- .../gora/orientdb/query/OrientDBQuery.java | 3 ++ .../gora/orientdb/store/OrientDBMapping.java| 2 +- .../orientdb/store/OrientDBMappingBuilder.java | 2 + .../gora/orientdb/store/OrientDBStore.java | 43 +--- .../orientdb/store/OrientDBStoreParameters.java | 1 + 5 files changed, 44 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/96b9e96d/gora-orientdb/src/main/java/org/apache/gora/orientdb/query/OrientDBQuery.java -- diff --git a/gora-orientdb/src/main/java/org/apache/gora/orientdb/query/OrientDBQuery.java b/gora-orientdb/src/main/java/org/apache/gora/orientdb/query/OrientDBQuery.java index 209549a..596390b 100644 --- a/gora-orientdb/src/main/java/org/apache/gora/orientdb/query/OrientDBQuery.java +++ b/gora-orientdb/src/main/java/org/apache/gora/orientdb/query/OrientDBQuery.java @@ -72,6 +72,9 @@ public class OrientDBQuery extends QueryBase * Convert Gora query to Orient DB specific query which underline API understands. * And maintain it s state encapsulated to Gora implementation of the {@link org.apache.gora.query.Query}. * + * @param orientDBMapping OrientDB mapping file. + * @param fields OrientDB query fields. + * @param schemaFields AVRO schema fields for persistent bean. * @return a {@link OSQLSynchQuery} query executable over Orient DB. */ public OSQLSynchQuery populateOrientDBQuery(final OrientDBMapping orientDBMapping, http://git-wip-us.apache.org/repos/asf/gora/blob/96b9e96d/gora-orientdb/src/main/java/org/apache/gora/orientdb/store/OrientDBMapping.java -- diff --git a/gora-orientdb/src/main/java/org/apache/gora/orientdb/store/OrientDBMapping.java b/gora-orientdb/src/main/java/org/apache/gora/orientdb/store/OrientDBMapping.java index a37c3d8..ac06f08 100644 --- a/gora-orientdb/src/main/java/org/apache/gora/orientdb/store/OrientDBMapping.java +++ b/gora-orientdb/src/main/java/org/apache/gora/orientdb/store/OrientDBMapping.java @@ -112,7 +112,7 @@ public class OrientDBMapping { } /** - * Returns all fields in AVRO {@link org.apache.hadoop.io.serializer.avro.Record} record. + * Returns all fields in AVRO {@link SpecificRecord} record. * * @return array of fields in string. */ http://git-wip-us.apache.org/repos/asf/gora/blob/96b9e96d/gora-orientdb/src/main/java/org/apache/gora/orientdb/store/OrientDBMappingBuilder.java -- diff --git a/gora-orientdb/src/main/java/org/apache/gora/orientdb/store/OrientDBMappingBuilder.java b/gora-orientdb/src/main/java/org/apache/gora/orientdb/store/OrientDBMappingBuilder.java index 4c2d68c..18965f9 100644 --- a/gora-orientdb/src/main/java/org/apache/gora/orientdb/store/OrientDBMappingBuilder.java +++ b/gora-orientdb/src/main/java/org/apache/gora/orientdb/store/OrientDBMappingBuilder.java @@ -57,6 +57,8 @@ public class OrientDBMappingBuilder { /** * Build OrientDB dataStore mapping from gora-orientdb-mapping.xml given from class path * or file system location. + * + * @return mapping file {@link OrientDBMapping} */ public OrientDBMapping build() { if (mapping.getDocumentClass() == null) http://git-wip-us.apache.org/repos/asf/gora/blob/96b9e96d/gora-orientdb/src/main/java/org/apache/gora/orientdb/store/OrientDBStore.java -- diff --git a/gora-orientdb/src/main/java/org/apache/gora/orientdb/store/OrientDBStore.java b/gora-orientdb/src/main/java/org/apache/gora/orientdb/store/OrientDBStore.java index 9561701..000f1fa 100644 --- a/gora-orientdb/src/main/java/org/apache/gora/orientdb/store/OrientDBStore.java +++ b/gora-orientdb/src/main/java/org/apache/gora/orientdb/store/OrientDBStore.java @@ -70,6 +70,7 @@ import javax.xml.bind.DatatypeConverter; import static com.github.raymanrt.orientqb.query.Projection.projection; /** + * {@inheritDoc} * {@link org.apache.gora.orientdb.store.OrientDBStore} is the primary class * responsible for facilitating GORA CRUD operations on OrientDB
[1/5] gora git commit: GORA-513 Add initial OrientDB datastore impl
Repository: gora Updated Branches: refs/heads/master 7a0174fa3 -> 96b9e96df http://git-wip-us.apache.org/repos/asf/gora/blob/71a95b98/gora-orientdb/src/test/java/org/apache/gora/orientdb/store/package-info.java -- diff --git a/gora-orientdb/src/test/java/org/apache/gora/orientdb/store/package-info.java b/gora-orientdb/src/test/java/org/apache/gora/orientdb/store/package-info.java new file mode 100644 index 000..368af45 --- /dev/null +++ b/gora-orientdb/src/test/java/org/apache/gora/orientdb/store/package-info.java @@ -0,0 +1,22 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ + +/** + * Contains tests for OrientDB dataStore CRUD operations. + */ +package org.apache.gora.orientdb.store; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/gora/blob/71a95b98/gora-orientdb/src/test/resources/gora-orientdb-mapping.xml -- diff --git a/gora-orientdb/src/test/resources/gora-orientdb-mapping.xml b/gora-orientdb/src/test/resources/gora-orientdb-mapping.xml new file mode 100644 index 000..515ed98 --- /dev/null +++ b/gora-orientdb/src/test/resources/gora-orientdb-mapping.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + http://git-wip-us.apache.org/repos/asf/gora/blob/71a95b98/gora-orientdb/src/test/resources/gora.properties -- diff --git a/gora-orientdb/src/test/resources/gora.properties b/gora-orientdb/src/test/resources/gora.properties new file mode 100644 index 000..5a24e76 --- /dev/null +++ b/gora-orientdb/src/test/resources/gora.properties @@ -0,0 +1,23 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You 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. + +gora.datastore.default=org.apache.gora.orientdb.store.OrientDBStore +gora.orientdb.server.host=localhost +gora.orientdb.server.port=2424 +gora.orientdb.user.username=root +gora.orientdb.user.password=root +gora.orientdb.database.name=gora +gora.orientdb.con.pool.size=80 +gora.orientdb.storage.type=memory \ No newline at end of file http://git-wip-us.apache.org/repos/asf/gora/blob/71a95b98/gora-orientdb/src/test/resources/orientdb-server-config.xml -- diff --git a/gora-orientdb/src/test/resources/orientdb-server-config.xml b/gora-orientdb/src/test/resources/orientdb-server-config.xml new file mode 100644 index 000..3cc00d6 --- /dev/null +++ b/gora-orientdb/src/test/resources/orientdb-server-config.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/gora/blob/71a95b98/pom.xml -- diff --git a/pom.xml b/pom.xml index 2c2e20a..57a7f5a 100644 --- a/pom.xml +++ b/pom.xml @@ -723,6 +723,7 @@ gora-hbase gora-infinispan gora-jcache +gora-orientdb gora-dynamodb gora-couchdb @@ -776,6 +777,10 @@ 1.0.0 3.6.4 + +2.2.22 +0.2.0 + 4.10 @@ -1506,6 +1511,37 @@ ${jsr107.api.version} + + +
[2/5] gora git commit: GORA-513 Add initial OrientDB datastore impl
GORA-513 Add initial OrientDB datastore impl Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/71a95b98 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/71a95b98 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/71a95b98 Branch: refs/heads/master Commit: 71a95b98f37d268eeafd2fb653ee1b2158416eaf Parents: d5e5560 Author: Kevin RatnasekeraAuthored: Wed Jul 12 03:08:24 2017 +0530 Committer: Kevin Ratnasekera Committed: Wed Jul 12 03:08:24 2017 +0530 -- gora-orientdb/pom.xml | 184 .../org/apache/gora/orientdb/package-info.java | 23 + .../gora/orientdb/query/OrientDBQuery.java | 113 +++ .../gora/orientdb/query/OrientDBResult.java | 103 +++ .../gora/orientdb/query/package-info.java | 23 + .../gora/orientdb/store/OrientDBMapping.java| 177 .../orientdb/store/OrientDBMappingBuilder.java | 123 +++ .../gora/orientdb/store/OrientDBStore.java | 922 +++ .../orientdb/store/OrientDBStoreParameters.java | 157 .../gora/orientdb/store/package-info.java | 23 + .../gora/orientdb/GoraOrientDBTestDriver.java | 75 ++ .../mapreduce/OrientDBStoreMapReduceTest.java | 66 ++ .../gora/orientdb/mapreduce/package-info.java | 22 + .../org/apache/gora/orientdb/package-info.java | 23 + .../store/OrientDBGoraDataStoreTest.java| 65 ++ .../gora/orientdb/store/package-info.java | 22 + .../test/resources/gora-orientdb-mapping.xml| 45 + .../src/test/resources/gora.properties | 23 + .../test/resources/orientdb-server-config.xml | 35 + pom.xml | 36 + 20 files changed, 2260 insertions(+) -- http://git-wip-us.apache.org/repos/asf/gora/blob/71a95b98/gora-orientdb/pom.xml -- diff --git a/gora-orientdb/pom.xml b/gora-orientdb/pom.xml new file mode 100644 index 000..50a84dd --- /dev/null +++ b/gora-orientdb/pom.xml @@ -0,0 +1,184 @@ + + +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/xsd/maven-4.0.0.xsd;> + 4.0.0 + + +org.apache.gora +gora +0.8-SNAPSHOT +../ + + gora-orientdb + bundle + + Apache Gora :: OrientDB + http://gora.apache.org + The Apache Gora open source framework provides an in-memory data model and +persistence for big data. Gora supports persisting to column stores, key value stores, +document stores and RDBMSs, and analyzing the data with extensive Apache Hadoop MapReduce +support. + 2010 + +The Apache Software Foundation +http://www.apache.org/ + + +JIRA +https://issues.apache.org/jira/browse/GORA + + +Jenkins +https://builds.apache.org/job/Gora-trunk/ + + + +* + org.apache.gora.orientdb*;version="${project.version}";-noimport:=true + + + +target +target/classes +${project.artifactId}-${project.version} +target/test-classes +src/test/java +src/main/java + + +${project.basedir}/src/test/resources + + **/* + + + + + + +org.codehaus.mojo +build-helper-maven-plugin +${build-helper-maven-plugin.version} + + +generate-sources + + add-source + + + +src/examples/java + + + + + + + + + + + + org.apache.gora + gora-core + + + + org.apache.gora + gora-core + test-jar + test + + + + org.apache.avro + avro + + + + + org.slf4j + slf4j-log4j12 + + + + log4j + log4j + + + javax.jms + jms + + + + + + + junit + junit + + + + org.apache.hadoop + hadoop-minicluster + test + + + + + com.orientechnologies + orientdb-server + + + + com.orientechnologies + orientdb-core + + + + com.orientechnologies + orientdb-graphdb + + + + com.orientechnologies + orientdb-client + + + + com.github.raymanrt + orientqb + + + + org.jdom + jdom + compile + + + + + + org.apache.hadoop + hadoop-client + + + + + http://git-wip-us.apache.org/repos/asf/gora/blob/71a95b98/gora-orientdb/src/main/java/org/apache/gora/orientdb/package-info.java -- diff --git
[1/3] gora git commit: Fix the put method to delete the existing records only if certain fields have been removed
Repository: gora Updated Branches: refs/heads/master 460f9f5b0 -> 31af406eb Fix the put method to delete the existing records only if certain fields have been removed Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/bebc7a8a Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/bebc7a8a Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/bebc7a8a Branch: refs/heads/master Commit: bebc7a8a524e19739f6128437bab06212a35e75b Parents: 460f9f5 Author: nishadiAuthored: Sun Aug 20 20:02:27 2017 +0530 Committer: nishadi Committed: Sun Aug 20 20:02:27 2017 +0530 -- .../apache/gora/aerospike/store/AerospikeStore.java| 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/bebc7a8a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java -- diff --git a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java index 0d5e23f..4ff1a53 100644 --- a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java +++ b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java @@ -187,9 +187,16 @@ public class AerospikeStore extends DataStoreBase fields = persistent.getSchema().getFields(); -if (aerospikeClient.exists(null, recordKey)) { - this.delete(key); +// Delete the record, if the record exists and a field has been removed +for (int i = 0; i < fields.size(); i++) { + if (persistent.isDirty(i)) { +Object persistentValue = persistent.get(i); +if (persistentValue == null && aerospikeClient.exists(null, recordKey)) { + this.delete(key); +} + } } + for (int i = 0; i < fields.size(); i++) { if (!persistent.isDirty(i)) { continue; @@ -447,7 +454,6 @@ public class AerospikeStore extends DataStoreBase extends DataStoreBase
[2/3] gora git commit: Update dirty bit clearing after fetching from data store
Update dirty bit clearing after fetching from data store Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/18c6426d Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/18c6426d Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/18c6426d Branch: refs/heads/master Commit: 18c6426d1fbb60f0a52a5a7a021690f62d821955 Parents: bebc7a8 Author: nishadiAuthored: Sun Aug 20 20:45:19 2017 +0530 Committer: nishadi Committed: Sun Aug 20 20:45:19 2017 +0530 -- .../main/java/org/apache/gora/aerospike/store/AerospikeStore.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/18c6426d/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java -- diff --git a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java index 4ff1a53..677302d 100644 --- a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java +++ b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java @@ -454,6 +454,7 @@ public class AerospikeStore extends DataStoreBase extends DataStoreBase
[3/3] gora git commit: Fix the error in removing a bin value while updating in aerospike module
Fix the error in removing a bin value while updating in aerospike module Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/31af406e Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/31af406e Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/31af406e Branch: refs/heads/master Commit: 31af406eb992beebcb8c0f6908df8031ef179aeb Parents: 18c6426 Author: nishadiAuthored: Mon Aug 21 20:55:46 2017 +0530 Committer: nishadi Committed: Mon Aug 21 20:55:46 2017 +0530 -- .../gora/aerospike/store/AerospikeStore.java| 39 1 file changed, 16 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/31af406e/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java -- diff --git a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java index 677302d..53545f1 100644 --- a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java +++ b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java @@ -187,37 +187,30 @@ public class AerospikeStore extends DataStoreBase fields = persistent.getSchema().getFields(); -// Delete the record, if the record exists and a field has been removed -for (int i = 0; i < fields.size(); i++) { - if (persistent.isDirty(i)) { -Object persistentValue = persistent.get(i); -if (persistentValue == null && aerospikeClient.exists(null, recordKey)) { - this.delete(key); -} - } -} - for (int i = 0; i < fields.size(); i++) { if (!persistent.isDirty(i)) { continue; } Object persistentValue = persistent.get(i); + + String mappingBinName = aerospikeParameters.getAerospikeMapping().getBinMapping() + .get(fields.get(i).name()); + if (mappingBinName == null) { +LOG.error("Aerospike mapping for field {}#{} not found. Wrong gora-aerospike-mapping.xml?", +persistent.getClass().getName(), fields.get(i).name()); +throw new RuntimeException( +"Aerospike mapping for field [" + persistent.getClass().getName() + "#" + fields +.get(i).name() + "] not found. Wrong gora-aerospike-mapping.xml?"); + } + Bin bin; if (persistentValue != null) { -String mappingBinName = aerospikeParameters.getAerospikeMapping().getBinMapping() -.get(fields.get(i).name()); -if (mappingBinName == null) { - LOG.error( - "Aerospike mapping for field {}#{} not found. Wrong gora-aerospike-mapping.xml?", - persistent.getClass().getName(), fields.get(i).name()); - throw new RuntimeException( - "Aerospike mapping for field [" + persistent.getClass().getName() + "#" + fields - .get(i).name() + "] not found. Wrong gora-aerospike-mapping.xml?"); -} -Bin bin = new Bin(mappingBinName, +bin = new Bin(mappingBinName, getSerializableValue(persistentValue, fields.get(i).schema())); -aerospikeClient - .put(aerospikeParameters.getAerospikeMapping().getWritePolicy(), recordKey, bin); + } else { +bin = Bin.asNull(mappingBinName); } + aerospikeClient + .put(aerospikeParameters.getAerospikeMapping().getWritePolicy(), recordKey, bin); } }
gora git commit: Add map reduce based test cases fot aerospike module
Repository: gora Updated Branches: refs/heads/master 31af406eb -> 837b12606 Add map reduce based test cases fot aerospike module Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/837b1260 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/837b1260 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/837b1260 Branch: refs/heads/master Commit: 837b12606b3c857c1d8df4b05424c607f3580230 Parents: 31af406 Author: nishadiAuthored: Mon Aug 21 22:08:25 2017 +0530 Committer: nishadi Committed: Mon Aug 21 22:08:25 2017 +0530 -- .../gora/aerospike/query/AerospikeQuery.java| 3 + .../aerospike/store/AerospikeParameters.java| 12 +++- .../gora/aerospike/store/AerospikeStore.java| 2 +- gora-aerospike/src/test/conf/gora.properties| 3 +- .../gora/aerospike/GoraAerospikeTestDriver.java | 9 +-- .../mapreduce/TestAerospikeStoreCountQuery.java | 68 ++ ...estAerospikeStoreMapReduceSerialization.java | 69 ++ .../mapreduce/TestAerospikeStoreWordCount.java | 74 .../gora/aerospike/mapreduce/package-info.java | 21 ++ 9 files changed, 252 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/837b1260/gora-aerospike/src/main/java/org/apache/gora/aerospike/query/AerospikeQuery.java -- diff --git a/gora-aerospike/src/main/java/org/apache/gora/aerospike/query/AerospikeQuery.java b/gora-aerospike/src/main/java/org/apache/gora/aerospike/query/AerospikeQuery.java index 2f97f5f..9629b67 100644 --- a/gora-aerospike/src/main/java/org/apache/gora/aerospike/query/AerospikeQuery.java +++ b/gora-aerospike/src/main/java/org/apache/gora/aerospike/query/AerospikeQuery.java @@ -26,6 +26,9 @@ import org.apache.gora.store.DataStore; * Aerospike specific implementation of the {@link Query} interface. */ public class AerospikeQuery extends QueryBase { + public AerospikeQuery() { + super(null); + } public AerospikeQuery(DataStore dataStore) { super(dataStore); } http://git-wip-us.apache.org/repos/asf/gora/blob/837b1260/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeParameters.java -- diff --git a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeParameters.java b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeParameters.java index e4aab26..2ea4d57 100644 --- a/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeParameters.java +++ b/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeParameters.java @@ -19,6 +19,7 @@ package org.apache.gora.aerospike.store; import com.aerospike.client.AerospikeClient; import com.aerospike.client.Info; import com.aerospike.client.cluster.Node; +import org.apache.hadoop.conf.Configuration; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -50,6 +51,8 @@ public class AerospikeParameters { private static final String AS_SERVER_PASSWORD = "gora.aerospikestore.server.password"; + private static final String AS_PROP_OVERRIDING = "gora.aerospikestore.override.hadoop.configuration"; + // Default property values private static final String DEFAULT_SERVER_IP = "localhost"; @@ -63,12 +66,19 @@ public class AerospikeParameters { * @param aerospikeMapping aerospike mapping initialized from the mapping file * @param properties property details */ - public AerospikeParameters(AerospikeMapping aerospikeMapping, Properties properties) { + public AerospikeParameters(AerospikeMapping aerospikeMapping, Properties properties, Configuration conf) { this.aerospikeMapping = aerospikeMapping; this.host = properties.getProperty(AS_SERVER_IP, DEFAULT_SERVER_IP); this.port = Integer.parseInt(properties.getProperty(AS_SERVER_PORT, DEFAULT_SERVER_PORT)); this.username = properties.getProperty(AS_SERVER_USERNAME, null); this.password = properties.getProperty(AS_SERVER_PASSWORD, null); +String overrideHadoop = properties.getProperty(AS_PROP_OVERRIDING); +if (!Boolean.parseBoolean(overrideHadoop)) { + this.host = conf.get(AS_SERVER_IP, DEFAULT_SERVER_IP); + this.port = Integer.parseInt(conf.get(AS_SERVER_PORT, DEFAULT_SERVER_PORT)); + this.username = conf.get(AS_SERVER_USERNAME, null); + this.password = conf.get(AS_SERVER_PASSWORD, null); +} } public String getHost() { http://git-wip-us.apache.org/repos/asf/gora/blob/837b1260/gora-aerospike/src/main/java/org/apache/gora/aerospike/store/AerospikeStore.java
svn commit: r1807139 - /gora/site/trunk/content/current/gora-cassandra.md
Author: djkevincr Date: Sun Sep 3 10:55:57 2017 New Revision: 1807139 URL: http://svn.apache.org/viewvc?rev=1807139=rev Log: GORA-521 add documentaiton for cassandra store Modified: gora/site/trunk/content/current/gora-cassandra.md Modified: gora/site/trunk/content/current/gora-cassandra.md URL: http://svn.apache.org/viewvc/gora/site/trunk/content/current/gora-cassandra.md?rev=1807139=1807138=1807139=diff == --- gora/site/trunk/content/current/gora-cassandra.md (original) +++ gora/site/trunk/content/current/gora-cassandra.md Sun Sep 3 10:55:57 2017 @@ -24,16 +24,28 @@ enables [Apache Cassandra](http://cassan Implementation of the persistent Java storage class -gora.cassandra.mapping.file= +gora.cassandrastore.mapping.file= /path/to/gora-cassandra-mapping.xml No The XML mapping file to be used. If no value is used this defaults to gora-cassandra-mapping.xml -gora.cassandra.servers= -localhost:9160 +gora.cassandrastore.cassandraServers= +localhost Yes -This value should specify the host:port for a running Cassandra server or node. In this case the server happens to be running on localhost at port 9160 which is the default Cassandra server configuration. It is important that the host matches that specified in gora-cassandra-mapping.xml +This value should specify the host for a running Cassandra server or node. In this case the server happens to be running on localhost which is the default Cassandra server configuration. + + +gora.cassandrastore.port= +9042 +Yes +This value should specify the cql port for a running Cassandra server or node. In this case the server happens to be running on 9042 port which is the default Cassandra server configuration. + + +gora.cassandrastore.clusterName= +Test Cluster +No +This value should specify the cassandra cluster name for a running Cassandra server or node. In this case the server has configured to run with Cassandra cluster name as 'Test Cluster' which is the default Cassandra server configuration. gora.cassandrastore.username= @@ -47,80 +59,115 @@ enables [Apache Cassandra](http://cassan No The authentication details for passing a password to the CassandraHostConfigurator. This will be required if security is required for Cassandra reads and writes. - + +gora.cassandrastore.cassandraSerializationType= +AVRO/NATIVE +No +The serialization type for persist into the cassandra data store. default value is Native serialization type + + ##Gora Cassandra mappings -Say we wished to map some Employee data and store it into the CassandraStore. +Say we wished to map some CassandraRecord data and store it into the CassandraStore. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - Here you can see that we require the definition of two child elements within the gora-otd mapping configuration, namely; The keyspace element; where we specify: -1. a parameter containing the Cassandra keyspace schema name e.g. Employee, +1. a parameter containing the Cassandra keyspace schema name e.g. RecordKeySpace, + +2. a parameter containing the durable write enabled property in the Cassandra keyspace e.g. false, More about durable write can be found [here](http://docs.datastax.com/en/cassandra/2.1/cassandra/dml/dml_durability_c.html). -2. a parameter containing the host e.g. localhost. The value of the host attribute of keyspace tag should match exactly what is in - gora.properties file. Essentially this means that if you are using port number, you should - use it everywhere regardless of whether it is the default port or not. - At runtime Gora will otherwise try to connect to localhost. For more information please see [here](https://issues.apache.org/jira/browse/GORA-269) - -3. a parameter containing the Cassandra cluster name e.g. Gora Cassandra Test Cluster, - -4. a parameter containing a placement_strategy: The value of 'placement_strategy' should be a fully qualifed class name that is known to - the cassansra cluster, not the application or Gora. As of this writing, the classes that ship - with cassandra are: - org.apache.cassandra.locator.SimpleStrategy and - org.apache.cassandra.locator.NetworkTopologyStrategy. - gora-cassandra will use SimpleStrategy by default if no value for this attribute is specified. Finally - it should be noted that the placement_strategy attribute of the keyspace tag - will only apply if Gora creates
[4/8] gora git commit: -Remove empty lines. -Implement tests within DataStoreTestBase and DataStoreTestUtil. -Fix size() implementation for MemStore, Accumulo, Solr, JCache and OrientDB.
-Remove empty lines. -Implement tests within DataStoreTestBase and DataStoreTestUtil. -Fix size() implementation for MemStore, Accumulo, Solr, JCache and OrientDB. Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/8d99c055 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/8d99c055 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/8d99c055 Branch: refs/heads/master Commit: 8d99c0554f4dcd620489eefd7963bce4d0a89dab Parents: eb49374 Author: devAuthored: Tue May 1 00:49:33 2018 -0500 Committer: dev Committed: Tue May 1 00:49:33 2018 -0500 -- .../gora/accumulo/query/AccumuloResult.java | 3 +- .../gora/accumulo/store/AccumuloStoreTest.java | 27 +++ .../gora/avro/query/DataFileAvroResult.java | 1 - .../org/apache/gora/memory/store/MemStore.java | 4 +- .../main/java/org/apache/gora/query/Result.java | 2 +- .../apache/gora/store/DataStoreTestBase.java| 48 +++ .../apache/gora/store/DataStoreTestUtil.java| 85 +++- .../gora/dynamodb/query/DynamoDBResult.java | 1 - .../gora/hbase/query/HBaseScannerResult.java| 1 - .../apache/gora/hbase/store/TestHBaseStore.java | 24 +- .../apache/gora/jcache/query/JCacheResult.java | 5 +- .../gora/mongodb/store/TestMongoStore.java | 14 +++- .../gora/orientdb/query/OrientDBResult.java | 5 +- .../org/apache/gora/solr/query/SolrResult.java | 4 +- 14 files changed, 209 insertions(+), 15 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/8d99c055/gora-accumulo/src/main/java/org/apache/gora/accumulo/query/AccumuloResult.java -- diff --git a/gora-accumulo/src/main/java/org/apache/gora/accumulo/query/AccumuloResult.java b/gora-accumulo/src/main/java/org/apache/gora/accumulo/query/AccumuloResult.java index 7c208f8..217a0c3 100644 --- a/gora-accumulo/src/main/java/org/apache/gora/accumulo/query/AccumuloResult.java +++ b/gora-accumulo/src/main/java/org/apache/gora/accumulo/query/AccumuloResult.java @@ -53,7 +53,7 @@ public class AccumuloResult extends ResultBase public AccumuloResult(DataStore dataStore, Query query, Scanner scanner) { super(dataStore, query); -if (this.limit > -1) { +if (this.limit > 0) { scanner.setBatchSize((int) this.limit); } iterator = new RowIterator(scanner.iterator()); @@ -98,5 +98,4 @@ public class AccumuloResult extends ResultBase public int size() { return (int) this.limit; } - } http://git-wip-us.apache.org/repos/asf/gora/blob/8d99c055/gora-accumulo/src/test/java/org/apache/gora/accumulo/store/AccumuloStoreTest.java -- diff --git a/gora-accumulo/src/test/java/org/apache/gora/accumulo/store/AccumuloStoreTest.java b/gora-accumulo/src/test/java/org/apache/gora/accumulo/store/AccumuloStoreTest.java index f8b7526..54f5519 100644 --- a/gora-accumulo/src/test/java/org/apache/gora/accumulo/store/AccumuloStoreTest.java +++ b/gora-accumulo/src/test/java/org/apache/gora/accumulo/store/AccumuloStoreTest.java @@ -24,9 +24,13 @@ import org.apache.gora.examples.generated.WebPage; import org.apache.gora.store.DataStore; import org.apache.gora.store.DataStoreFactory; import org.apache.gora.store.DataStoreTestBase; +import static org.apache.gora.store.DataStoreTestBase.log; +import org.apache.gora.store.DataStoreTestUtil; +import static org.apache.gora.store.DataStoreTestUtil.testResultSize; import org.apache.hadoop.conf.Configuration; import org.junit.Before; import org.junit.Ignore; +import org.junit.Test; /** * Tests extending {@link org.apache.gora.store.DataStoreTestBase} @@ -57,4 +61,27 @@ public class AccumuloStoreTest extends DataStoreTestBase { @Override public void testDeleteByQueryFields() throws IOException { } + + @Test + @Ignore("Accumulo does not support Result#size() without limit set") + @Override + public void testResultSize() throws Exception { + } + + @Test + @Ignore("Accumulo does not support Result#size() without limit set") + @Override + public void testResultSizeStartKey() throws Exception { + } + + @Ignore("Accumulo does not support Result#size() without limit set") + @Override + public void testResultSizeEndKey() throws Exception { + } + + @Test + @Ignore("Accumulo does not support Result#size() without limit set") + @Override + public void testResultSizeKeyRange() throws Exception { + } } http://git-wip-us.apache.org/repos/asf/gora/blob/8d99c055/gora-core/src/main/java/org/apache/gora/avro/query/DataFileAvroResult.java
[6/8] gora git commit: Fix formatting code
Fix formatting code Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/3dada3ae Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/3dada3ae Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/3dada3ae Branch: refs/heads/master Commit: 3dada3ae68d58491197deb8a3c1cc3f5504a48f8 Parents: 5c3acdc Author: Carlos Rodrigo MuñozAuthored: Wed May 2 14:48:22 2018 -0500 Committer: Carlos Rodrigo Muñoz Committed: Wed May 2 14:48:22 2018 -0500 -- gora-core/src/main/java/org/apache/gora/memory/store/MemStore.java | 2 +- .../src/main/java/org/apache/gora/jcache/query/JCacheResult.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/3dada3ae/gora-core/src/main/java/org/apache/gora/memory/store/MemStore.java -- diff --git a/gora-core/src/main/java/org/apache/gora/memory/store/MemStore.java b/gora-core/src/main/java/org/apache/gora/memory/store/MemStore.java index 5d204eb..ce0d336 100644 --- a/gora-core/src/main/java/org/apache/gora/memory/store/MemStore.java +++ b/gora-core/src/main/java/org/apache/gora/memory/store/MemStore.java @@ -94,7 +94,7 @@ public class MemStore extends DataStoreBase { public int size() { int totalSize = map.navigableKeySet().size(); int intLimit = (int)this.limit; - return intLimit > 0 && totalSize>intLimit ? intLimit : totalSize; + return intLimit > 0 && totalSize > intLimit ? intLimit : totalSize; } } http://git-wip-us.apache.org/repos/asf/gora/blob/3dada3ae/gora-jcache/src/main/java/org/apache/gora/jcache/query/JCacheResult.java -- diff --git a/gora-jcache/src/main/java/org/apache/gora/jcache/query/JCacheResult.java b/gora-jcache/src/main/java/org/apache/gora/jcache/query/JCacheResult.java index 6048e12..ee26c74 100644 --- a/gora-jcache/src/main/java/org/apache/gora/jcache/query/JCacheResult.java +++ b/gora-jcache/src/main/java/org/apache/gora/jcache/query/JCacheResult.java @@ -88,4 +88,4 @@ public class JCacheResult extends ResultBase int intLimit = (int)this.limit; return intLimit > 0 && totalSize>intLimit ? intLimit : totalSize; } -} +} \ No newline at end of file
[1/8] gora git commit: Add #size() to Result API: Aerospike, Cassandra, CouchDB, DynamoDB, MongoDB, OrientDB, JCache, Solr, Mock, Mem.
Repository: gora Updated Branches: refs/heads/master dc70b14b5 -> fb4b3552a Add #size() to Result API: Aerospike, Cassandra, CouchDB, DynamoDB, MongoDB, OrientDB, JCache, Solr, Mock, Mem. Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/76cc89cd Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/76cc89cd Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/76cc89cd Branch: refs/heads/master Commit: 76cc89cddd2cbda42518de8e304e92e3f341a744 Parents: e2d7341 Author: Carlos MuñozAuthored: Thu Mar 22 00:06:56 2018 -0500 Committer: Carlos Muñoz Committed: Thu Mar 22 00:11:05 2018 -0500 -- .../java/org/apache/gora/accumulo/query/AccumuloResult.java | 5 + .../org/apache/gora/aerospike/query/AerospikeQueryResult.java | 5 + .../org/apache/gora/cassandra/query/CassandraResultSet.java | 5 + .../src/main/java/org/apache/gora/avro/query/AvroResult.java | 5 + .../java/org/apache/gora/avro/query/DataFileAvroResult.java | 5 + .../src/main/java/org/apache/gora/memory/store/MemStore.java | 5 + gora-core/src/main/java/org/apache/gora/query/Result.java | 7 ++- .../test/java/org/apache/gora/mock/store/MockDataStore.java | 5 + .../java/org/apache/gora/couchdb/query/CouchDBResult.java | 5 + .../java/org/apache/gora/dynamodb/query/DynamoDBResult.java | 5 + .../main/java/org/apache/gora/hbase/query/HBaseGetResult.java | 5 + .../java/org/apache/gora/hbase/query/HBaseScannerResult.java | 5 + .../org/apache/gora/infinispan/query/InfinispanResult.java| 1 + .../main/java/org/apache/gora/jcache/query/JCacheResult.java | 5 + .../java/org/apache/gora/mongodb/query/MongoDBResult.java | 5 + .../java/org/apache/gora/orientdb/query/OrientDBResult.java | 5 + .../src/main/java/org/apache/gora/solr/query/SolrResult.java | 5 + 17 files changed, 82 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/76cc89cd/gora-accumulo/src/main/java/org/apache/gora/accumulo/query/AccumuloResult.java -- diff --git a/gora-accumulo/src/main/java/org/apache/gora/accumulo/query/AccumuloResult.java b/gora-accumulo/src/main/java/org/apache/gora/accumulo/query/AccumuloResult.java index 08ebeca..072c004 100644 --- a/gora-accumulo/src/main/java/org/apache/gora/accumulo/query/AccumuloResult.java +++ b/gora-accumulo/src/main/java/org/apache/gora/accumulo/query/AccumuloResult.java @@ -88,5 +88,10 @@ public class AccumuloResult extends ResultBase return true; } + +@Override +public int size() { +throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. +} } http://git-wip-us.apache.org/repos/asf/gora/blob/76cc89cd/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 c843082..bc5288f 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 @@ -85,4 +85,9 @@ public class AerospikeQueryResult extends ResultBase extends ResultBase 0 && offset >= limit) || (offset >= size); } + +@Override +public int size() { +return size; +} }
[5/8] gora git commit: Merge https://github.com/apache/gora into GORA-444
Merge https://github.com/apache/gora into GORA-444 Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/5c3acdcb Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/5c3acdcb Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/5c3acdcb Branch: refs/heads/master Commit: 5c3acdcbe14ee0d5174ae0a22c4222676342d82e Parents: 8d99c05 dc70b14 Author: devAuthored: Tue May 1 00:54:48 2018 -0500 Committer: dev Committed: Tue May 1 00:54:48 2018 -0500 -- .../gora/accumulo/store/AccumuloStore.java | 55 ++-- .../gora/aerospike/store/AerospikeStore.java| 6 -- .../cassandra/serializers/AvroSerializer.java | 5 -- .../serializers/CassandraSerializer.java| 5 -- .../cassandra/serializers/NativeSerializer.java | 5 -- .../gora/cassandra/store/CassandraStore.java| 5 -- .../org/apache/gora/avro/store/AvroStore.java | 2 - .../gora/avro/store/DataFileAvroStore.java | 2 - .../org/apache/gora/memory/store/MemStore.java | 1 - .../gora/persistency/impl/BeanFactoryImpl.java | 3 - .../apache/gora/store/impl/DataStoreBase.java | 2 - .../store/impl/FileBackedDataStoreBase.java | 2 - .../store/ws/impl/WSBackedDataStoreBase.java| 1 - .../apache/gora/couchdb/store/CouchDBStore.java | 15 + .../dynamodb/store/DynamoDBNativeStore.java | 6 -- .../gora/dynamodb/store/DynamoDBStore.java | 3 - .../org/apache/gora/hbase/store/HBaseStore.java | 14 +--- .../gora/infinispan/store/InfinispanClient.java | 2 - .../gora/infinispan/store/InfinispanStore.java | 8 --- .../apache/gora/jcache/store/JCacheStore.java | 68 +--- .../apache/gora/mongodb/store/MongoStore.java | 9 --- .../gora/orientdb/store/OrientDBStore.java | 11 .../org/apache/gora/solr/query/SolrResult.java | 1 - .../org/apache/gora/solr/store/SolrStore.java | 16 + pom.xml | 9 +++ 25 files changed, 63 insertions(+), 193 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/5c3acdcb/gora-core/src/main/java/org/apache/gora/memory/store/MemStore.java -- http://git-wip-us.apache.org/repos/asf/gora/blob/5c3acdcb/gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseStore.java -- http://git-wip-us.apache.org/repos/asf/gora/blob/5c3acdcb/gora-solr/src/main/java/org/apache/gora/solr/query/SolrResult.java --
[3/8] gora git commit: fix 2 space indents
fix 2 space indents Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/eb493741 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/eb493741 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/eb493741 Branch: refs/heads/master Commit: eb4937418e700af5f8518f66e3d29bfc4d110798 Parents: 0ee48ab Author: Carlos MuñozAuthored: Sat Mar 24 14:53:46 2018 -0500 Committer: Carlos Muñoz Committed: Sat Mar 24 14:53:46 2018 -0500 -- .../gora/accumulo/query/AccumuloResult.java | 22 ++-- .../aerospike/query/AerospikeQueryResult.java | 8 +++ .../cassandra/query/CassandraResultSet.java | 8 +++ .../org/apache/gora/avro/query/AvroResult.java | 18 .../gora/avro/query/DataFileAvroResult.java | 8 +++ .../org/apache/gora/memory/store/MemStore.java | 8 +++ .../apache/gora/mock/store/MockDataStore.java | 8 +++ .../gora/couchdb/query/CouchDBResult.java | 8 +++ .../gora/dynamodb/query/DynamoDBResult.java | 8 +++ .../apache/gora/hbase/query/HBaseGetResult.java | 8 +++ .../gora/hbase/query/HBaseScannerResult.java| 18 .../org/apache/gora/hbase/store/HBaseStore.java | 2 +- .../apache/gora/jcache/query/JCacheResult.java | 8 +++ .../gora/mongodb/query/MongoDBResult.java | 8 +++ .../gora/orientdb/query/OrientDBResult.java | 8 +++ .../org/apache/gora/solr/query/SolrResult.java | 8 +++ 16 files changed, 78 insertions(+), 78 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/eb493741/gora-accumulo/src/main/java/org/apache/gora/accumulo/query/AccumuloResult.java -- diff --git a/gora-accumulo/src/main/java/org/apache/gora/accumulo/query/AccumuloResult.java b/gora-accumulo/src/main/java/org/apache/gora/accumulo/query/AccumuloResult.java index 23fdc1c..7c208f8 100644 --- a/gora-accumulo/src/main/java/org/apache/gora/accumulo/query/AccumuloResult.java +++ b/gora-accumulo/src/main/java/org/apache/gora/accumulo/query/AccumuloResult.java @@ -53,8 +53,8 @@ public class AccumuloResult extends ResultBase public AccumuloResult(DataStore dataStore, Query query, Scanner scanner) { super(dataStore, query); -if (this.limit>-1){ -scanner.setBatchSize((int)this.limit); +if (this.limit > -1) { + scanner.setBatchSize((int) this.limit); } iterator = new RowIterator(scanner.iterator()); } @@ -64,11 +64,11 @@ public class AccumuloResult extends ResultBase */ @Override public float getProgress() throws IOException { - if (this.limit!=-1){ -return (float)this.offset/(float)this.limit; - }else{ - return 0; - } +if (this.limit != -1) { + return (float) this.offset / (float) this.limit; +} else { + return 0; +} } @Override @@ -94,9 +94,9 @@ public class AccumuloResult extends ResultBase return true; } -@Override -public int size() { -return (int)this.limit; -} + @Override + public int size() { +return (int) this.limit; + } } http://git-wip-us.apache.org/repos/asf/gora/blob/eb493741/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 bc5288f..beef25d 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 @@ -86,8 +86,8 @@ public class AerospikeQueryResult extends ResultBase
[8/8] gora git commit: -Fix formatting code
-Fix formatting code Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/fb4b3552 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/fb4b3552 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/fb4b3552 Branch: refs/heads/master Commit: fb4b3552a497ea082cec27c69512e7f91dbca619 Parents: 791e14c Author: devAuthored: Sun May 6 14:30:26 2018 -0500 Committer: dev Committed: Sun May 6 14:30:26 2018 -0500 -- .../gora/accumulo/store/AccumuloStoreTest.java | 6 +- .../org/apache/gora/memory/store/MemStore.java | 2 +- .../apache/gora/store/DataStoreTestBase.java| 14 ++--- .../apache/gora/store/DataStoreTestUtil.java| 63 ++-- .../apache/gora/hbase/store/TestHBaseStore.java | 6 +- .../apache/gora/jcache/query/JCacheResult.java | 4 +- .../gora/orientdb/query/OrientDBResult.java | 4 +- .../org/apache/gora/solr/query/SolrResult.java | 4 +- 8 files changed, 53 insertions(+), 50 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/fb4b3552/gora-accumulo/src/test/java/org/apache/gora/accumulo/store/AccumuloStoreTest.java -- diff --git a/gora-accumulo/src/test/java/org/apache/gora/accumulo/store/AccumuloStoreTest.java b/gora-accumulo/src/test/java/org/apache/gora/accumulo/store/AccumuloStoreTest.java index 54f5519..adeb8b0 100644 --- a/gora-accumulo/src/test/java/org/apache/gora/accumulo/store/AccumuloStoreTest.java +++ b/gora-accumulo/src/test/java/org/apache/gora/accumulo/store/AccumuloStoreTest.java @@ -67,18 +67,18 @@ public class AccumuloStoreTest extends DataStoreTestBase { @Override public void testResultSize() throws Exception { } - + @Test @Ignore("Accumulo does not support Result#size() without limit set") @Override public void testResultSizeStartKey() throws Exception { } - + @Ignore("Accumulo does not support Result#size() without limit set") @Override public void testResultSizeEndKey() throws Exception { } - + @Test @Ignore("Accumulo does not support Result#size() without limit set") @Override http://git-wip-us.apache.org/repos/asf/gora/blob/fb4b3552/gora-core/src/main/java/org/apache/gora/memory/store/MemStore.java -- diff --git a/gora-core/src/main/java/org/apache/gora/memory/store/MemStore.java b/gora-core/src/main/java/org/apache/gora/memory/store/MemStore.java index ce0d336..4404e03 100644 --- a/gora-core/src/main/java/org/apache/gora/memory/store/MemStore.java +++ b/gora-core/src/main/java/org/apache/gora/memory/store/MemStore.java @@ -93,7 +93,7 @@ public class MemStore extends DataStoreBase { @Override public int size() { int totalSize = map.navigableKeySet().size(); - int intLimit = (int)this.limit; + int intLimit = (int) this.limit; return intLimit > 0 && totalSize > intLimit ? intLimit : totalSize; } } http://git-wip-us.apache.org/repos/asf/gora/blob/fb4b3552/gora-core/src/test/java/org/apache/gora/store/DataStoreTestBase.java -- diff --git a/gora-core/src/test/java/org/apache/gora/store/DataStoreTestBase.java b/gora-core/src/test/java/org/apache/gora/store/DataStoreTestBase.java index 625df39..37a3dea 100644 --- a/gora-core/src/test/java/org/apache/gora/store/DataStoreTestBase.java +++ b/gora-core/src/test/java/org/apache/gora/store/DataStoreTestBase.java @@ -364,43 +364,43 @@ public abstract class DataStoreTestBase { log.info("test method: testResultSize"); DataStoreTestUtil.testResultSizeWebPages(webPageStore); } - + @Test public void testResultSizeStartKey() throws Exception { log.info("test method: testResultSizeStartKey"); DataStoreTestUtil.testResultSizeWebPagesStartKey(webPageStore); } - + @Test public void testResultSizeEndKey() throws Exception { log.info("test method: testResultSizeEndKey"); DataStoreTestUtil.testResultSizeWebPagesEndKey(webPageStore); } - + @Test public void testResultSizeKeyRange() throws Exception { log.info("test method: testResultSizeKeyRange"); DataStoreTestUtil.testResultSizeWebPagesKeyRange(webPageStore); } - + @Test public void testResultSizeWithLimit() throws Exception { log.info("test method: testResultSizeWithLimit"); DataStoreTestUtil.testResultSizeWebPagesWithLimit(webPageStore); } - + @Test public void testResultSizeStartKeyWithLimit() throws Exception { log.info("test method: testResultSizeStartKeyWithLimit"); DataStoreTestUtil.testResultSizeWebPagesStartKeyWithLimit(webPageStore); } - +
[2/8] gora git commit: Add #size() to Result API: Accumulo, Avro, HBase Set batch size using query.limit
Add #size() to Result API: Accumulo, Avro, HBase Set batch size using query.limit Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/0ee48ab3 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/0ee48ab3 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/0ee48ab3 Branch: refs/heads/master Commit: 0ee48ab3d96445a280852a1fd04206efb883baa9 Parents: 76cc89c Author: Carlos MuñozAuthored: Thu Mar 22 00:59:02 2018 -0500 Committer: Carlos Muñoz Committed: Thu Mar 22 00:59:02 2018 -0500 -- .../org/apache/gora/accumulo/query/AccumuloResult.java | 13 + .../java/org/apache/gora/avro/query/AvroResult.java| 9 ++--- .../org/apache/gora/avro/query/DataFileAvroResult.java | 2 +- .../org/apache/gora/hbase/query/HBaseGetResult.java| 2 +- .../apache/gora/hbase/query/HBaseScannerResult.java| 9 ++--- .../java/org/apache/gora/hbase/store/HBaseStore.java | 2 +- 6 files changed, 24 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/0ee48ab3/gora-accumulo/src/main/java/org/apache/gora/accumulo/query/AccumuloResult.java -- diff --git a/gora-accumulo/src/main/java/org/apache/gora/accumulo/query/AccumuloResult.java b/gora-accumulo/src/main/java/org/apache/gora/accumulo/query/AccumuloResult.java index 072c004..23fdc1c 100644 --- a/gora-accumulo/src/main/java/org/apache/gora/accumulo/query/AccumuloResult.java +++ b/gora-accumulo/src/main/java/org/apache/gora/accumulo/query/AccumuloResult.java @@ -53,7 +53,9 @@ public class AccumuloResult extends ResultBase public AccumuloResult(DataStore dataStore, Query query, Scanner scanner) { super(dataStore, query); -// TODO set batch size based on limit, and construct iterator later +if (this.limit>-1){ +scanner.setBatchSize((int)this.limit); +} iterator = new RowIterator(scanner.iterator()); } @@ -62,8 +64,11 @@ public class AccumuloResult extends ResultBase */ @Override public float getProgress() throws IOException { -// TODO Auto-generated method stub -return 0; + if (this.limit!=-1){ +return (float)this.offset/(float)this.limit; + }else{ + return 0; + } } @Override @@ -91,7 +96,7 @@ public class AccumuloResult extends ResultBase @Override public int size() { -throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. +return (int)this.limit; } } http://git-wip-us.apache.org/repos/asf/gora/blob/0ee48ab3/gora-core/src/main/java/org/apache/gora/avro/query/AvroResult.java -- diff --git a/gora-core/src/main/java/org/apache/gora/avro/query/AvroResult.java b/gora-core/src/main/java/org/apache/gora/avro/query/AvroResult.java index 75d470f..ab421de 100644 --- a/gora-core/src/main/java/org/apache/gora/avro/query/AvroResult.java +++ b/gora-core/src/main/java/org/apache/gora/avro/query/AvroResult.java @@ -48,8 +48,11 @@ public class AvroResult extends ResultBase { @Override public float getProgress() throws IOException { -//TODO: FIXME -return 0; + if (this.limit!=-1){ +return (float)this.offset/(float)this.limit; + }else{ + return 0; + } } @Override @@ -70,6 +73,6 @@ public class AvroResult extends ResultBase { @Override public int size() { -throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. +return (int)limit; } } http://git-wip-us.apache.org/repos/asf/gora/blob/0ee48ab3/gora-core/src/main/java/org/apache/gora/avro/query/DataFileAvroResult.java -- diff --git a/gora-core/src/main/java/org/apache/gora/avro/query/DataFileAvroResult.java b/gora-core/src/main/java/org/apache/gora/avro/query/DataFileAvroResult.java index 45029a2..23dd879 100644 --- a/gora-core/src/main/java/org/apache/gora/avro/query/DataFileAvroResult.java +++ b/gora-core/src/main/java/org/apache/gora/avro/query/DataFileAvroResult.java @@ -84,7 +84,7 @@ public class DataFileAvroResult extends ResultBase< @Override public int size() { -throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. +return (int) (end -
gora git commit: GORA-536: Avoid calling Class#newInstance
Repository: gora Updated Branches: refs/heads/carlospr [created] a8398651d GORA-536: Avoid calling Class#newInstance When using reflexion use getDeclaredConstructor().newInstance() instead of Class::newInstance because it may throw undeclared checked exceptions. Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/a8398651 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/a8398651 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/a8398651 Branch: refs/heads/carlospr Commit: a8398651d0b75fe9f161496b266b43d6382399b8 Parents: fb4b355 Author: devAuthored: Mon May 21 23:23:39 2018 -0500 Committer: dev Committed: Mon May 21 23:23:39 2018 -0500 -- .../gora/accumulo/store/AccumuloStore.java | 7 +++-- .../gora/cassandra/store/CassandraClient.java | 2 +- .../gora/cassandra/store/CassandraStore.java| 4 +-- .../gora/persistency/impl/BeanFactoryImpl.java | 2 +- .../persistency/ws/impl/BeanFactoryWSImpl.java | 8 +++--- .../dynamodb/store/DynamoDBNativeStore.java | 6 +++-- .../goraci/chef/ChefSoftwareProvisioning.java | 19 -- .../rackspace/RackspaceOrchestration.java | 27 .../gora/infinispan/store/InfinispanClient.java | 2 +- .../gora/infinispan/store/InfinispanStore.java | 2 +- 10 files changed, 47 insertions(+), 32 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/a8398651/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java -- diff --git a/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java b/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java index 3c5ae14..f35aac9 100644 --- a/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java +++ b/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java @@ -18,6 +18,7 @@ package org.apache.gora.accumulo.store; import java.io.ByteArrayOutputStream; import java.io.IOException; +import java.lang.reflect.InvocationTargetException; import java.net.InetAddress; import java.nio.ByteBuffer; import java.util.ArrayList; @@ -374,7 +375,7 @@ public class AccumuloStore extends DataStoreBase extends DataStoreBase
gora git commit: GORA-536: Avoid calling Class#newInstance
Repository: gora Updated Branches: refs/heads/master fb4b3552a -> a8398651d GORA-536: Avoid calling Class#newInstance When using reflexion use getDeclaredConstructor().newInstance() instead of Class::newInstance because it may throw undeclared checked exceptions. Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/a8398651 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/a8398651 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/a8398651 Branch: refs/heads/master Commit: a8398651d0b75fe9f161496b266b43d6382399b8 Parents: fb4b355 Author: devAuthored: Mon May 21 23:23:39 2018 -0500 Committer: dev Committed: Mon May 21 23:23:39 2018 -0500 -- .../gora/accumulo/store/AccumuloStore.java | 7 +++-- .../gora/cassandra/store/CassandraClient.java | 2 +- .../gora/cassandra/store/CassandraStore.java| 4 +-- .../gora/persistency/impl/BeanFactoryImpl.java | 2 +- .../persistency/ws/impl/BeanFactoryWSImpl.java | 8 +++--- .../dynamodb/store/DynamoDBNativeStore.java | 6 +++-- .../goraci/chef/ChefSoftwareProvisioning.java | 19 -- .../rackspace/RackspaceOrchestration.java | 27 .../gora/infinispan/store/InfinispanClient.java | 2 +- .../gora/infinispan/store/InfinispanStore.java | 2 +- 10 files changed, 47 insertions(+), 32 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/a8398651/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java -- diff --git a/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java b/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java index 3c5ae14..f35aac9 100644 --- a/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java +++ b/gora-accumulo/src/main/java/org/apache/gora/accumulo/store/AccumuloStore.java @@ -18,6 +18,7 @@ package org.apache.gora.accumulo.store; import java.io.ByteArrayOutputStream; import java.io.IOException; +import java.lang.reflect.InvocationTargetException; import java.net.InetAddress; import java.nio.ByteBuffer; import java.util.ArrayList; @@ -374,7 +375,7 @@ public class AccumuloStore extends DataStoreBase extends DataStoreBase
[02/11] gora git commit: create template gora-ignite module
create template gora-ignite module Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/4346216f Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/4346216f Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/4346216f Branch: refs/heads/master Commit: 4346216ffbed9a9adef2b90589436de543167c4c Parents: fb4b355 Author: Carlos Rodrigo Muñoz Authored: Mon May 7 23:00:44 2018 -0500 Committer: Carlos Rodrigo Muñoz Committed: Mon May 7 23:01:18 2018 -0500 -- gora-ignite/pom.xml | 177 +++ gora-ignite/src/examples/java/.gitignore| 15 + .../gora/ignite/encoders/BinaryEncoder.java | 191 .../apache/gora/ignite/encoders/Encoder.java| 72 ++ .../apache/gora/ignite/encoders/HexEncoder.java | 204 .../ignite/encoders/SignedBinaryEncoder.java| 110 ++ .../org/apache/gora/ignite/encoders/Utils.java | 91 ++ .../gora/ignite/encoders/package-info.java | 20 + .../org/apache/gora/ignite/package-info.java| 20 + .../apache/gora/ignite/query/IgniteQuery.java | 45 + .../apache/gora/ignite/query/IgniteResult.java | 101 ++ .../apache/gora/ignite/query/package-info.java | 21 + .../apache/gora/ignite/store/IgniteMapping.java | 44 + .../apache/gora/ignite/store/IgniteStore.java | 1034 ++ .../apache/gora/ignite/store/package-info.java | 20 + .../ignite/util/FixedByteArrayOutputStream.java | 45 + .../apache/gora/ignite/util/package-info.java | 20 + .../gora/ignite/GoraIgniteTestDriver.java | 73 ++ .../org/apache/gora/ignite/package-info.java| 21 + .../ignite/store/AuthenticationTokenTest.java | 90 ++ .../gora/ignite/store/IgniteStoreTest.java | 87 ++ .../apache/gora/ignite/store/PartitionTest.java | 96 ++ .../apache/gora/ignite/store/package-info.java | 21 + .../apache/gora/ignite/util/HexEncoderTest.java | 56 + .../ignite/util/SignedBinaryEncoderTest.java| 167 +++ .../apache/gora/ignite/util/package-info.java | 20 + .../test/resources/gora-accumulo-mapping.xml| 59 + gora-ignite/src/test/resources/gora.properties | 21 + pom.xml |1 + 29 files changed, 2942 insertions(+) -- http://git-wip-us.apache.org/repos/asf/gora/blob/4346216f/gora-ignite/pom.xml -- diff --git a/gora-ignite/pom.xml b/gora-ignite/pom.xml new file mode 100644 index 000..ddd3a4a --- /dev/null +++ b/gora-ignite/pom.xml @@ -0,0 +1,177 @@ + + +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/xsd/maven-4.0.0.xsd;> + 4.0.0 + + +org.apache.gora +gora +0.9-SNAPSHOT +../ + + gora-ignite + bundle + + Apache Gora :: Ignite + http://gora.apache.org + The Apache Gora open source framework provides an in-memory data model and +persistence for big data. Gora supports persisting to column stores, key value stores, +document stores and RDBMSs, and analyzing the data with extensive Apache Hadoop MapReduce +support. + 2010 + +The Apache Software Foundation +http://www.apache.org/ + + +JIRA +https://issues.apache.org/jira/browse/GORA + + +Jenkins +https://builds.apache.org/job/Gora-trunk/ + + + +1.7.1 +* + org.apache.gora.ignite*;version="${project.version}";-noimport:=true + + + +target +target/classes +${project.artifactId}-${project.version} +target/test-classes +src/test/java +src/main/java + + +${project.basedir}/src/test/resources + + **/* + + + + + + +org.codehaus.mojo +build-helper-maven-plugin +${build-helper-maven-plugin.version} + + +generate-sources + + add-source + + + +src/examples/java + + + + + + + + + + + + org.apache.gora + gora-core + + + + org.apache.gora + gora-core + test-jar + test + + + + + org.apache.ignite + ignite-core + ${ignite.version} + + + + org.apache.ignite + ignite-minicluster + ${ignite.version} + test + + + + commons-io + commons-io + + + + + jline + jline + 2.11 + test + + + + org.apache.zookeeper + zookeeper + test + + + + org.apache.avro + avro + + + + + org.slf4j + slf4j-log4j12 + + + log4j + log4j + +
[06/11] gora git commit: Implement schema handling methods
Implement schema handling methods The basic schema creation/deletion methods are implemented for the Ignite backend. In addition, all the SQL generation code was moved to a separate class. Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/b1e2ae4c Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/b1e2ae4c Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/b1e2ae4c Branch: refs/heads/master Commit: b1e2ae4c902691bbce02a90b76c4bee1c6e58455 Parents: 7545170 Author: Carlos M Authored: Tue Jun 26 23:18:19 2018 -0500 Committer: Carlos M Committed: Tue Jun 26 23:18:19 2018 -0500 -- .../apache/gora/ignite/store/IgniteStore.java | 37 +-- .../gora/ignite/utils/IgniteSQLBuilder.java | 69 gora-ignite/src/test/resources/gora.properties | 4 +- 3 files changed, 101 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/b1e2ae4c/gora-ignite/src/main/java/org/apache/gora/ignite/store/IgniteStore.java -- diff --git a/gora-ignite/src/main/java/org/apache/gora/ignite/store/IgniteStore.java b/gora-ignite/src/main/java/org/apache/gora/ignite/store/IgniteStore.java index d52d10e..ebc2943 100644 --- a/gora-ignite/src/main/java/org/apache/gora/ignite/store/IgniteStore.java +++ b/gora-ignite/src/main/java/org/apache/gora/ignite/store/IgniteStore.java @@ -22,11 +22,9 @@ import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; -import java.text.MessageFormat; import java.util.List; -import java.util.Locale; import java.util.Properties; -import java.util.logging.Level; +import org.apache.gora.ignite.utils.IgniteSQLBuilder; import org.apache.gora.persistency.impl.PersistentBase; import org.apache.gora.query.PartitionQuery; import org.apache.gora.query.Query; @@ -105,20 +103,45 @@ public class IgniteStore extends DataStoreBasehttp://git-wip-us.apache.org/repos/asf/gora/blob/b1e2ae4c/gora-ignite/src/main/java/org/apache/gora/ignite/utils/IgniteSQLBuilder.java -- diff --git a/gora-ignite/src/main/java/org/apache/gora/ignite/utils/IgniteSQLBuilder.java b/gora-ignite/src/main/java/org/apache/gora/ignite/utils/IgniteSQLBuilder.java new file mode 100644 index 000..0480fd4 --- /dev/null +++ b/gora-ignite/src/main/java/org/apache/gora/ignite/utils/IgniteSQLBuilder.java @@ -0,0 +1,69 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.apache.gora.ignite.utils; + +import avro.shaded.com.google.common.collect.Lists; +import java.text.MessageFormat; +import java.util.ArrayList; +import java.util.Locale; +import java.util.Map; +import org.apache.gora.ignite.store.Column; +import org.apache.gora.ignite.store.IgniteMapping; + +/** + * + * SQL Builder utility for Ignite. + */ +public class IgniteSQLBuilder { + + private static String format(String pattern, Object... args) { +MessageFormat messageFormat = new MessageFormat(pattern, Locale.getDefault()); +return messageFormat.format(args); + } + + public static String tableExists(String tableName) { +return format("SELECT * FROM {0} LIMIT 0", tableName); + } + + public static String createTable(IgniteMapping mapping) { +StringBuilder sqlBuilder = new StringBuilder(); +sqlBuilder.append("CREATE TABLE "); +sqlBuilder.append(mapping.getTableName()); +sqlBuilder.append("("); +ArrayList> fieldsList = Lists.newArrayList(mapping.getFields().entrySet()); +for (Map.Entry aField : fieldsList) { + Column aColumn = aField.getValue(); + String name = aColumn.getName(); + Column.FieldType dataType = aColumn.getDataType(); + sqlBuilder.append(name).append(" ").append(dataType.toString()).append(","); +} +sqlBuilder.append("PRIMARY KEY "); +sqlBuilder.append("("); +for (int i = 0; i < mapping.getPrimaryKey().size(); i++) { + sqlBuilder.append(mapping.getPrimaryKey().get(i)); +
[03/11] gora git commit: Merge branch 'master' of https://github.com/apache/gora into GORA-535
Merge branch 'master' of https://github.com/apache/gora into GORA-535 Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/7d671376 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/7d671376 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/7d671376 Branch: refs/heads/master Commit: 7d671376a47a7251dad9df2e8176946b4ddb3420 Parents: 4346216 a839865 Author: Carlos M Authored: Sun Jun 3 17:35:36 2018 -0500 Committer: Carlos M Committed: Sun Jun 3 17:35:36 2018 -0500 -- .../gora/accumulo/store/AccumuloStore.java | 7 +++-- .../gora/cassandra/store/CassandraClient.java | 2 +- .../gora/cassandra/store/CassandraStore.java| 4 +-- .../gora/persistency/impl/BeanFactoryImpl.java | 2 +- .../persistency/ws/impl/BeanFactoryWSImpl.java | 8 +++--- .../dynamodb/store/DynamoDBNativeStore.java | 6 +++-- .../goraci/chef/ChefSoftwareProvisioning.java | 19 -- .../rackspace/RackspaceOrchestration.java | 27 .../gora/infinispan/store/InfinispanClient.java | 2 +- .../gora/infinispan/store/InfinispanStore.java | 2 +- 10 files changed, 47 insertions(+), 32 deletions(-) --
[07/11] gora git commit: Implement put, get, delete
Implement put, get, delete The operations put, get and delete are implemented for the Ignite backend. In addition, primary key mapping is improved. Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/db7540e0 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/db7540e0 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/db7540e0 Branch: refs/heads/master Commit: db7540e045fc07ef39d37163a263615c6e580efe Parents: b1e2ae4 Author: Carlos M Authored: Mon Jul 2 00:50:43 2018 -0500 Committer: Carlos M Committed: Mon Jul 2 00:50:43 2018 -0500 -- .../apache/gora/ignite/store/IgniteMapping.java | 6 +- .../gora/ignite/store/IgniteMappingBuilder.java | 6 +- .../apache/gora/ignite/store/IgniteStore.java | 323 ++- .../gora/ignite/utils/IgniteSQLBuilder.java | 90 +- .../src/test/resources/gora-ignite-mapping.xml | 10 +- 5 files changed, 412 insertions(+), 23 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/db7540e0/gora-ignite/src/main/java/org/apache/gora/ignite/store/IgniteMapping.java -- diff --git a/gora-ignite/src/main/java/org/apache/gora/ignite/store/IgniteMapping.java b/gora-ignite/src/main/java/org/apache/gora/ignite/store/IgniteMapping.java index 2e59da1..c0e7a98 100644 --- a/gora-ignite/src/main/java/org/apache/gora/ignite/store/IgniteMapping.java +++ b/gora-ignite/src/main/java/org/apache/gora/ignite/store/IgniteMapping.java @@ -27,7 +27,7 @@ public class IgniteMapping { private String tableName; private Map fields; - private List primaryKey; + private List primaryKey; public IgniteMapping() { fields = new HashMap<>(); @@ -49,11 +49,11 @@ public class IgniteMapping { this.fields = fields; } - public List getPrimaryKey() { + public List getPrimaryKey() { return primaryKey; } - public void setPrimaryKey(List primaryKey) { + public void setPrimaryKey(List primaryKey) { this.primaryKey = primaryKey; } http://git-wip-us.apache.org/repos/asf/gora/blob/db7540e0/gora-ignite/src/main/java/org/apache/gora/ignite/store/IgniteMappingBuilder.java -- diff --git a/gora-ignite/src/main/java/org/apache/gora/ignite/store/IgniteMappingBuilder.java b/gora-ignite/src/main/java/org/apache/gora/ignite/store/IgniteMappingBuilder.java index 81a3fae..3d245ea 100644 --- a/gora-ignite/src/main/java/org/apache/gora/ignite/store/IgniteMappingBuilder.java +++ b/gora-ignite/src/main/java/org/apache/gora/ignite/store/IgniteMappingBuilder.java @@ -80,9 +80,11 @@ public class IgniteMappingBuilder { String tableName = dataStore.getSchemaName(tableNameFromMapping, dataStore.getPersistentClass()); igniteMapping.setTableName(tableName); List prColumns = classElement.getChildren("primarykey"); - List prFields = new ArrayList<>(); + List prFields = new ArrayList<>(); for (Element aPrimaryKey : prColumns) { -prFields.add(aPrimaryKey.getAttributeValue("column")); +String name = aPrimaryKey.getAttributeValue("column"); +String type = aPrimaryKey.getAttributeValue("type"); +prFields.add(new Column(name, Column.FieldType.valueOf(type))); } igniteMapping.setPrimaryKey(prFields); List fields = classElement.getChildren("field"); http://git-wip-us.apache.org/repos/asf/gora/blob/db7540e0/gora-ignite/src/main/java/org/apache/gora/ignite/store/IgniteStore.java -- diff --git a/gora-ignite/src/main/java/org/apache/gora/ignite/store/IgniteStore.java b/gora-ignite/src/main/java/org/apache/gora/ignite/store/IgniteStore.java index ebc2943..497e161 100644 --- a/gora-ignite/src/main/java/org/apache/gora/ignite/store/IgniteStore.java +++ b/gora-ignite/src/main/java/org/apache/gora/ignite/store/IgniteStore.java @@ -17,20 +17,34 @@ package org.apache.gora.ignite.store; import java.io.IOException; +import java.nio.ByteBuffer; import java.sql.Connection; import java.sql.DriverManager; +import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; +import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; +import java.util.Map.Entry; import java.util.Properties; +import java.util.concurrent.ConcurrentHashMap; +import org.apache.avro.Schema; +import org.apache.avro.specific.SpecificDatumReader; +import org.apache.avro.specific.SpecificDatumWriter; +import org.apache.avro.util.Utf8; import org.apache.gora.ignite.utils.IgniteSQLBuilder; +import org.apache.gora.persistency.Persistent; import
[09/11] gora git commit: Improve Ignite Datastore to better suit Gora's coding standards
Improve Ignite Datastore to better suit Gora's coding standards Formatting and documentation were improved in multiple classes. Also dependencies' versions were parameterized within parent pom.xml files and other minor improvements were implemented throughout the project. Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/740ab814 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/740ab814 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/740ab814 Branch: refs/heads/master Commit: 740ab8145ac6c004d2b10ea46ea0f5c2a0a9f71f Parents: 87eddc2 Author: Carlos M Authored: Thu Jul 26 23:57:32 2018 -0500 Committer: Carlos M Committed: Thu Jul 26 23:57:32 2018 -0500 -- .gitignore | 1 + gora-ignite/pom.xml | 4 +- gora-ignite/src/examples/java/.gitignore| 15 -- .../org/apache/gora/ignite/package-info.java| 4 +- .../apache/gora/ignite/query/IgniteQuery.java | 2 +- .../apache/gora/ignite/query/IgniteResult.java | 10 +- .../apache/gora/ignite/query/package-info.java | 2 +- .../org/apache/gora/ignite/store/Column.java| 2 +- .../apache/gora/ignite/store/IgniteMapping.java | 2 +- .../gora/ignite/store/IgniteMappingBuilder.java | 5 +- .../gora/ignite/store/IgniteParameters.java | 23 +-- .../apache/gora/ignite/store/IgniteStore.java | 59 +++--- .../apache/gora/ignite/store/package-info.java | 2 +- .../ignite/utils/IgniteBackendConstants.java| 36 .../gora/ignite/utils/IgniteSQLBuilder.java | 193 +++ .../apache/gora/ignite/utils/package-info.java | 2 +- .../config/java.util.logging.properties | 74 +++ pom.xml | 2 + 18 files changed, 316 insertions(+), 122 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/740ab814/.gitignore -- diff --git a/.gitignore b/.gitignore index 2aa54cc..d4f78bc 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ ivy/ivy*.jar **/gora-solr-5/src/test/conf/solr/collection1/data/ **/_rest_managed.json **/gora-solr/src/test/conf/solr-managed-schema/collection1/data/ +**/nbactions.xml http://git-wip-us.apache.org/repos/asf/gora/blob/740ab814/gora-ignite/pom.xml -- diff --git a/gora-ignite/pom.xml b/gora-ignite/pom.xml index fa31195..430b8ed 100644 --- a/gora-ignite/pom.xml +++ b/gora-ignite/pom.xml @@ -50,7 +50,6 @@ -2.4.0 * org.apache.gora.ignite*;version="${project.version}";-noimport:=true @@ -174,9 +173,8 @@ org.apache.ignite ignite-indexing - 2.4.0 + ${ignite.version} - http://git-wip-us.apache.org/repos/asf/gora/blob/740ab814/gora-ignite/src/examples/java/.gitignore -- diff --git a/gora-ignite/src/examples/java/.gitignore b/gora-ignite/src/examples/java/.gitignore deleted file mode 100644 index 09697dc..000 --- a/gora-ignite/src/examples/java/.gitignore +++ /dev/null @@ -1,15 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You 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. - http://git-wip-us.apache.org/repos/asf/gora/blob/740ab814/gora-ignite/src/main/java/org/apache/gora/ignite/package-info.java -- diff --git a/gora-ignite/src/main/java/org/apache/gora/ignite/package-info.java b/gora-ignite/src/main/java/org/apache/gora/ignite/package-info.java index a7fa7ab..4036748 100644 --- a/gora-ignite/src/main/java/org/apache/gora/ignite/package-info.java +++ b/gora-ignite/src/main/java/org/apache/gora/ignite/package-info.java @@ -1,4 +1,4 @@ -/** +/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. @@ -17,4 +17,4 @@ /** * This package contains
[01/11] gora git commit: create template gora-ignite module
Repository: gora Updated Branches: refs/heads/master a8398651d -> 446f42ea3 http://git-wip-us.apache.org/repos/asf/gora/blob/4346216f/gora-ignite/src/test/java/org/apache/gora/ignite/GoraIgniteTestDriver.java -- diff --git a/gora-ignite/src/test/java/org/apache/gora/ignite/GoraIgniteTestDriver.java b/gora-ignite/src/test/java/org/apache/gora/ignite/GoraIgniteTestDriver.java new file mode 100644 index 000..1e03717 --- /dev/null +++ b/gora-ignite/src/test/java/org/apache/gora/ignite/GoraIgniteTestDriver.java @@ -0,0 +1,73 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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.apache.gora.ignite; + +import org.apache.ignite.minicluster.MiniIgniteCluster; +import org.apache.ignite.minicluster.MiniIgniteConfig; +import org.apache.gora.GoraTestDriver; +import org.apache.gora.ignite.store.IgniteStore; +import org.junit.Rule; +import org.junit.rules.TemporaryFolder; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; + +/** + * @author lmcgibbn + * + */ +public class GoraIgniteTestDriver extends GoraTestDriver { + + private static final Logger LOG = LoggerFactory.getLogger(GoraIgniteTestDriver.class); + private static MiniIgniteCluster cluster = null; + private static final String PASSWORD = "drowssap"; + + @Rule + public TemporaryFolder tmpDir = new TemporaryFolder(); + + public GoraIgniteTestDriver() throws Exception { +super(IgniteStore.class); + } + + @Override + public void setUpClass() throws IOException, InterruptedException { +log.info("Starting Ignite MiniIgniteCluster..."); +try { + tmpDir.create(); + MiniIgniteConfig miniCfg = new MiniIgniteConfig(tmpDir.getRoot(), PASSWORD); + miniCfg.setInstanceName("goraTest"); + miniCfg.setZooKeeperPort(56321); + cluster = new MiniIgniteCluster(miniCfg); + cluster.start(); +} catch (Exception e) { + LOG.error("Error starting Ignite MiniIgniteCluster: {}", e.getMessage()); + // cleanup + tearDownClass(); +} + } + + @Override + public void tearDownClass() throws IOException, InterruptedException { +log.info("Shutting down Ignite MiniIgniteCluster..."); +if (cluster != null) { + cluster.stop(); +} +tmpDir.delete(); + } +} http://git-wip-us.apache.org/repos/asf/gora/blob/4346216f/gora-ignite/src/test/java/org/apache/gora/ignite/package-info.java -- diff --git a/gora-ignite/src/test/java/org/apache/gora/ignite/package-info.java b/gora-ignite/src/test/java/org/apache/gora/ignite/package-info.java new file mode 100644 index 000..f536961 --- /dev/null +++ b/gora-ignite/src/test/java/org/apache/gora/ignite/package-info.java @@ -0,0 +1,21 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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. + */ +/** + * Tests for gora-ignite including + * the test driver for {@link org.apache.gora.ignite.store.IgniteStoreTest} + */ +package org.apache.gora.ignite; \ No newline at end of file http://git-wip-us.apache.org/repos/asf/gora/blob/4346216f/gora-ignite/src/test/java/org/apache/gora/ignite/store/AuthenticationTokenTest.java -- diff --git a/gora-ignite/src/test/java/org/apache/gora/ignite/store/AuthenticationTokenTest.java b/gora-ignite/src/test/java/org/apache/gora/ignite/store/AuthenticationTokenTest.java
[05/11] gora git commit: Add mapping reading and initialization for Ignite backend
Add mapping reading and initialization for Ignite backend Basic configuration and connection classes were implemented for the Ignite backend. The basic skeleton of the new DataStore was initialized using mapping files and some trivial methods were implemented (#close(), #flush(), #getSchemaName(), ...). Also, an embembed Ignite instance was included within the test packages in order to be used in testing. Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/7545170d Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/7545170d Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/7545170d Branch: refs/heads/master Commit: 7545170df8047ea6127660c1750e1d0b59044e49 Parents: 7d67137 Author: Carlos M Authored: Wed Jun 6 00:03:10 2018 -0500 Committer: Carlos M Committed: Wed Jun 6 00:08:48 2018 -0500 -- gora-ignite/pom.xml | 21 +- .../gora/ignite/encoders/BinaryEncoder.java | 191 .../apache/gora/ignite/encoders/Encoder.java| 72 -- .../apache/gora/ignite/encoders/HexEncoder.java | 204 .../ignite/encoders/SignedBinaryEncoder.java| 110 -- .../org/apache/gora/ignite/encoders/Utils.java | 91 -- .../gora/ignite/encoders/package-info.java | 20 - .../apache/gora/ignite/query/IgniteQuery.java | 45 - .../apache/gora/ignite/query/IgniteResult.java | 101 -- .../apache/gora/ignite/query/package-info.java | 21 - .../org/apache/gora/ignite/store/Column.java| 70 ++ .../apache/gora/ignite/store/IgniteMapping.java | 44 +- .../gora/ignite/store/IgniteMappingBuilder.java | 107 ++ .../gora/ignite/store/IgniteParameters.java | 139 +++ .../apache/gora/ignite/store/IgniteStore.java | 1013 ++ .../ignite/util/FixedByteArrayOutputStream.java | 45 - .../apache/gora/ignite/util/package-info.java | 20 - .../gora/ignite/GoraIgniteTestDriver.java | 49 +- .../org/apache/gora/ignite/package-info.java| 21 - .../ignite/store/AuthenticationTokenTest.java | 90 -- .../gora/ignite/store/IgniteStoreTest.java | 87 -- .../apache/gora/ignite/store/PartitionTest.java | 96 -- .../gora/ignite/store/TestIgniteStore.java | 32 + .../apache/gora/ignite/store/package-info.java | 21 - .../apache/gora/ignite/util/HexEncoderTest.java | 56 - .../ignite/util/SignedBinaryEncoderTest.java| 167 --- .../apache/gora/ignite/util/package-info.java | 20 - .../test/resources/gora-accumulo-mapping.xml| 59 - .../src/test/resources/gora-ignite-mapping.xml | 42 + gora-ignite/src/test/resources/gora.properties | 11 +- nbactions.xml | 13 + 31 files changed, 550 insertions(+), 2528 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/7545170d/gora-ignite/pom.xml -- diff --git a/gora-ignite/pom.xml b/gora-ignite/pom.xml index ddd3a4a..fa31195 100644 --- a/gora-ignite/pom.xml +++ b/gora-ignite/pom.xml @@ -50,7 +50,7 @@ -1.7.1 +2.4.0 * org.apache.gora.ignite*;version="${project.version}";-noimport:=true @@ -115,13 +115,6 @@ - org.apache.ignite - ignite-minicluster - ${ignite.version} - test - - - commons-io commons-io @@ -144,6 +137,12 @@ org.apache.avro avro + + + org.jdom + jdom + compile + @@ -171,6 +170,12 @@ org.apache.hadoop hadoop-minicluster + + + org.apache.ignite + ignite-indexing + 2.4.0 + http://git-wip-us.apache.org/repos/asf/gora/blob/7545170d/gora-ignite/src/main/java/org/apache/gora/ignite/encoders/BinaryEncoder.java -- diff --git a/gora-ignite/src/main/java/org/apache/gora/ignite/encoders/BinaryEncoder.java b/gora-ignite/src/main/java/org/apache/gora/ignite/encoders/BinaryEncoder.java deleted file mode 100644 index ce6eded..000 --- a/gora-ignite/src/main/java/org/apache/gora/ignite/encoders/BinaryEncoder.java +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You 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, - *
[08/11] gora git commit: Implement Queries for Ignite
Implement Queries for Ignite The operations newQuery, execute, deleteByQuery, getPartitions are implemented for the Ignite backend. The corresponding dependencies IgniteQuery and IgniteResult are also included. Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/87eddc24 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/87eddc24 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/87eddc24 Branch: refs/heads/master Commit: 87eddc2495cdeec9b28246ea08708540c365f34e Parents: db7540e Author: Carlos M Authored: Thu Jul 5 23:11:38 2018 -0500 Committer: Carlos M Committed: Thu Jul 5 23:11:38 2018 -0500 -- .../apache/gora/ignite/query/IgniteQuery.java | 32 ++ .../apache/gora/ignite/query/IgniteResult.java | 101 +++ .../apache/gora/ignite/query/package-info.java | 20 .../apache/gora/ignite/store/IgniteStore.java | 65 +++- .../gora/ignite/utils/IgniteSQLBuilder.java | 89 .../apache/gora/ignite/utils/package-info.java | 20 6 files changed, 322 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/87eddc24/gora-ignite/src/main/java/org/apache/gora/ignite/query/IgniteQuery.java -- diff --git a/gora-ignite/src/main/java/org/apache/gora/ignite/query/IgniteQuery.java b/gora-ignite/src/main/java/org/apache/gora/ignite/query/IgniteQuery.java new file mode 100644 index 000..b33e682 --- /dev/null +++ b/gora-ignite/src/main/java/org/apache/gora/ignite/query/IgniteQuery.java @@ -0,0 +1,32 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.apache.gora.ignite.query; + +import org.apache.gora.persistency.impl.PersistentBase; +import org.apache.gora.query.impl.QueryBase; +import org.apache.gora.store.DataStore; + +/** + * Ignite specific implementation of the {@link Query} interface. + */ +public class IgniteQuery extends QueryBase { + + public IgniteQuery(DataStore dataStore) { +super(dataStore); + } + +} http://git-wip-us.apache.org/repos/asf/gora/blob/87eddc24/gora-ignite/src/main/java/org/apache/gora/ignite/query/IgniteResult.java -- diff --git a/gora-ignite/src/main/java/org/apache/gora/ignite/query/IgniteResult.java b/gora-ignite/src/main/java/org/apache/gora/ignite/query/IgniteResult.java new file mode 100644 index 000..09f717e --- /dev/null +++ b/gora-ignite/src/main/java/org/apache/gora/ignite/query/IgniteResult.java @@ -0,0 +1,101 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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.apache.gora.ignite.query; + +import java.io.IOException; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import org.apache.gora.ignite.store.IgniteStore; +import org.apache.gora.persistency.impl.PersistentBase; +import org.apache.gora.query.Query; +import org.apache.gora.query.impl.ResultBase; +import org.apache.gora.store.DataStore; + +/** + * IgniteResult specific implementation of the + * {@link org.apache.gora.query.Result} interface. + */ +public class IgniteResult extends ResultBase { + + private ResultSet resultSet; + private Statement st; + private int size; + + public
[10/11] gora git commit: Add Ignite to the dependency management section
Add Ignite to the dependency management section The dependencies of the Ignite data store were added to the dependency management section. Also a unused dependency (Jline) was removed from the Ignite backend. Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/8220a159 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/8220a159 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/8220a159 Branch: refs/heads/master Commit: 8220a15915a86faa68419fe47fd78d4c349f8353 Parents: 740ab81 Author: Carlos M Authored: Sun Jul 29 23:42:29 2018 -0500 Committer: Carlos M Committed: Sun Jul 29 23:42:29 2018 -0500 -- gora-ignite/pom.xml | 8 pom.xml | 23 ++- 2 files changed, 22 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/8220a159/gora-ignite/pom.xml -- diff --git a/gora-ignite/pom.xml b/gora-ignite/pom.xml index 430b8ed..8f75553 100644 --- a/gora-ignite/pom.xml +++ b/gora-ignite/pom.xml @@ -119,14 +119,6 @@ - - jline - jline - 2.11 - test - - - org.apache.zookeeper zookeeper test http://git-wip-us.apache.org/repos/asf/gora/blob/8220a159/pom.xml -- diff --git a/pom.xml b/pom.xml index b4838f0..de30ec6 100644 --- a/pom.xml +++ b/pom.xml @@ -956,6 +956,21 @@ ${project.version} test-jar + + + + +org.apache.gora +gora-ignite +${project.version} + + +org.apache.gora +gora-ignite +${project.version} +test-jar + + @@ -1573,7 +1588,13 @@ testcontainers ${test.container.version} - + + + +org.apache.ignite +ignite-indexing +${ignite.version} +
svn commit: r1846356 - in /gora/site/trunk/content/current: gora-ignite.md index.md
Author: djkevincr Date: Sun Nov 11 18:47:34 2018 New Revision: 1846356 URL: http://svn.apache.org/viewvc?rev=1846356=rev Log: Fix GORA-540 - adding doc for Ignite datastore Added: gora/site/trunk/content/current/gora-ignite.md Modified: gora/site/trunk/content/current/index.md Added: gora/site/trunk/content/current/gora-ignite.md URL: http://svn.apache.org/viewvc/gora/site/trunk/content/current/gora-ignite.md?rev=1846356=auto == --- gora/site/trunk/content/current/gora-ignite.md (added) +++ gora/site/trunk/content/current/gora-ignite.md Sun Nov 11 18:47:34 2018 @@ -0,0 +1,68 @@ +Title: Gora Ignite Module + +##Overview +This is the main documentation for the gora-ignite module. gora-ignite module enables [Apache Ignite](https://ignite.apache.org/) backend support for Gora. + +[TOC] + +##Gora Ignite Properties - gora.properties + +* gora.datastore.default=org.apache.gora.ignite.store.IgniteStore - Implementation of the persistent Java storage class for Ignite +* gora.datastore.ignite.schema=PUBLIC - Property pointing to the Schema of the Ignite instance +* gora.datastore.ignite.host=localhost - Property pointing to the host where the server is running +* gora.datastore.ignite.port=10800 - Property pointing to the port where the server is running +* gora.datastore.ignite.user=username - An optional property defining the username of the server if available +* gora.datastore.ignite.password=password - An optional property defining the password of the server if available +* gora.datastore.ignite.additionalConfigurations= - An optional property defining additional configurations for the Ignite connection, format and available parameters: [Ignite JDBC Parameters](https://apacheignite-sql.readme.io/docs/jdbc-driver#section-parameters) + +##Gora Ignite mappings - gora-ignite-mapping.xml +You should then create a gora-ignite-mapping.xml which will describe how you want to store each of your Gora persistent objects and which primary keys you want to use: + + + + + + + + + + + + + +Here you can see that we require the definition of child elements within the gora-otd mapping configuration. + +Each class element should contain the following elements; + +1. a parameter defining the Persistent class name e.g. org.apache.gora.examples.generated.Employee, + +2. a parameter defining the keyClass e.g. java.lang.String which specifies the key which maps to the field values, + +3. a parameter defining the table e.g. Employee which will be used to persist each Gora object + +In addition, within the class element we should define two type of child elements: a primary key (primarykey tag) and some fields (field tag). + +The primary key element defines which column is used by Ignite to identify the records stored in the DataStore. It has two costumizable parameters: column which defines the column's name of the table to be used as identifier for the records. And type which defines the data type of the aforementioned column. + +The fields elements define the actual mapping between persistent object's attributes and the table's columns. These mapping have three customizable parameters: name which correspond to the object attribute's name. column which defines the column's name of the table to be assosiated with the attribute. And type which defines the data type of that column. + +Notice that complex structures such 3-union fields are mapped using Binary fields through [Avro](https://avro.apache.org/) serialization. + + +##Supported Data types +Description of supported type values: + +| Type value | Description | +||-| +| BINARY | Store as Byte[] | +| BOOLEAN| Store as Boolean| +| INT| Store as Integer| +| TINYINT| Store as Byte | +| SMALLINT | Store as Short | +| BIGINT | Store as Long | +| DECIMAL| Store as BigDecimal | +| DOUBLE | Store as Double | +| REAL | Store as Float | +| VARCHAR| Store as Unicode string | + +A more detailed list of data types supported by Ignite and its equivalents in Java refer to [Ignite JDBC Data types](https://apacheignite-sql.readme.io/docs/data-types) Modified: gora/site/trunk/content/current/index.md URL: http://svn.apache.org/viewvc/gora/site/trunk/content/current/index.md?rev=1846356=1846355=1846356=diff == --- gora/site/trunk/content/current/index.md (original) +++ gora/site/trunk/content/current/index.md Sun Nov 11 18:47:34 2018 @@ -39,6 +39,7 @@ following modules are currently implemen * [gora-mongodb](./gora-mongodb.html): Module for [MongoDB](http
gora git commit: Remove committed nbactions.xml file
Repository: gora Updated Branches: refs/heads/master 446f42ea3 -> 56f8002ab Remove committed nbactions.xml file Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/56f8002a Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/56f8002a Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/56f8002a Branch: refs/heads/master Commit: 56f8002ab47a1a1190bafa3ea327c6f4ffc900ea Parents: 446f42e Author: Kevin Ratnasekera Authored: Sun Nov 18 21:33:33 2018 +0530 Committer: Kevin Ratnasekera Committed: Sun Nov 18 21:33:33 2018 +0530 -- nbactions.xml | 13 - 1 file changed, 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/56f8002a/nbactions.xml -- diff --git a/nbactions.xml b/nbactions.xml deleted file mode 100644 index 52ecdda..000 --- a/nbactions.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - -rebuild - -* - - -clean -install - - -
[1/2] gora git commit: GORA-543 Upgrade Apache parent POM to version 21
Repository: gora Updated Branches: refs/heads/master 56f8002ab -> 64380fd32 GORA-543 Upgrade Apache parent POM to version 21 Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/dff8b1a7 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/dff8b1a7 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/dff8b1a7 Branch: refs/heads/master Commit: dff8b1a7821262b5158905abc30091f56dd4790e Parents: 446f42e Author: Kevin Ratnasekera Authored: Tue Nov 20 16:57:27 2018 +0530 Committer: Kevin Ratnasekera Committed: Tue Nov 20 16:57:27 2018 +0530 -- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/dff8b1a7/pom.xml -- diff --git a/pom.xml b/pom.xml index ddd0d14..c3a1412 100644 --- a/pom.xml +++ b/pom.xml @@ -22,7 +22,7 @@ org.apache apache -10 +21 org.apache.gora
[1/2] gora git commit: GORA-547 Upgrade Aerospike client to 4.2.2
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 Authored: Wed Nov 21 01:01:57 2018 +0530 Committer: Kevin Ratnasekera 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 @@ com.aerospike aerospike-client - ${aerospike.version} 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 extends ResultBase 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
[2/2] gora git commit: Merge branch 'master' into feature branch
Merge branch 'master' into feature branch Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/e9c561e5 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/e9c561e5 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/e9c561e5 Branch: refs/heads/master Commit: e9c561e5c98a10e5344b5899b6c65cf701589833 Parents: 6a90102 64380fd Author: Kevin Ratnasekera Authored: Thu Dec 6 13:52:13 2018 +0530 Committer: Kevin Ratnasekera Committed: Thu Dec 6 13:52:13 2018 +0530 -- nbactions.xml | 13 - pom.xml | 2 +- 2 files changed, 1 insertion(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/gora/blob/e9c561e5/pom.xml --
[gora] branch master updated (c7cae4d -> 8bb377b)
This is an automated email from the ASF dual-hosted git repository. djkevincr pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/gora.git. from c7cae4d Merge pull request #155 from madhawa-gunasekara/GORA-545 new 0361086 GORA-548 Apache Flink support for Gora new 405bbf6 Add Flink job test utils new b4b0228 Merge branch 'master' of https://github.com/apache/gora into flink_backend new 2325c61 Improve Flink module with custom serializer new c4e29f3 Merge branch 'master' of https://github.com/apache/gora into flink_backend new e6e6c2d Fix HBase Store Flink new 62ac8bb Fix javadoc issues new 8bb377b Merge pull request #140 from djkevincr/flink_backend The 1141 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: gora-core/pom.xml | 28 ++- .../apache/gora/examples/flink/FlinkWordCount.java | 165 .../org/apache/gora/flink/GoraFlinkEngine.java | 132 + .../org/apache/gora/flink/PersistentTypeInfo.java | 46 + .../gora/flink/PersistentTypeInfoFactory.java | 44 + .../gora/flink/PersistentTypeSerializer.java | 117 +++ .../apache/gora/{spark => flink}/package-info.java | 4 +- .../org/apache/gora/mapreduce/GoraInputSplit.java | 5 +- .../gora/persistency/impl/PersistentBase.java | 3 + .../java/org/apache/gora/query/impl/QueryBase.java | 2 +- .../apache/gora/mapreduce/MapReduceTestUtils.java | 31 +++ .../hbase/mapreduce/TestHBaseStoreWordCount.java | 5 + .../mongodb/mapreduce/TestMongoStoreWordCount.java | 5 + .../apache/gora/orientdb/store/OrientDBStore.java | 5 + .../mapreduce/TestOrientDBStoreWordCount.java | 32 +-- gora-tutorial/pom.xml | 28 ++- .../gora/tutorial/log/LogAnalyticsFlink.java | 220 + pom.xml| 41 +++- 18 files changed, 891 insertions(+), 22 deletions(-) create mode 100644 gora-core/src/examples/java/org/apache/gora/examples/flink/FlinkWordCount.java create mode 100644 gora-core/src/main/java/org/apache/gora/flink/GoraFlinkEngine.java create mode 100644 gora-core/src/main/java/org/apache/gora/flink/PersistentTypeInfo.java create mode 100644 gora-core/src/main/java/org/apache/gora/flink/PersistentTypeInfoFactory.java create mode 100644 gora-core/src/main/java/org/apache/gora/flink/PersistentTypeSerializer.java copy gora-core/src/main/java/org/apache/gora/{spark => flink}/package-info.java (89%) copy gora-mongodb/src/test/java/org/apache/gora/mongodb/mapreduce/TestMongoStoreWordCount.java => gora-orientdb/src/test/java/org/apache/gora/orientdb/mapreduce/TestOrientDBStoreWordCount.java (62%) create mode 100644 gora-tutorial/src/main/java/org/apache/gora/tutorial/log/LogAnalyticsFlink.java
[gora] branch master updated: GORA-549: Remove PersistentBase extending java.io.Externalizable
This is an automated email from the ASF dual-hosted git repository. djkevincr pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/gora.git The following commit(s) were added to refs/heads/master by this push: new ab40ead GORA-549: Remove PersistentBase extending java.io.Externalizable new 75997da Merge pull request #157 from djkevincr/GORA-549 ab40ead is described below commit ab40eadf2da890903f4c5d74d0cb6f5459a5f995 Author: Kevin Ratnasekera AuthorDate: Wed Apr 3 00:24:48 2019 +0530 GORA-549: Remove PersistentBase extending java.io.Externalizable --- .../src/main/java/org/apache/gora/persistency/impl/PersistentBase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gora-core/src/main/java/org/apache/gora/persistency/impl/PersistentBase.java b/gora-core/src/main/java/org/apache/gora/persistency/impl/PersistentBase.java index e7f9929..7bb9e63 100644 --- a/gora-core/src/main/java/org/apache/gora/persistency/impl/PersistentBase.java +++ b/gora-core/src/main/java/org/apache/gora/persistency/impl/PersistentBase.java @@ -37,7 +37,7 @@ import org.apache.gora.persistency.Persistent; */ @TypeInfo(PersistentTypeInfoFactory.class) public abstract class PersistentBase extends SpecificRecordBase implements -Persistent, java.io.Externalizable { +Persistent { /** Bytes used to represent weather or not a field is dirty. */ private java.nio.ByteBuffer __g__dirty;
[gora] branch master updated: Remove deprecated API calls from HbaseStore and HBaseStoreMetadataAnalyzer classes
This is an automated email from the ASF dual-hosted git repository. djkevincr pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/gora.git The following commit(s) were added to refs/heads/master by this push: new 7b80edb Remove deprecated API calls from HbaseStore and HBaseStoreMetadataAnalyzer classes new deb08b0 Merge pull request #159 from sneceesay77/master 7b80edb is described below commit 7b80edbfe28a488e1bbbe69741ff9f8432a676b8 Author: sc306 AuthorDate: Sat Apr 6 23:21:26 2019 +0100 Remove deprecated API calls from HbaseStore and HBaseStoreMetadataAnalyzer classes --- .../src/main/java/org/apache/gora/hbase/store/HBaseStore.java | 2 +- .../org/apache/gora/hbase/store/HBaseStoreMetadataAnalyzer.java | 6 -- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseStore.java b/gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseStore.java index f474c4c..46872ff 100644 --- a/gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseStore.java +++ b/gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseStore.java @@ -626,7 +626,7 @@ public class HBaseStore extends DataStoreBase private void addTimeRange(Get get, Query query) throws IOException { if(query.getStartTime() > 0 || query.getEndTime() > 0) { if(query.getStartTime() == query.getEndTime()) { -get.setTimeStamp(query.getStartTime()); +get.setTimestamp(query.getStartTime()); } else { long startTime = query.getStartTime() > 0 ? query.getStartTime() : 0; long endTime = query.getEndTime() > 0 ? query.getEndTime() : Long.MAX_VALUE; diff --git a/gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseStoreMetadataAnalyzer.java b/gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseStoreMetadataAnalyzer.java index 29cb405..398029c 100644 --- a/gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseStoreMetadataAnalyzer.java +++ b/gora-hbase/src/main/java/org/apache/gora/hbase/store/HBaseStoreMetadataAnalyzer.java @@ -24,11 +24,13 @@ import java.util.stream.Collectors; import org.apache.gora.store.impl.DataStoreMetadataAnalyzer; import org.apache.gora.util.GoraException; -import org.apache.hadoop.hbase.HTableDescriptor; + import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.Admin; import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.client.ConnectionFactory; +import org.apache.hadoop.hbase.client.TableDescriptor; + public class HBaseStoreMetadataAnalyzer extends DataStoreMetadataAnalyzer { @@ -66,7 +68,7 @@ public class HBaseStoreMetadataAnalyzer extends DataStoreMetadataAnalyzer { try { Admin hbaseAdmin = this.hbaseConnection.getAdmin(); TableName hbaseTableName = TableName.valueOf(tableName); -HTableDescriptor tableDescriptor = hbaseAdmin.getTableDescriptor(hbaseTableName) ; +TableDescriptor tableDescriptor = hbaseAdmin.getDescriptor(hbaseTableName); HBaseTableMetadata tableMetadata = new HBaseTableMetadata() ; tableMetadata.getColumnFamilies().addAll(Arrays.stream(tableDescriptor.getColumnFamilies()).map(hcolumn -> hcolumn.getNameAsString()).collect(Collectors.toList())) ; hbaseAdmin.close();
[gora] branch master updated (7047f10 -> c64f4a5)
This is an automated email from the ASF dual-hosted git repository. djkevincr pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/gora.git. from 7047f10 Merge pull request #152 from djkevincr/LUCENE_STORE new ccdddfe GORA-554: Upgrade Solr dependency to latest new 6e552cf Fix minimum value for solr url count new c57a146 Parameterize queue size and thread count new c64f4a5 Merge pull request #153 from djkevincr/GORA-554 The 1129 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: gora-solr/pom.xml | 2 +- .../java/org/apache/gora/solr/store/SolrStore.java | 166 - gora-solr/src/test/conf/gora.properties| 2 + pom.xml| 6 +- 4 files changed, 134 insertions(+), 42 deletions(-)
[gora] branch master updated: Update developer role information
This is an automated email from the ASF dual-hosted git repository. djkevincr pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/gora.git The following commit(s) were added to refs/heads/master by this push: new 8c37301 Update developer role information new b366e6c Merge pull request #151 from djkevincr/developer_info 8c37301 is described below commit 8c373011bc0973df1f2136fda9b72b64a74d8552 Author: Kevin Ratnasekera AuthorDate: Mon Feb 25 15:07:59 2019 +0530 Update developer role information --- pom.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 980da4e..2532970 100644 --- a/pom.xml +++ b/pom.xml @@ -183,6 +183,7 @@ Committer PMC Member +PMC Chair @@ -201,7 +202,7 @@ Committer PMC Member -PMC Chair +Champion
[gora] branch master updated (09981b8 -> 7047f10)
This is an automated email from the ASF dual-hosted git repository. djkevincr pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/gora.git. from 09981b8 Merge pull request #135 from alfonsonishikawa/goraexplorer new 3d92106 GORA-266 Lucene datastore for Gora - lewismc new 224a3c3 Merge with master branch new 0a0ebbf Implement size method for LuceneResult new 6a8f225 Fix test cases new c6396de Clean up code for the release new 7047f10 Merge pull request #152 from djkevincr/LUCENE_STORE The 1125 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: .../apache/gora/accumulo/store/AccumuloStore.java | 2 +- .../java/org/apache/gora/avro/store/AvroStore.java | 6 +- .../gora/persistency/impl/PersistentBase.java | 7 +- .../main/java/org/apache/gora/util/IOUtils.java| 15 +- .../apache/gora/hbase/store/TestHBaseStore.java| 2 +- gora-jcache/pom.xml| 1 + {gora-hbase => gora-lucene}/pom.xml| 148 +++-- .../java/org/apache/gora/lucene}/package-info.java | 4 +- .../org/apache/gora/lucene/query/LuceneQuery.java | 72 +++ .../org/apache/gora/lucene/query/LuceneResult.java | 139 + .../apache/gora/lucene/query}/package-info.java| 5 +- .../apache/gora/lucene/store/LuceneMapping.java| 47 +- .../org/apache/gora/lucene/store/LuceneStore.java | 610 + .../apache/gora/lucene/store}/package-info.java| 5 +- .../src/test/conf/gora-lucene-mapping.xml | 12 +- gora-lucene/src/test/conf/gora.properties | 27 + .../apache/gora/lucene/store/TestLuceneStore.java | 145 + .../gora/lucene/store/TestLuceneStoreDriver.java | 13 +- .../apache/gora/lucene/store}/package-info.java| 4 +- gora-solr/pom.xml | 57 +- pom.xml| 44 +- 21 files changed, 1167 insertions(+), 198 deletions(-) copy {gora-hbase => gora-lucene}/pom.xml (63%) copy {gora-core/src/examples/java/org/apache/gora/examples/spark => gora-lucene/src/main/java/org/apache/gora/lucene}/package-info.java (89%) create mode 100644 gora-lucene/src/main/java/org/apache/gora/lucene/query/LuceneQuery.java create mode 100644 gora-lucene/src/main/java/org/apache/gora/lucene/query/LuceneResult.java copy {gora-accumulo/src/main/java/org/apache/gora/accumulo/encoders => gora-lucene/src/main/java/org/apache/gora/lucene/query}/package-info.java (84%) copy gora-solr/src/main/java/org/apache/gora/solr/store/SolrMapping.java => gora-lucene/src/main/java/org/apache/gora/lucene/store/LuceneMapping.java (62%) create mode 100644 gora-lucene/src/main/java/org/apache/gora/lucene/store/LuceneStore.java copy {gora-accumulo/src/main/java/org/apache/gora/accumulo/encoders => gora-lucene/src/main/java/org/apache/gora/lucene/store}/package-info.java (80%) copy gora-solr/src/test/conf/gora-solr-mapping.xml => gora-lucene/src/test/conf/gora-lucene-mapping.xml (86%) create mode 100644 gora-lucene/src/test/conf/gora.properties create mode 100644 gora-lucene/src/test/java/org/apache/gora/lucene/store/TestLuceneStore.java copy gora-core/src/test/java/org/apache/gora/memory/store/MemStoreTestDriver.java => gora-lucene/src/test/java/org/apache/gora/lucene/store/TestLuceneStoreDriver.java (80%) copy {gora-core/src/examples/java/org/apache/gora/examples/mapreduce => gora-lucene/src/test/java/org/apache/gora/lucene/store}/package-info.java (88%)
[gora] branch master updated (b366e6c -> 09981b8)
This is an automated email from the ASF dual-hosted git repository. djkevincr pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/gora.git. from b366e6c Merge pull request #151 from djkevincr/developer_info new 6949760 Creación de la rama "goraexplorer" con los .pom modificados para que hagan referencia al repositorio maven.nishilua.com donde se aloja 0.7-goraexplorer-SNAPSHOT que soporta las funcionalidades de goraexplorer, como por ejemplo: new d607fdf - Compile a schema from a String, and not only from file. - Allow to get the mapping from Configuration (key gora.mapping) as a String, and not only from file. - Instantiate a datastore given de datastore class, the key class and the persistent class by name, not relying on generics. new b9f9f56 Modified Persistent to return it's schema. new 4410c41 Merge branch 'master' into goraexplorer new f3aed48 Merge branch 'master' into goraexplorer new e6eab43 BUGFIX: HBaseStore endKey is exclusive (since HBase handles it exclusive). We add a trail zero to the end key when searching to make it inclusive to conform to Gora's quey interface. new 3b35c36 Actualizando el proyecto a todos los cambios de la release 0.7 new 055d5b4 Added #clone() method to Persistent new b58722b Updated pom.xmls to deploy new 43ddc91 Implemented DataStoreMetadataAnalyzer to retrieve native backend information. - Implemented only for HBase at this moment. new e349614 Added missing #close() method to DataStoreMetadataAnalyzer new 0ae4ec4 Updated DataStoreMetadataFactory to throw ClassNotFoundException not hiding this exceptional case. new bf1165f Updated Persistent with @JsonIgnore to allow jackson serialization new 6dc2269 Added a constructor to BeanFactoryImpl with String parameter new 5e5e43d Merged with Gora 0.9 - breaking code, will fix in next commits new 6d40006 Fixed errors after merging new 0afed6a Initial commit of gora-pig new 8e3e3f3 Refactorization of GoraStorage for LOAD command new 0b60c1f Support in gora-pig of JSON configuration for GoraStorage. new 4ca9bd3 Updated GoraStorage to allow several LOADs from different origins. Now the following script is supported: new 77be0d8 Updated Pig's GoraStorage to allow STORE operations. new 5578e73 Updated GoraDeleteStorage to allow STORE that deletes rows by key. Bugfixes in GoraStorage when storing. new 89225d7 Fixed imports new 6cec5f6 Merge branch 'master' into goraexplorer new 3b11b1c Updated version from -goraexplorer- to 0.9-SNAPSHOT new eb97b42 Forgot to delete goraexplorer distributionManagement (pom.xml) new 2e9508b Forgot to revert hadoop+hbase versions after implementing gora-pig. new 2974126 Deleting a comment related to gora-pig using HDP 2.6 new 40ca0af Added license headers, updated gora-pig example readme, updated dependencies new 6ce47dc Merge remote-tracking branch 'upstream/master' into goraexplorer new 5ebd0e7 Updated compile-examples.sh to preserve package-info.java in the examples' generated folders, and added deleted package-info.java files. new 05499d2 Added comment to Persistent#clone() new ec8b737 Fixed javadoc comments new d4c5710 Updated Gora-Pig example: deleted webpage.jar and updated README.md new 0259f2f Merge branch 'master' into goraexplorer new 09981b8 Merge pull request #135 from alfonsonishikawa/goraexplorer The 1119 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: bin/compile-examples.sh| 63 +- conf/log4j.properties |2 +- .../generated/AvroSerialization/CassandraKey.java | 550 +++ .../AvroSerialization/CassandraRecord.java | 1739 .../generated/AvroSerialization}/package-info.java |2 +- .../nativeSerialization/ComplexTypes.java | 14 + .../generated/nativeSerialization/Document.java| 13 + .../generated/nativeSerialization/User.java| 14 + .../org/apache/gora/compiler/GoraCompiler.java | 29 +- .../org/apache/gora/compiler/templates/record.vm |5 + gora-core/src/examples/avro/employee.json | 30 +- .../apache/gora/examples/generated/Employee.java | 472 +++--- .../gora/examples/generated/ImmutableFields.java | 211 +-- .../apache/gora/examples/generated/Metadata.java | 202 ++- .../apache/gora/examples/generated/TokenDatum.java | 147 +- .../org/apache/gora/examples/generated/V2.java | 135 +- .../apache/gora/examples/generated/WebPage.java| 604 +++ .../apache/gora/mapreduce/GoraRecordReader.java|2
[gora] branch master updated: GORA-612 : Fix Flink tests for MongoDB module
This is an automated email from the ASF dual-hosted git repository. djkevincr pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/gora.git The following commit(s) were added to refs/heads/master by this push: new c6f3f09 GORA-612 : Fix Flink tests for MongoDB module new 04d8010 Merge pull request #162 from djkevincr/GORA-612 c6f3f09 is described below commit c6f3f0996b8031d4ca1f6e2e327730c796239b13 Author: Kevin Ratnasekera AuthorDate: Wed May 1 22:28:22 2019 +0530 GORA-612 : Fix Flink tests for MongoDB module --- .../src/main/java/org/apache/gora/spark/GoraSparkEngine.java | 9 - gora-mongodb/src/test/conf/gora.properties | 2 +- .../apache/gora/mongodb/mapreduce/TestMongoStoreWordCount.java | 1 - 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gora-core/src/main/java/org/apache/gora/spark/GoraSparkEngine.java b/gora-core/src/main/java/org/apache/gora/spark/GoraSparkEngine.java index b1916b6..fb3831d 100644 --- a/gora-core/src/main/java/org/apache/gora/spark/GoraSparkEngine.java +++ b/gora-core/src/main/java/org/apache/gora/spark/GoraSparkEngine.java @@ -105,8 +105,15 @@ public class GoraSparkEngine { */ public Configuration generateOutputConf(DataStore dataStore) throws IOException { + Configuration hadoopConf; + + if ((dataStore instanceof Configurable) + && ((Configurable) dataStore).getConf() != null) { +hadoopConf = ((Configurable) dataStore).getConf(); + } else { +hadoopConf = new Configuration(); + } - Configuration hadoopConf = new Configuration(); GoraMapReduceUtils.setIOSerializations(hadoopConf, true); Job job = Job.getInstance(hadoopConf); diff --git a/gora-mongodb/src/test/conf/gora.properties b/gora-mongodb/src/test/conf/gora.properties index 4be92f7..39960df 100644 --- a/gora-mongodb/src/test/conf/gora.properties +++ b/gora-mongodb/src/test/conf/gora.properties @@ -21,7 +21,7 @@ gora.datastore.autocreateschema=true gora.datastore.default=org.apache.gora.mongodb.store.MongoStore # Don't override properties coming from Hadoop configuration for test # Those properties will contains override for Mongo server port -gora.mongodb.override_hadoop_configuration=true +gora.mongodb.override_hadoop_configuration=false gora.mongodb.mapping.file=/gora-mongodb-mapping.xml gora.mongodb.servers=localhost gora.mongodb.db=nutchtest diff --git a/gora-mongodb/src/test/java/org/apache/gora/mongodb/mapreduce/TestMongoStoreWordCount.java b/gora-mongodb/src/test/java/org/apache/gora/mongodb/mapreduce/TestMongoStoreWordCount.java index de61ec8..d48c43f 100644 --- a/gora-mongodb/src/test/java/org/apache/gora/mongodb/mapreduce/TestMongoStoreWordCount.java +++ b/gora-mongodb/src/test/java/org/apache/gora/mongodb/mapreduce/TestMongoStoreWordCount.java @@ -62,7 +62,6 @@ public class TestMongoStoreWordCount extends GoraMongoMapredTest { } //todo fix config - //@Ignore @Test public void testSparkWordCount() throws Exception { MapReduceTestUtils.testSparkWordCount(testDriver.getConfiguration(),
[gora] branch master updated (9b85f5a -> b3b1abb)
This is an automated email from the ASF dual-hosted git repository. djkevincr pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/gora.git. from 9b85f5a Merge pull request #158 from cuent/master new a2e0ee7 Fixed SparkWordCount Program by adding a flatMap functionality, tested this with MongoDB but should work for other data stores as well new cb35901 Fixed SparkWordCount Program by adding a flatMap functionality, tested this with MongoDB but should work for other data stores as well new b3b1abb Merge pull request #161 from sneceesay77/master The 1162 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: gora-core/pom.xml | 1 + .../apache/gora/examples/WebPageDataCreator.java | 2 +- .../apache/gora/examples/spark/SparkWordCount.java | 102 + .../apache/gora/mapreduce/MapReduceTestUtils.java | 2 +- gora-mongodb/src/test/conf/gora.properties | 2 +- .../mongodb/mapreduce/TestMongoStoreWordCount.java | 2 +- 6 files changed, 69 insertions(+), 42 deletions(-)
[gora] branch master updated: Upgrade AVRO version to 1.8.2
This is an automated email from the ASF dual-hosted git repository. djkevincr pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/gora.git The following commit(s) were added to refs/heads/master by this push: new a56c6f1 Upgrade AVRO version to 1.8.2 new b848deb Merge pull request #163 from djkevincr/GORA-610 a56c6f1 is described below commit a56c6f10b01e96beb07af7dc2ef7b9fb9fea924b Author: Kevin Ratnasekera AuthorDate: Thu May 2 12:12:15 2019 +0530 Upgrade AVRO version to 1.8.2 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b1b5a10..92e2309 100644 --- a/pom.xml +++ b/pom.xml @@ -770,7 +770,7 @@ 4.2.0 -1.8.1 +1.8.2 2.5.2