Commit 6c1bd312 authored by YUSHIQIAN's avatar YUSHIQIAN
Browse files

implementation

parent ff95b518
...@@ -38,8 +38,8 @@ ...@@ -38,8 +38,8 @@
<file leaf-file-name="WordCountIMC.java" pinned="false" current-in-tab="true"> <file leaf-file-name="WordCountIMC.java" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/WordCountIMC.java"> <entry file="file://$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/WordCountIMC.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.69072163" vertical-offset="289" max-vertical-offset="1800"> <state vertical-scroll-proportion="0.7345361" vertical-offset="270" max-vertical-offset="1800">
<caret line="55" column="46" selection-start-line="55" selection-start-column="46" selection-end-line="55" selection-end-column="46" /> <caret line="56" column="0" selection-start-line="56" selection-start-column="0" selection-end-line="56" selection-end-column="0" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
<element signature="e#1235#1253#0" expanded="true" /> <element signature="e#1235#1253#0" expanded="true" />
...@@ -451,8 +451,8 @@ ...@@ -451,8 +451,8 @@
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/WordCountIMC.java"> <entry file="file://$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/WordCountIMC.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.69072163" vertical-offset="289" max-vertical-offset="1800"> <state vertical-scroll-proportion="0.7345361" vertical-offset="270" max-vertical-offset="1800">
<caret line="55" column="46" selection-start-line="55" selection-start-column="46" selection-end-line="55" selection-end-column="46" /> <caret line="56" column="0" selection-start-line="56" selection-start-column="0" selection-end-line="56" selection-end-column="0" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
<element signature="e#1235#1253#0" expanded="true" /> <element signature="e#1235#1253#0" expanded="true" />
......
...@@ -51,8 +51,8 @@ public class WordCountIMC extends Configured implements Tool { ...@@ -51,8 +51,8 @@ public class WordCountIMC extends Configured implements Tool {
Iterator it = map.entrySet().iterator(); Iterator it = map.entrySet().iterator();
while (it.hasNext()) { while (it.hasNext()) {
Map.Entry pair = (Map.Entry)it.next(); Map.Entry pair = (Map.Entry)it.next();
textValue.set(pair.getKey()); textValue.set((Text)pair.getKey());
sum.set(pair.getValue()); sum.set((LongWritable)pair.getValue());
context.write(textValue, sum); context.write(textValue, sum);
it.remove(); // avoids a ConcurrentModificationException it.remove(); // avoids a ConcurrentModificationException
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment