From 73cc289467b1072e79f8a10aa4e95c0355814ca1 Mon Sep 17 00:00:00 2001 From: Renato Marroquin Date: Thu, 28 Jul 2016 00:14:12 +0200 Subject: [PATCH 1/6] GORA-482 --- gora-core/pom.xml | 5 ----- .../apache/gora/mapreduce/GoraMapReduceUtils.java | 13 +++++-------- .../apache/gora/mapreduce/TestGoraInputFormat.java | 7 +------ 3 files changed, 6 insertions(+), 19 deletions(-) diff --git a/gora-core/pom.xml b/gora-core/pom.xml index 5bab376aa..0666156cf 100644 --- a/gora-core/pom.xml +++ b/gora-core/pom.xml @@ -105,11 +105,6 @@ - - org.apache.gora - gora-shims-distribution - ${project.version} - org.apache.hadoop diff --git a/gora-core/src/main/java/org/apache/gora/mapreduce/GoraMapReduceUtils.java b/gora-core/src/main/java/org/apache/gora/mapreduce/GoraMapReduceUtils.java index f6e31679b..208d8cd9e 100644 --- a/gora-core/src/main/java/org/apache/gora/mapreduce/GoraMapReduceUtils.java +++ b/gora-core/src/main/java/org/apache/gora/mapreduce/GoraMapReduceUtils.java @@ -21,8 +21,6 @@ import java.io.IOException; import java.util.List; -import org.apache.gora.shims.hadoop.HadoopShim; -import org.apache.gora.shims.hadoop.HadoopShimFactory; import org.apache.gora.util.StringUtils; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; @@ -32,14 +30,13 @@ import org.apache.hadoop.mapreduce.RecordReader; import org.apache.hadoop.mapreduce.TaskAttemptContext; import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; +import org.apache.hadoop.mapreduce.task.JobContextImpl; /** * MapReduce related utilities for Gora */ public class GoraMapReduceUtils { - private static final HadoopShim hadoopShim = HadoopShimFactory.INSTANCE().getHadoopShim(); - public static class HelperInputFormat extends FileInputFormat { @Override public RecordReader createRecordReader(InputSplit arg0, @@ -60,7 +57,7 @@ public static void setIOSerializations(Configuration conf, boolean reuseObjects) String serializationClass = PersistentSerialization.class.getCanonicalName(); String[] serializations = StringUtils.joinStringArrays( - conf.getStrings("io.serializations"), + conf.getStrings("io.serializations"), "org.apache.hadoop.io.serializer.WritableSerialization", StringSerialization.class.getCanonicalName(), serializationClass); @@ -79,11 +76,11 @@ public static JobContext createJobContext(Configuration conf, String inputPath) throws IOException { if(inputPath != null) { - Job job = hadoopShim.createJob(conf); + Job job = Job.getInstance(conf); FileInputFormat.addInputPath(job, new Path(inputPath)); - return hadoopShim.createJobContext(job.getConfiguration()); + return new JobContextImpl(job.getConfiguration(), null); } - return hadoopShim.createJobContext(conf); + return new JobContextImpl(conf, null); } } diff --git a/gora-core/src/test/java/org/apache/gora/mapreduce/TestGoraInputFormat.java b/gora-core/src/test/java/org/apache/gora/mapreduce/TestGoraInputFormat.java index 7e44d8d94..e6872a948 100644 --- a/gora-core/src/test/java/org/apache/gora/mapreduce/TestGoraInputFormat.java +++ b/gora-core/src/test/java/org/apache/gora/mapreduce/TestGoraInputFormat.java @@ -28,8 +28,6 @@ import org.apache.gora.mock.query.MockQuery; import org.apache.gora.mock.store.MockDataStore; import org.apache.gora.query.PartitionQuery; -import org.apache.gora.shims.hadoop.HadoopShim; -import org.apache.gora.shims.hadoop.HadoopShimFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.mapreduce.InputSplit; import org.apache.hadoop.mapreduce.Job; @@ -38,14 +36,11 @@ import static org.junit.Assert.assertTrue; public class TestGoraInputFormat { - - private static final HadoopShim hadoopShim = HadoopShimFactory.INSTANCE().getHadoopShim(); public List getInputSplits() throws IOException, InterruptedException { - //Job job = new Job(); - Job job = hadoopShim.createJob(new Configuration()); + Job job = Job.getInstance(new Configuration()); MockDataStore store = MockDataStore.get(); MockQuery query = store.newQuery(); From 4a1b16ca3505f9509b37efa2e50eb0d3062498ef Mon Sep 17 00:00:00 2001 From: Renato Marroquin Date: Thu, 28 Jul 2016 00:14:39 +0200 Subject: [PATCH 2/6] GORA-482 --- pom.xml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 6ca304597..f5df01b95 100644 --- a/pom.xml +++ b/pom.xml @@ -716,10 +716,10 @@ gora-maven-plugin gora-mongodb - gora-shims-hadoop - gora-shims-hadoop1 - gora-shims-hadoop2 - gora-shims-distribution + + + + gora-solr gora-solr-5 gora-tutorial @@ -911,8 +911,15 @@ org.apache.hadoop - hadoop-client - ${hadoop-2.version} + hadoop-client + ${hadoop-2.version} + true + + + org.apache.hadoop + hadoop-minicluster + ${hadoop-2.test.version} + true From d64a275f709bda4fc9c305db1937dde63eff0b22 Mon Sep 17 00:00:00 2001 From: Renato Marroquin Date: Thu, 28 Jul 2016 10:11:34 +0200 Subject: [PATCH 3/6] Cleaning up --- 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 -------------- .../gora/shims/hadoop1/HadoopShim1.java | 50 --------- .../gora/shims/hadoop1/TestHadoopShim1.java | 35 ------ gora-shims-hadoop2/pom.xml | 78 -------------- .../gora/shims/hadoop2/HadoopShim2.java | 56 ---------- .../gora/shims/hadoop2/TestHadoopShim2.java | 35 ------ 11 files changed, 694 deletions(-) delete mode 100644 gora-shims-distribution/pom.xml delete mode 100644 gora-shims-hadoop/pom.xml delete mode 100644 gora-shims-hadoop/src/main/java/org/apache/gora/shims/hadoop/HadoopShim.java delete mode 100644 gora-shims-hadoop/src/main/java/org/apache/gora/shims/hadoop/HadoopShimFactory.java delete mode 100644 gora-shims-hadoop/src/test/java/org/apache/gora/shims/hadoop/HadoopShimTest.java delete mode 100644 gora-shims-hadoop1/pom.xml delete mode 100644 gora-shims-hadoop1/src/main/java/org/apache/gora/shims/hadoop1/HadoopShim1.java delete mode 100644 gora-shims-hadoop1/src/test/java/org/apache/gora/shims/hadoop1/TestHadoopShim1.java delete mode 100644 gora-shims-hadoop2/pom.xml delete mode 100644 gora-shims-hadoop2/src/main/java/org/apache/gora/shims/hadoop2/HadoopShim2.java delete mode 100644 gora-shims-hadoop2/src/test/java/org/apache/gora/shims/hadoop2/TestHadoopShim2.java diff --git a/gora-shims-distribution/pom.xml b/gora-shims-distribution/pom.xml deleted file mode 100644 index 5c6c8e00c..000000000 --- a/gora-shims-distribution/pom.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - 4.0.0 - - org.apache.gora - gora - 0.7-SNAPSHOT - ../ - - gora-shims-distribution - bundle - - Apache Gora :: Shims Distribution - 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.shims.distribution*;version="${project.version}";-noimport:=true - - - - - - org.apache.maven.plugins - maven-shade-plugin - 2.3 - - - package - - shade - - - - - ${project.groupId}:gora-shims-hadoop - ${project.groupId}:gora-shims-hadoop1 - ${project.groupId}:gora-shims-hadoop2 - - - - - - - - - - - - org.apache.gora - gora-shims-hadoop1 - ${project.version} - - - org.apache.gora - gora-shims-hadoop2 - ${project.version} - - - org.apache.gora - gora-shims-hadoop - ${project.version} - - - diff --git a/gora-shims-hadoop/pom.xml b/gora-shims-hadoop/pom.xml deleted file mode 100644 index de66c6f91..000000000 --- a/gora-shims-hadoop/pom.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - 4.0.0 - - - org.apache.gora - gora - 0.7-SNAPSHOT - ../ - - gora-shims-hadoop - bundle - - Apache Gora :: Shims Hadoop - 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.shims.hadoop*;version="${project.version}";-noimport:=true - - - - - junit - junit - test - - - org.apache.hadoop - hadoop-client - ${hadoop-2.version} - true - - - 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 dc8e97514..000000000 --- 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); - -} 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 57533cdf5..000000000 --- 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 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() { - } - -} 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 762d1248c..000000000 --- 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()); - } - -} diff --git a/gora-shims-hadoop1/pom.xml b/gora-shims-hadoop1/pom.xml deleted file mode 100644 index 2250468dc..000000000 --- a/gora-shims-hadoop1/pom.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - 4.0.0 - - - org.apache.gora - gora - 0.7-SNAPSHOT - ../ - - gora-shims-hadoop1 - bundle - - Apache Gora :: Shims Hadoop 1.x - 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.shims.hadoop1*;version="${project.version}";-noimport:=true - - - - - junit - junit - test - - - org.apache.hadoop - hadoop-core - ${hadoop-1.version} - true - - - org.apache.hadoop - hadoop-test - ${hadoop-1.test.version} - true - - - org.apache.gora - gora-shims-hadoop - ${project.version} - - - 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 9728af6ca..000000000 --- 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); - } - -} 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 d227ce845..000000000 --- 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); - } - -} diff --git a/gora-shims-hadoop2/pom.xml b/gora-shims-hadoop2/pom.xml deleted file mode 100644 index a2bab81df..000000000 --- a/gora-shims-hadoop2/pom.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - 4.0.0 - - - org.apache.gora - gora - 0.7-SNAPSHOT - ../ - - gora-shims-hadoop2 - bundle - - Apache Gora :: Shims Hadoop 2.x - 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.shims.hadoop2*;version="${project.version}";-noimport:=true - - - - - junit - junit - test - - - org.apache.hadoop - hadoop-client - ${hadoop-2.version} - true - - - org.apache.hadoop - hadoop-minicluster - ${hadoop-2.test.version} - true - - - org.apache.gora - gora-shims-hadoop - ${project.version} - - - 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 527ff3675..000000000 --- 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); - } - -} 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 643cae4c1..000000000 --- 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); - } - -} From 1cf3547af79b66928a978a0cba7dab9465408e0b Mon Sep 17 00:00:00 2001 From: Renato Marroquin Date: Thu, 28 Jul 2016 10:11:51 +0200 Subject: [PATCH 4/6] GORA-482 --- pom.xml | 81 +++++++++++++++------------------------------------------ 1 file changed, 21 insertions(+), 60 deletions(-) diff --git a/pom.xml b/pom.xml index f5df01b95..4c8739f86 100644 --- a/pom.xml +++ b/pom.xml @@ -652,54 +652,6 @@ - - hadoop1 - - hadoop1 - - - - - org.apache.hadoop - hadoop-core - ${hadoop-1.version} - - - - - - hadoop2 - - true - - - hadoop2 - - - - - org.apache.hadoop - hadoop-common - ${hadoop-2.version} - - - org.apache.hadoop - hadoop-auth - ${hadoop-2.version} - - - org.apache.hadoop - hadoop-mapreduce-client-core - ${hadoop-2.version} - - - org.apache.hadoop - hadoop-yarn-common - ${hadoop-2.version} - - - - @@ -716,10 +668,6 @@ gora-maven-plugin gora-mongodb - - - - gora-solr gora-solr-5 gora-tutorial @@ -733,9 +681,7 @@ 1.7.6 - 1.2.1 2.5.2 - 1.2.1 2.5.2 0.98.8-hadoop2 0.98.8-hadoop2 @@ -915,12 +861,27 @@ ${hadoop-2.version} true - - org.apache.hadoop - hadoop-minicluster - ${hadoop-2.test.version} - true - + + + + + + + + + + + + + + + + + + + + + org.apache.cxf From d2418c27cc9e8dca323fc43f1c28e9628f89c29f Mon Sep 17 00:00:00 2001 From: Renato Marroquin Date: Thu, 28 Jul 2016 10:28:51 +0200 Subject: [PATCH 5/6] GORA-482 --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index 4c8739f86..fd876add0 100644 --- a/pom.xml +++ b/pom.xml @@ -855,6 +855,7 @@ + org.apache.hadoop hadoop-client From fb4ad6a47e940b22fc42c5640dd5c976428c7173 Mon Sep 17 00:00:00 2001 From: Renato Marroquin Date: Fri, 29 Jul 2016 01:20:42 +0200 Subject: [PATCH 6/6] GORA-482 --- pom.xml | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/pom.xml b/pom.xml index fd876add0..c53765ef6 100644 --- a/pom.xml +++ b/pom.xml @@ -862,27 +862,6 @@ ${hadoop-2.version} true - - - - - - - - - - - - - - - - - - - - - org.apache.cxf