Commit 9f21c02f authored by feng's avatar feng

Order inversion 2

parent 17f6c634
......@@ -2,10 +2,8 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="05d59ada-3cd7-4c26-9a9f-8ed545f37173" name="Default" comment="">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/OrderInversion.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/labs/mapreduce-lab/src/fr/eurecom/dsg/mapreduce/OrderInversion.java" afterPath="$PROJECT_DIR$/labs/mapreduce-lab/src/fr/eurecom/dsg/mapreduce/OrderInversion.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/TextPair.java" afterPath="$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/TextPair.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/OrderInversion.java" afterPath="$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/OrderInversion.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/StringToIntMapWritable.java" afterPath="$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/StringToIntMapWritable.java" />
</list>
<ignored path="labs.iws" />
<ignored path=".idea/workspace.xml" />
......@@ -40,17 +38,17 @@
</provider>
</entry>
</file>
<file leaf-file-name="StringToIntMapWritable.java" pinned="false" current-in-tab="true">
<file leaf-file-name="StringToIntMapWritable.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/StringToIntMapWritable.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="1.1883562">
<caret line="78" column="36" selection-start-line="78" selection-start-column="36" selection-end-line="78" selection-end-column="36" />
<state vertical-scroll-proportion="0.0">
<caret line="61" column="0" selection-start-line="61" selection-start-column="0" selection-end-line="61" selection-end-column="0" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#2236#2237#0" expanded="true" />
<element signature="e#2299#2300#0" expanded="true" />
<element signature="e#2538#2539#0" expanded="true" />
<element signature="e#2589#2590#0" expanded="true" />
<element signature="e#2235#2236#0" expanded="true" />
<element signature="e#2298#2299#0" expanded="true" />
<element signature="e#2537#2538#0" expanded="true" />
<element signature="e#2588#2589#0" expanded="true" />
</folding>
</state>
</provider>
......@@ -70,11 +68,11 @@
</provider>
</entry>
</file>
<file leaf-file-name="OrderInversion.java" pinned="false" current-in-tab="false">
<file leaf-file-name="OrderInversion.java" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/OrderInversion.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="60" column="25" selection-start-line="60" selection-start-column="25" selection-end-line="60" selection-end-column="25" />
<state vertical-scroll-proportion="-0.7808219">
<caret line="51" column="41" selection-start-line="51" selection-start-column="41" selection-end-line="51" selection-end-column="41" />
<folding>
<element signature="imports" expanded="true" />
</folding>
......@@ -102,11 +100,11 @@
<option value="$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/WordCountCombiner.java" />
<option value="$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/WordCount.java" />
<option value="$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/WordCountIMC.java" />
<option value="$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/StringToIntMapWritable.java" />
<option value="$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/Stripes.java" />
<option value="$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/Pair.java" />
<option value="$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/TextPair.java" />
<option value="$PROJECT_DIR$/labs/mapreduce-lab/src/fr/eurecom/dsg/mapreduce/OrderInversion.java" />
<option value="$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/StringToIntMapWritable.java" />
<option value="$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/OrderInversion.java" />
</list>
</option>
......@@ -490,7 +488,7 @@
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32994652" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Application Servers" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.47802198" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.23262031" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
......@@ -580,10 +578,10 @@
<caret line="76" column="27" selection-start-line="76" selection-start-column="27" selection-end-line="76" selection-end-column="27" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#2236#2237#0" expanded="true" />
<element signature="e#2299#2300#0" expanded="true" />
<element signature="e#2538#2539#0" expanded="true" />
<element signature="e#2589#2590#0" expanded="true" />
<element signature="e#2235#2236#0" expanded="true" />
<element signature="e#2298#2299#0" expanded="true" />
<element signature="e#2537#2538#0" expanded="true" />
<element signature="e#2588#2589#0" expanded="true" />
</folding>
</state>
</provider>
......@@ -658,10 +656,10 @@
<caret line="22" column="28" selection-start-line="22" selection-start-column="28" selection-end-line="22" selection-end-column="28" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#2236#2237#0" expanded="true" />
<element signature="e#2299#2300#0" expanded="true" />
<element signature="e#2538#2539#0" expanded="true" />
<element signature="e#2589#2590#0" expanded="true" />
<element signature="e#2235#2236#0" expanded="true" />
<element signature="e#2298#2299#0" expanded="true" />
<element signature="e#2537#2538#0" expanded="true" />
<element signature="e#2588#2589#0" expanded="true" />
</folding>
</state>
</provider>
......@@ -898,16 +896,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/Stripes.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="105" column="0" selection-start-line="105" selection-start-column="0" selection-end-line="105" selection-end-column="0" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/labs/mapreduce-lab/src/fr/eurecom/dsg/mapreduce/Pair.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.6070615">
......@@ -934,16 +922,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/OrderInversion.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="60" column="25" selection-start-line="60" selection-start-column="25" selection-end-line="60" selection-end-column="25" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="jar://$MAVEN_REPOSITORY$/org/apache/hadoop/hadoop-common/2.5.0-cdh5.3.2/hadoop-common-2.5.0-cdh5.3.2.jar!/org/apache/hadoop/io/Text.class">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-1.3222749">
......@@ -966,14 +944,34 @@
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/StringToIntMapWritable.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="1.1883562">
<caret line="78" column="36" selection-start-line="78" selection-start-column="36" selection-end-line="78" selection-end-column="36" />
<state vertical-scroll-proportion="0.0">
<caret line="61" column="0" selection-start-line="61" selection-start-column="0" selection-end-line="61" selection-end-column="0" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#2235#2236#0" expanded="true" />
<element signature="e#2298#2299#0" expanded="true" />
<element signature="e#2537#2538#0" expanded="true" />
<element signature="e#2588#2589#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/Stripes.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="105" column="0" selection-start-line="105" selection-start-column="0" selection-end-line="105" selection-end-column="0" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/OrderInversion.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-0.7808219">
<caret line="51" column="41" selection-start-line="51" selection-start-column="41" selection-end-line="51" selection-end-column="41" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#2236#2237#0" expanded="true" />
<element signature="e#2299#2300#0" expanded="true" />
<element signature="e#2538#2539#0" expanded="true" />
<element signature="e#2589#2590#0" expanded="true" />
</folding>
</state>
</provider>
......
......@@ -112,8 +112,8 @@ public class OrderInversion extends Configured implements Tool {
job.setInputFormatClass(TextInputFormat.class);
// TODO: set map class and the map output key and value classes
job.setMapperClass(PairMapper.class);
job.setMapOutputValueClass(DoubleWritable.class);
job.setMapOutputKeyClass(IntWritable.class);
job.setMapOutputValueClass(IntWritable.class);
job.setMapOutputKeyClass(TextPair.class);
// TODO: set reduce class and the reduce output key and value classes
job.setReducerClass(PairReducer.class);
job.setOutputKeyClass(DoubleWritable.class);
......
......@@ -59,7 +59,6 @@ public class StringToIntMapWritable implements Writable {
int size = hashMap.size();
IntWritable sizeWritable = new IntWritable(size);
sizeWritable.write(out);
Set<Text> keys = hashMap.keySet();
Iterator iterator = keys.iterator();
while (iterator.hasNext()) {
......
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