You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gora.apache.org by rm...@apache.org on 2016/07/31 19:33:11 UTC
[3/6] gora git commit: Cleaning up
Cleaning up
Project: http://git-wip-us.apache.org/repos/asf/gora/repo
Commit: http://git-wip-us.apache.org/repos/asf/gora/commit/d64a275f
Tree: http://git-wip-us.apache.org/repos/asf/gora/tree/d64a275f
Diff: http://git-wip-us.apache.org/repos/asf/gora/diff/d64a275f
Branch: refs/heads/master
Commit: d64a275f709bda4fc9c305db1937dde63eff0b22
Parents: 4a1b16c
Author: Renato Marroquin <ma...@inf.ethz.ch>
Authored: Thu Jul 28 10:11:34 2016 +0200
Committer: Renato Marroquin <ma...@inf.ethz.ch>
Committed: Thu Jul 28 10:11:34 2016 +0200
----------------------------------------------------------------------
gora-shims-distribution/pom.xml | 99 ------------------
gora-shims-hadoop/pom.xml | 69 -------------
.../apache/gora/shims/hadoop/HadoopShim.java | 55 ----------
.../gora/shims/hadoop/HadoopShimFactory.java | 100 -------------------
.../gora/shims/hadoop/HadoopShimTest.java | 37 -------
gora-shims-hadoop1/pom.xml | 80 ---------------
.../apache/gora/shims/hadoop1/HadoopShim1.java | 50 ----------
.../gora/shims/hadoop1/TestHadoopShim1.java | 35 -------
gora-shims-hadoop2/pom.xml | 78 ---------------
.../apache/gora/shims/hadoop2/HadoopShim2.java | 56 -----------
.../gora/shims/hadoop2/TestHadoopShim2.java | 35 -------
11 files changed, 694 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/gora/blob/d64a275f/gora-shims-distribution/pom.xml
----------------------------------------------------------------------
diff --git a/gora-shims-distribution/pom.xml b/gora-shims-distribution/pom.xml
deleted file mode 100644
index 5c6c8e0..0000000
--- a/gora-shims-distribution/pom.xml
+++ /dev/null
@@ -1,99 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.gora</groupId>
- <artifactId>gora</artifactId>
- <version>0.7-SNAPSHOT</version>
- <relativePath>../</relativePath>
- </parent>
- <artifactId>gora-shims-distribution</artifactId>
- <packaging>bundle</packaging>
-
- <name>Apache Gora :: Shims Distribution</name>
- <description>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.</description>
- <inceptionYear>2010</inceptionYear>
- <organization>
- <name>The Apache Software Foundation</name>
- <url>http://www.apache.org/</url>
- </organization>
- <issueManagement>
- <system>JIRA</system>
- <url>https://issues.apache.org/jira/browse/GORA</url>
- </issueManagement>
- <ciManagement>
- <system>Jenkins</system>
- <url>https://builds.apache.org/job/Gora-trunk/</url>
- </ciManagement>
-
- <properties>
- <osgi.import>*</osgi.import>
- <osgi.export>org.apache.gora.shims.distribution*;version="${project.version}";-noimport:=true</osgi.export>
- </properties>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <version>2.3</version>
- <executions>
- <execution>
- <phase>package</phase>
- <goals>
- <goal>shade</goal>
- </goals>
- <configuration>
- <artifactSet>
- <includes>
- <include>${project.groupId}:gora-shims-hadoop</include>
- <include>${project.groupId}:gora-shims-hadoop1</include>
- <include>${project.groupId}:gora-shims-hadoop2</include>
- </includes>
- </artifactSet>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.gora</groupId>
- <artifactId>gora-shims-hadoop1</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.gora</groupId>
- <artifactId>gora-shims-hadoop2</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.gora</groupId>
- <artifactId>gora-shims-hadoop</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/gora/blob/d64a275f/gora-shims-hadoop/pom.xml
----------------------------------------------------------------------
diff --git a/gora-shims-hadoop/pom.xml b/gora-shims-hadoop/pom.xml
deleted file mode 100644
index de66c6f..0000000
--- a/gora-shims-hadoop/pom.xml
+++ /dev/null
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.gora</groupId>
- <artifactId>gora</artifactId>
- <version>0.7-SNAPSHOT</version>
- <relativePath>../</relativePath>
- </parent>
- <artifactId>gora-shims-hadoop</artifactId>
- <packaging>bundle</packaging>
-
- <name>Apache Gora :: Shims Hadoop</name>
- <description>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.</description>
- <inceptionYear>2010</inceptionYear>
- <organization>
- <name>The Apache Software Foundation</name>
- <url>http://www.apache.org/</url>
- </organization>
- <issueManagement>
- <system>JIRA</system>
- <url>https://issues.apache.org/jira/browse/GORA</url>
- </issueManagement>
- <ciManagement>
- <system>Jenkins</system>
- <url>https://builds.apache.org/job/Gora-trunk/</url>
- </ciManagement>
-
- <properties>
- <osgi.import>*</osgi.import>
- <osgi.export>org.apache.gora.shims.hadoop*;version="${project.version}";-noimport:=true</osgi.export>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.hadoop</groupId>
- <artifactId>hadoop-client</artifactId>
- <version>${hadoop-2.version}</version>
- <optional>true</optional>
- </dependency>
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/gora/blob/d64a275f/gora-shims-hadoop/src/main/java/org/apache/gora/shims/hadoop/HadoopShim.java
----------------------------------------------------------------------
diff --git a/gora-shims-hadoop/src/main/java/org/apache/gora/shims/hadoop/HadoopShim.java b/gora-shims-hadoop/src/main/java/org/apache/gora/shims/hadoop/HadoopShim.java
deleted file mode 100644
index dc8e975..0000000
--- a/gora-shims-hadoop/src/main/java/org/apache/gora/shims/hadoop/HadoopShim.java
+++ /dev/null
@@ -1,55 +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.
- */
-package org.apache.gora.shims.hadoop;
-
-import java.io.IOException;
-
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.mapreduce.Job;
-import org.apache.hadoop.mapreduce.JobContext;
-
-/**
- * Provides version independent utility methods for interacting with Hadoop.
- */
-public abstract class HadoopShim {
-
- public HadoopShim() {
- super();
- }
-
- /**
- * Create a new Hadoop {@link Job}.
- *
- * @param configuration
- * The job's configuration.
- * @return A newly created instance backed by the provided configuration.
- * @throws IOException if the job cannot be created successfully from given configuration
- */
- public abstract Job createJob(Configuration configuration)
- throws IOException;
-
- /**
- * Create a new {@link JobContext} object.
- *
- * @param configuration
- * The configuration for this job context.
- * @return A newly created instance.
- */
- public abstract JobContext createJobContext(Configuration configuration);
-
-}
http://git-wip-us.apache.org/repos/asf/gora/blob/d64a275f/gora-shims-hadoop/src/main/java/org/apache/gora/shims/hadoop/HadoopShimFactory.java
----------------------------------------------------------------------
diff --git a/gora-shims-hadoop/src/main/java/org/apache/gora/shims/hadoop/HadoopShimFactory.java b/gora-shims-hadoop/src/main/java/org/apache/gora/shims/hadoop/HadoopShimFactory.java
deleted file mode 100644
index 57533cd..0000000
--- a/gora-shims-hadoop/src/main/java/org/apache/gora/shims/hadoop/HadoopShimFactory.java
+++ /dev/null
@@ -1,100 +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.
- */
-package org.apache.gora.shims.hadoop;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.hadoop.util.VersionInfo;
-
-/**
- * Factory to create {@link HadoopShim} objects.
- */
-public class HadoopShimFactory {
-
- /**
- * Hadoop shim version mapping.
- */
- private static final Map<String, String> HADOOP_VERSION_TO_IMPL_MAP = new HashMap<>();
-
- static {
- HADOOP_VERSION_TO_IMPL_MAP.put("1",
- "org.apache.gora.shims.hadoop1.HadoopShim1");
- HADOOP_VERSION_TO_IMPL_MAP.put("2",
- "org.apache.gora.shims.hadoop2.HadoopShim2");
- }
-
- // package private
- static class Singleton {
- public static final HadoopShimFactory INSTANCE = new HadoopShimFactory();
- }
-
- /**
- * Access the {@link HadoopShimFactory} singleton.
- *
- * @return the shared instance of {@link HadoopShimFactory}.
- */
- public static HadoopShimFactory INSTANCE() {
- return Singleton.INSTANCE;
- }
-
- /**
- * Get the Hadoop shim for the Hadoop version on the class path. In case it
- * fails to obtain an appropriate shim (i.e. unsupported Hadoop version), it
- * throws a {@link RuntimeException}.
- *
- * Note that this method is potentially costly.
- *
- * @return A newly created instance of a {@link HadoopShim}.
- */
- public HadoopShim getHadoopShim() {
- String version = getMajorVersion();
- String className = HADOOP_VERSION_TO_IMPL_MAP.get(version);
-
- try {
- Class<?> class1 = Class.forName(className);
- return HadoopShim.class.cast(class1.newInstance());
- } catch (Exception e) {
- throw new RuntimeException(
- "Could not load Hadoop shim for version " + version
- + ", className=" + className, e);
- }
- }
-
- /**
- * Get the Hadoop major version number.
- *
- * @return The major version number of Hadoop.
- */
- public String getMajorVersion() {
- String vers = VersionInfo.getVersion();
-
- String[] parts = vers.split("\\.");
- if (parts.length < 2) {
- throw new RuntimeException("Unable to parse Hadoop version: "
- + vers + " (expected X.Y.* format)");
- }
- return parts[0];
-
- }
-
- // package private
- HadoopShimFactory() {
- }
-
-}
http://git-wip-us.apache.org/repos/asf/gora/blob/d64a275f/gora-shims-hadoop/src/test/java/org/apache/gora/shims/hadoop/HadoopShimTest.java
----------------------------------------------------------------------
diff --git a/gora-shims-hadoop/src/test/java/org/apache/gora/shims/hadoop/HadoopShimTest.java b/gora-shims-hadoop/src/test/java/org/apache/gora/shims/hadoop/HadoopShimTest.java
deleted file mode 100644
index 762d124..0000000
--- a/gora-shims-hadoop/src/test/java/org/apache/gora/shims/hadoop/HadoopShimTest.java
+++ /dev/null
@@ -1,37 +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.
- */
-package org.apache.gora.shims.hadoop;
-
-import org.junit.Test;
-import static org.junit.Assert.*;
-
-public class HadoopShimTest {
-
- @Test
- public void testGetMajorVersion() {
- String version = HadoopShimFactory.INSTANCE().getMajorVersion();
- assertNotNull(version);
- assertTrue(version.length() > 0);
- }
-
- @Test
- public void testInstance() {
- assertNotNull(HadoopShimFactory.INSTANCE());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/gora/blob/d64a275f/gora-shims-hadoop1/pom.xml
----------------------------------------------------------------------
diff --git a/gora-shims-hadoop1/pom.xml b/gora-shims-hadoop1/pom.xml
deleted file mode 100644
index 2250468..0000000
--- a/gora-shims-hadoop1/pom.xml
+++ /dev/null
@@ -1,80 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.gora</groupId>
- <artifactId>gora</artifactId>
- <version>0.7-SNAPSHOT</version>
- <relativePath>../</relativePath>
- </parent>
- <artifactId>gora-shims-hadoop1</artifactId>
- <packaging>bundle</packaging>
-
- <name>Apache Gora :: Shims Hadoop 1.x</name>
- <description>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.</description>
- <inceptionYear>2010</inceptionYear>
- <organization>
- <name>The Apache Software Foundation</name>
- <url>http://www.apache.org/</url>
- </organization>
- <issueManagement>
- <system>JIRA</system>
- <url>https://issues.apache.org/jira/browse/GORA</url>
- </issueManagement>
- <ciManagement>
- <system>Jenkins</system>
- <url>https://builds.apache.org/job/Gora-trunk/</url>
- </ciManagement>
-
- <properties>
- <osgi.import>*</osgi.import>
- <osgi.export>org.apache.gora.shims.hadoop1*;version="${project.version}";-noimport:=true</osgi.export>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.hadoop</groupId>
- <artifactId>hadoop-core</artifactId>
- <version>${hadoop-1.version}</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.apache.hadoop</groupId>
- <artifactId>hadoop-test</artifactId>
- <version>${hadoop-1.test.version}</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.apache.gora</groupId>
- <artifactId>gora-shims-hadoop</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/gora/blob/d64a275f/gora-shims-hadoop1/src/main/java/org/apache/gora/shims/hadoop1/HadoopShim1.java
----------------------------------------------------------------------
diff --git a/gora-shims-hadoop1/src/main/java/org/apache/gora/shims/hadoop1/HadoopShim1.java b/gora-shims-hadoop1/src/main/java/org/apache/gora/shims/hadoop1/HadoopShim1.java
deleted file mode 100644
index 9728af6..0000000
--- a/gora-shims-hadoop1/src/main/java/org/apache/gora/shims/hadoop1/HadoopShim1.java
+++ /dev/null
@@ -1,50 +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.
- */
-package org.apache.gora.shims.hadoop1;
-
-import java.io.IOException;
-
-import org.apache.gora.shims.hadoop.HadoopShim;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.mapreduce.Job;
-import org.apache.hadoop.mapreduce.JobContext;
-
-/**
- * Provides shim implementation for Hadoop 1.x.
- */
-public class HadoopShim1 extends HadoopShim {
-
- public HadoopShim1() {
- super();
- }
-
- /**
- * {@inheritDoc}
- */
- public Job createJob(Configuration configuration) throws IOException {
- return new Job(configuration);
- }
-
- /**
- * {@inheritDoc}
- */
- public JobContext createJobContext(Configuration configuration) {
- return new JobContext(configuration, null);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/gora/blob/d64a275f/gora-shims-hadoop1/src/test/java/org/apache/gora/shims/hadoop1/TestHadoopShim1.java
----------------------------------------------------------------------
diff --git a/gora-shims-hadoop1/src/test/java/org/apache/gora/shims/hadoop1/TestHadoopShim1.java b/gora-shims-hadoop1/src/test/java/org/apache/gora/shims/hadoop1/TestHadoopShim1.java
deleted file mode 100644
index d227ce8..0000000
--- a/gora-shims-hadoop1/src/test/java/org/apache/gora/shims/hadoop1/TestHadoopShim1.java
+++ /dev/null
@@ -1,35 +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.
- */
-package org.apache.gora.shims.hadoop1;
-
-import org.apache.gora.shims.hadoop.HadoopShim;
-import org.apache.gora.shims.hadoop.HadoopShimFactory;
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-public class TestHadoopShim1 {
-
- @Test
- public void testCorrectVersion() {
- HadoopShim shim = HadoopShimFactory.INSTANCE().getHadoopShim();
-
- assertSame(shim.getClass(), HadoopShim1.class);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/gora/blob/d64a275f/gora-shims-hadoop2/pom.xml
----------------------------------------------------------------------
diff --git a/gora-shims-hadoop2/pom.xml b/gora-shims-hadoop2/pom.xml
deleted file mode 100644
index a2bab81..0000000
--- a/gora-shims-hadoop2/pom.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
- <!--
- 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.
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.gora</groupId>
- <artifactId>gora</artifactId>
- <version>0.7-SNAPSHOT</version>
- <relativePath>../</relativePath>
- </parent>
- <artifactId>gora-shims-hadoop2</artifactId>
- <packaging>bundle</packaging>
-
- <name>Apache Gora :: Shims Hadoop 2.x</name>
- <description>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.</description>
- <inceptionYear>2010</inceptionYear>
- <organization>
- <name>The Apache Software Foundation</name>
- <url>http://www.apache.org/</url>
- </organization>
- <issueManagement>
- <system>JIRA</system>
- <url>https://issues.apache.org/jira/browse/GORA</url>
- </issueManagement>
- <ciManagement>
- <system>Jenkins</system>
- <url>https://builds.apache.org/job/Gora-trunk/</url>
- </ciManagement>
-
- <properties>
- <osgi.import>*</osgi.import>
- <osgi.export>org.apache.gora.shims.hadoop2*;version="${project.version}";-noimport:=true</osgi.export>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.hadoop</groupId>
- <artifactId>hadoop-client</artifactId>
- <version>${hadoop-2.version}</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.apache.hadoop</groupId>
- <artifactId>hadoop-minicluster</artifactId>
- <version>${hadoop-2.test.version}</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.apache.gora</groupId>
- <artifactId>gora-shims-hadoop</artifactId>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/gora/blob/d64a275f/gora-shims-hadoop2/src/main/java/org/apache/gora/shims/hadoop2/HadoopShim2.java
----------------------------------------------------------------------
diff --git a/gora-shims-hadoop2/src/main/java/org/apache/gora/shims/hadoop2/HadoopShim2.java b/gora-shims-hadoop2/src/main/java/org/apache/gora/shims/hadoop2/HadoopShim2.java
deleted file mode 100644
index 527ff36..0000000
--- a/gora-shims-hadoop2/src/main/java/org/apache/gora/shims/hadoop2/HadoopShim2.java
+++ /dev/null
@@ -1,56 +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.
- */
-package org.apache.gora.shims.hadoop2;
-
-import java.io.IOException;
-
-import org.apache.gora.shims.hadoop.HadoopShim;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.mapreduce.Job;
-import org.apache.hadoop.mapreduce.JobContext;
-import org.apache.hadoop.mapreduce.task.JobContextImpl;
-
-/**
- * Shim for Hadoop 2.x.
- */
-public class HadoopShim2 extends HadoopShim {
-
- public HadoopShim2() {
- super();
- }
-
- /**
- * {@inheritDoc}
- *
- * Use the Hadoop 2.x way of creating a {@link Job} object.
- */
- public Job createJob(Configuration configuration) throws IOException {
- Job instance = Job.getInstance(configuration);
- return instance;
- }
-
- /**
- * {@inheritDoc}
- *
- * Use the Hadoop 2.x way of creating a {@link JobContext} object.
- */
- public JobContext createJobContext(Configuration configuration) {
- return new JobContextImpl(configuration, null);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/gora/blob/d64a275f/gora-shims-hadoop2/src/test/java/org/apache/gora/shims/hadoop2/TestHadoopShim2.java
----------------------------------------------------------------------
diff --git a/gora-shims-hadoop2/src/test/java/org/apache/gora/shims/hadoop2/TestHadoopShim2.java b/gora-shims-hadoop2/src/test/java/org/apache/gora/shims/hadoop2/TestHadoopShim2.java
deleted file mode 100644
index 643cae4..0000000
--- a/gora-shims-hadoop2/src/test/java/org/apache/gora/shims/hadoop2/TestHadoopShim2.java
+++ /dev/null
@@ -1,35 +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.
- */
-package org.apache.gora.shims.hadoop2;
-
-import org.apache.gora.shims.hadoop.HadoopShim;
-import org.apache.gora.shims.hadoop.HadoopShimFactory;
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-public class TestHadoopShim2 {
-
- @Test
- public void testCorrectVersion() {
- HadoopShim shim = HadoopShimFactory.INSTANCE().getHadoopShim();
-
- assertSame(shim.getClass(), HadoopShim2.class);
- }
-
-}