Skip to content

Commit 4900a83

Browse files
committed
MAPREDUCE-4238. mavenize data_join. (tgraves)
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1338835 13f79535-47bb-0310-9956-ffa450edef68
1 parent 6405709 commit 4900a83

File tree

17 files changed

+137
-3
lines changed

17 files changed

+137
-3
lines changed

hadoop-mapreduce-project/CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,8 @@ Release 0.23.3 - UNRELEASED
483483

484484
MAPREDUCE-4233. NPE can happen in RMNMNodeInfo. (bobby)
485485

486+
MAPREDUCE-4238. mavenize data_join. (tgraves)
487+
486488
Release 0.23.2 - UNRELEASED
487489

488490
INCOMPATIBLE CHANGES

hadoop-project/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,11 @@
228228
<artifactId>hadoop-distcp</artifactId>
229229
<version>${project.version}</version>
230230
</dependency>
231+
<dependency>
232+
<groupId>org.apache.hadoop</groupId>
233+
<artifactId>hadoop-datajoin</artifactId>
234+
<version>${project.version}</version>
235+
</dependency>
231236
<dependency>
232237
<groupId>org.apache.hadoop</groupId>
233238
<artifactId>hadoop-rumen</artifactId>
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License. See accompanying LICENSE file.
14+
-->
15+
<project>
16+
<modelVersion>4.0.0</modelVersion>
17+
<parent>
18+
<groupId>org.apache.hadoop</groupId>
19+
<artifactId>hadoop-project</artifactId>
20+
<version>3.0.0-SNAPSHOT</version>
21+
<relativePath>../../hadoop-project</relativePath>
22+
</parent>
23+
<groupId>org.apache.hadoop</groupId>
24+
<artifactId>hadoop-datajoin</artifactId>
25+
<version>3.0.0-SNAPSHOT</version>
26+
<description>Apache Hadoop Data Join</description>
27+
<name>Apache Hadoop Data Join</name>
28+
<packaging>jar</packaging>
29+
30+
<properties>
31+
<hadoop.log.dir>${project.build.directory}/log</hadoop.log.dir>
32+
</properties>
33+
34+
<dependencies>
35+
<dependency>
36+
<groupId>org.apache.hadoop</groupId>
37+
<artifactId>hadoop-annotations</artifactId>
38+
<scope>provided</scope>
39+
</dependency>
40+
<dependency>
41+
<groupId>org.apache.hadoop</groupId>
42+
<artifactId>hadoop-mapreduce-client-hs</artifactId>
43+
<scope>provided</scope>
44+
</dependency>
45+
<dependency>
46+
<groupId>org.apache.hadoop</groupId>
47+
<artifactId>hadoop-mapreduce-client-core</artifactId>
48+
<scope>provided</scope>
49+
</dependency>
50+
<dependency>
51+
<groupId>org.apache.hadoop</groupId>
52+
<artifactId>hadoop-mapreduce-client-jobclient</artifactId>
53+
<scope>provided</scope>
54+
</dependency>
55+
<dependency>
56+
<groupId>org.apache.hadoop</groupId>
57+
<artifactId>hadoop-mapreduce-client-jobclient</artifactId>
58+
<scope>test</scope>
59+
<type>test-jar</type>
60+
</dependency>
61+
<dependency>
62+
<groupId>org.apache.hadoop</groupId>
63+
<artifactId>hadoop-common</artifactId>
64+
<scope>provided</scope>
65+
</dependency>
66+
<dependency>
67+
<groupId>org.apache.hadoop</groupId>
68+
<artifactId>hadoop-hdfs</artifactId>
69+
<scope>provided</scope>
70+
</dependency>
71+
<dependency>
72+
<groupId>org.apache.hadoop</groupId>
73+
<artifactId>hadoop-common</artifactId>
74+
<scope>test</scope>
75+
<type>test-jar</type>
76+
</dependency>
77+
<dependency>
78+
<groupId>org.apache.hadoop</groupId>
79+
<artifactId>hadoop-hdfs</artifactId>
80+
<scope>test</scope>
81+
<type>test-jar</type>
82+
</dependency>
83+
<dependency>
84+
<groupId>org.apache.hadoop</groupId>
85+
<artifactId>hadoop-yarn-server-tests</artifactId>
86+
<type>test-jar</type>
87+
<scope>test</scope>
88+
</dependency>
89+
</dependencies>
90+
91+
<build>
92+
<plugins>
93+
<plugin>
94+
<groupId>org.apache.maven.plugins</groupId>
95+
<artifactId>maven-antrun-plugin</artifactId>
96+
<executions>
97+
<execution>
98+
<id>create-log-dir</id>
99+
<phase>process-test-resources</phase>
100+
<goals>
101+
<goal>run</goal>
102+
</goals>
103+
<configuration>
104+
<target>
105+
<delete dir="${test.build.data}"/>
106+
<mkdir dir="${test.build.data}"/>
107+
<mkdir dir="${hadoop.log.dir}"/>
108+
</target>
109+
</configuration>
110+
</execution>
111+
</executions>
112+
</plugin>
113+
<plugin>
114+
<groupId>org.apache.maven.plugins</groupId>
115+
<artifactId>maven-jar-plugin</artifactId>
116+
</plugin>
117+
</plugins>
118+
</build>
119+
</project>
120+
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public abstract class JobBase implements Mapper, Reducer {
5151
* the value for the counter
5252
*/
5353
protected void setLongValue(Object name, long value) {
54-
this.longCounters.put(name, new Long(value));
54+
this.longCounters.put(name, Long.valueOf(value));
5555
}
5656

5757
/**
@@ -100,9 +100,9 @@ protected Long addLongValue(Object name, long inc) {
100100
Long val = this.longCounters.get(name);
101101
Long retv = null;
102102
if (val == null) {
103-
retv = new Long(inc);
103+
retv = Long.valueOf(inc);
104104
} else {
105-
retv = new Long(val.longValue() + inc);
105+
retv = Long.valueOf(val.longValue() + inc);
106106
}
107107
this.longCounters.put(name, retv);
108108
return retv;

0 commit comments

Comments
 (0)