Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E0DE5200B81 for ; Fri, 5 Aug 2016 12:41:26 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DF883160AAF; Fri, 5 Aug 2016 10:41:26 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A7045160AB2 for ; Fri, 5 Aug 2016 12:41:25 +0200 (CEST) Received: (qmail 24551 invoked by uid 500); 5 Aug 2016 10:41:24 -0000 Mailing-List: contact commits-help@gora.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@gora.apache.org Delivered-To: mailing list commits@gora.apache.org Received: (qmail 24509 invoked by uid 99); 5 Aug 2016 10:41:24 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Aug 2016 10:41:24 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 5CEAFEE696; Fri, 5 Aug 2016 10:41:24 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: lewismc@apache.org To: commits@gora.apache.org Date: Fri, 05 Aug 2016 10:41:24 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [01/17] gora git commit: GORA-409 JCache datastore initial project structure commit archived-at: Fri, 05 Aug 2016 10:41:27 -0000 Repository: gora Updated Branches: refs/heads/master fb4ad6a47 -> f4debf25a GORA-409 JCache datastore initial project structure commit Project: http://git-wip-us.apache.org/repos/asf/gora/repo Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/2b8b0610 Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/2b8b0610 Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/2b8b0610 Branch: refs/heads/master Commit: 2b8b0610767f4cc51f0a393a0627b721069f052c Parents: 7325085 Author: Kevin Ratnasekera Authored: Sun May 29 19:17:57 2016 +0530 Committer: Kevin Ratnasekera Committed: Sun May 29 19:17:57 2016 +0530 ---------------------------------------------------------------------- gora-jcache/pom.xml | 154 +++++++++++++++++++ .../apache/gora/jcache/query/JCacheQuery.java | 34 ++++ .../apache/gora/jcache/query/JCacheResult.java | 53 +++++++ .../apache/gora/jcache/store/JCacheStore.java | 105 +++++++++++++ gora-jcache/src/test/resources/gora.properties | 16 ++ pom.xml | 18 +++ 6 files changed, 380 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/gora/blob/2b8b0610/gora-jcache/pom.xml ---------------------------------------------------------------------- diff --git a/gora-jcache/pom.xml b/gora-jcache/pom.xml new file mode 100644 index 0000000..a6fdf39 --- /dev/null +++ b/gora-jcache/pom.xml @@ -0,0 +1,154 @@ + + + + 4.0.0 + + + org.apache.gora + gora + 0.7-SNAPSHOT + ../ + + gora-jcache + bundle + + Apache Gora :: JCache + 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.jcache*;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 + + + + + com.hazelcast + hazelcast-all + + + + javax.cache + cache-api + + + + + org.slf4j + slf4j-log4j12 + + + log4j + log4j + + + javax.jms + jms + + + + + + + junit + junit + + + + org.apache.hadoop + hadoop-minicluster + + + + + http://git-wip-us.apache.org/repos/asf/gora/blob/2b8b0610/gora-jcache/src/main/java/org/apache/gora/jcache/query/JCacheQuery.java ---------------------------------------------------------------------- diff --git a/gora-jcache/src/main/java/org/apache/gora/jcache/query/JCacheQuery.java b/gora-jcache/src/main/java/org/apache/gora/jcache/query/JCacheQuery.java new file mode 100644 index 0000000..0316fb7 --- /dev/null +++ b/gora-jcache/src/main/java/org/apache/gora/jcache/query/JCacheQuery.java @@ -0,0 +1,34 @@ +/** + * 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.jcache.query; + +import org.apache.gora.persistency.impl.PersistentBase; +import org.apache.gora.query.impl.QueryBase; +import org.apache.gora.store.DataStore; + +public class JCacheQuery extends QueryBase { + + public JCacheQuery() { + super(null); + } + + public JCacheQuery(DataStore dataStore) { + super(dataStore); + } + +} http://git-wip-us.apache.org/repos/asf/gora/blob/2b8b0610/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 new file mode 100644 index 0000000..76ef7ba --- /dev/null +++ b/gora-jcache/src/main/java/org/apache/gora/jcache/query/JCacheResult.java @@ -0,0 +1,53 @@ +/** + * 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.jcache.query; + +import java.io.IOException; + +import org.apache.gora.jcache.store.JCacheStore; +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; + +public class JCacheResult extends ResultBase { + + public JCacheStore getDataStore() { + return (JCacheStore) super.getDataStore(); + } + + public JCacheResult(DataStore dataStore, Query query) { + super(dataStore, query); + } + + @Override + public float getProgress() throws IOException { + return 0; + } + + @Override + public void close() throws IOException { + + } + + @Override + protected boolean nextInner() throws IOException { + return true; + } + +} http://git-wip-us.apache.org/repos/asf/gora/blob/2b8b0610/gora-jcache/src/main/java/org/apache/gora/jcache/store/JCacheStore.java ---------------------------------------------------------------------- diff --git a/gora-jcache/src/main/java/org/apache/gora/jcache/store/JCacheStore.java b/gora-jcache/src/main/java/org/apache/gora/jcache/store/JCacheStore.java new file mode 100644 index 0000000..1c52fdd --- /dev/null +++ b/gora-jcache/src/main/java/org/apache/gora/jcache/store/JCacheStore.java @@ -0,0 +1,105 @@ +/** + * 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.jcache.store; + +import java.io.IOException; +import java.util.List; +import java.util.Properties; + +import org.apache.gora.jcache.query.JCacheQuery; +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.impl.DataStoreBase; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class JCacheStore extends DataStoreBase { + + + public static final Logger LOG = LoggerFactory.getLogger(JCacheStore.class); + + + @Override + public void initialize(Class keyClass, Class persistentClass, Properties properties) { + super.initialize(keyClass, persistentClass, properties); + } + + @Override + public String getSchemaName() { + return null; + } + + @Override + public void createSchema() { + } + + @Override + public void deleteSchema() { + } + + @Override + public boolean schemaExists() { + return false; + } + + + @Override + public T get(K key, String[] fields) { + return null; + } + + @Override + public void put(K key, T val) { + } + + @Override + public boolean delete(K key) { + return false; + } + + @Override + public long deleteByQuery(Query query) { + return 0; + } + + @Override + public Result execute(Query query) { + return null; + } + + @Override + public Query newQuery() { + return new JCacheQuery<>(this); + } + + @Override + public List> getPartitions(Query query) throws IOException { + return null; + } + + @Override + public void flush() { + } + + @Override + public void close() { + } + +} http://git-wip-us.apache.org/repos/asf/gora/blob/2b8b0610/gora-jcache/src/test/resources/gora.properties ---------------------------------------------------------------------- diff --git a/gora-jcache/src/test/resources/gora.properties b/gora-jcache/src/test/resources/gora.properties new file mode 100644 index 0000000..83f920a --- /dev/null +++ b/gora-jcache/src/test/resources/gora.properties @@ -0,0 +1,16 @@ +# 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.jcache.store.JCacheStore http://git-wip-us.apache.org/repos/asf/gora/blob/2b8b0610/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 565f3e6..dd5fc52 100644 --- a/pom.xml +++ b/pom.xml @@ -702,6 +702,7 @@ gora-goraci gora-hbase gora-infinispan + gora-jcache gora-dynamodb @@ -759,6 +760,10 @@ 1.2.16 1.6.6 + + 1.0.0 + 3.6.3 + 4.10 @@ -1456,6 +1461,19 @@ + + + com.hazelcast + hazelcast-all + ${hazelcast.version} + + + + javax.cache + cache-api + ${jsr107.api.version} + + org.apache.hadoop