Skip to content

Commit 3072426

Browse files
author
Thomas Risberg
committed
Cleaning up
1 parent 0bcd166 commit 3072426

File tree

3 files changed

+13
-18
lines changed

3 files changed

+13
-18
lines changed

tweet-counts-hadoop/.classpath

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66
<attribute name="maven.pomderived" value="true"/>
77
</attributes>
88
</classpathentry>
9-
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
10-
<attributes>
11-
<attribute name="maven.pomderived" value="true"/>
12-
</attributes>
13-
</classpathentry>
149
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
1510
<attributes>
1611
<attribute name="optional" value="true"/>
@@ -22,7 +17,7 @@
2217
<attribute name="maven.pomderived" value="true"/>
2318
</attributes>
2419
</classpathentry>
25-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
20+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
2621
<attributes>
2722
<attribute name="maven.pomderived" value="true"/>
2823
</attributes>
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
eclipse.preferences.version=1
2-
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
3-
org.eclipse.jdt.core.compiler.compliance=1.5
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
4+
org.eclipse.jdt.core.compiler.compliance=1.6
5+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
47
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
5-
org.eclipse.jdt.core.compiler.source=1.5
8+
org.eclipse.jdt.core.compiler.source=1.6

tweet-counts-hadoop/src/main/java/com/springdeveloper/hadoop/TweetHashTagCounter.java

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@
1313

1414
public class TweetHashTagCounter {
1515

16-
/**
17-
* @param args
18-
* @throws IOException
19-
* @throws ClassNotFoundException
20-
* @throws InterruptedException
21-
*/
2216
public static void main(String[] args) throws IOException, InterruptedException, ClassNotFoundException {
2317
Configuration conf = new Configuration();
2418
String[] myArgs = new GenericOptionsParser(conf, args).getRemainingArgs();
@@ -28,13 +22,16 @@ public static void main(String[] args) throws IOException, InterruptedException,
2822
}
2923
Job job = Job.getInstance(conf, "Tweet Hash Tag Counter");
3024
job.setJarByClass(TweetHashTagCounter.class);
25+
26+
FileInputFormat.addInputPath(job, new Path(myArgs[0]));
27+
FileOutputFormat.setOutputPath(job, new Path(myArgs[1]));
28+
3129
job.setMapperClass(TweetCountMapper.class);
32-
job.setCombinerClass(IntSumReducer.class);
3330
job.setReducerClass(IntSumReducer.class);
31+
3432
job.setOutputKeyClass(Text.class);
3533
job.setOutputValueClass(IntWritable.class);
36-
FileInputFormat.addInputPath(job, new Path(myArgs[0]));
37-
FileOutputFormat.setOutputPath(job, new Path(myArgs[1]));
34+
3835
System.exit(job.waitForCompletion(true) ? 0 : 1);
3936
}
4037

0 commit comments

Comments
 (0)