Commit 6c1bd312 authored by YUSHIQIAN's avatar YUSHIQIAN

implementation

parent ff95b518
......@@ -38,8 +38,8 @@
<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">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.69072163" vertical-offset="289" 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" />
<state vertical-scroll-proportion="0.7345361" vertical-offset="270" max-vertical-offset="1800">
<caret line="56" column="0" selection-start-line="56" selection-start-column="0" selection-end-line="56" selection-end-column="0" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#1235#1253#0" expanded="true" />
......@@ -451,8 +451,8 @@
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/WordCountIMC.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.69072163" vertical-offset="289" 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" />
<state vertical-scroll-proportion="0.7345361" vertical-offset="270" max-vertical-offset="1800">
<caret line="56" column="0" selection-start-line="56" selection-start-column="0" selection-end-line="56" selection-end-column="0" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#1235#1253#0" expanded="true" />
......
......@@ -51,8 +51,8 @@ public class WordCountIMC extends Configured implements Tool {
Iterator it = map.entrySet().iterator();
while (it.hasNext()) {
Map.Entry pair = (Map.Entry)it.next();
textValue.set(pair.getKey());
sum.set(pair.getValue());
textValue.set((Text)pair.getKey());
sum.set((LongWritable)pair.getValue());
context.write(textValue, sum);
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