Commit 030a5649 authored by feng's avatar feng

Order inversion 5

parent 5eefc26b
......@@ -3,7 +3,7 @@
<component name="ChangeListManager">
<list default="true" id="05d59ada-3cd7-4c26-9a9f-8ed545f37173" name="Default" comment="">
<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" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
</list>
<ignored path="labs.iws" />
<ignored path=".idea/workspace.xml" />
......@@ -57,8 +57,20 @@
<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.10273973">
<caret line="61" column="41" selection-start-line="61" selection-start-column="41" selection-end-line="61" selection-end-column="41" />
<state vertical-scroll-proportion="0.38356164">
<caret line="119" column="57" selection-start-line="119" selection-start-column="57" selection-end-line="119" selection-end-column="57" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="TextPair.java" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/TextPair.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="91" column="36" selection-start-line="91" selection-start-column="36" selection-end-line="91" selection-end-column="36" />
<folding>
<element signature="imports" expanded="true" />
</folding>
......@@ -474,7 +486,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="false" weight="0.23262031" 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="true" weight="0.23186813" 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" />
......@@ -531,8 +543,7 @@
<state vertical-scroll-proportion="0.0">
<caret line="99" column="42" selection-start-line="99" selection-start-column="42" selection-end-line="99" selection-end-column="42" />
<folding>
<element signature="e#1251#1252#0" expanded="true" />
<element signature="e#1310#1311#0" expanded="true" />
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
......@@ -608,8 +619,7 @@
<state vertical-scroll-proportion="0.0">
<caret line="54" column="0" selection-start-line="54" selection-start-column="0" selection-end-line="54" selection-end-column="0" />
<folding>
<element signature="e#1251#1252#0" expanded="true" />
<element signature="e#1310#1311#0" expanded="true" />
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
......@@ -914,13 +924,12 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/TextPair.java">
<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.10273973">
<caret line="9" column="47" selection-start-line="9" selection-start-column="47" selection-end-line="9" selection-end-column="47" />
<state vertical-scroll-proportion="0.0">
<caret line="122" column="65" selection-start-line="122" selection-start-column="65" selection-end-line="122" selection-end-column="65" />
<folding>
<element signature="e#1251#1252#0" expanded="true" />
<element signature="e#1310#1311#0" expanded="true" />
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
......@@ -939,10 +948,10 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/Stripes.java">
<entry file="file://$PROJECT_DIR$/src/main/java/fr/eurecom/dsg/mapreduce/TextPair.java">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="122" column="65" selection-start-line="122" selection-start-column="65" selection-end-line="122" selection-end-column="65" />
<caret line="91" column="36" selection-start-line="91" selection-start-column="36" selection-end-line="91" selection-end-column="36" />
<folding>
<element signature="imports" expanded="true" />
</folding>
......@@ -951,8 +960,8 @@
</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.10273973">
<caret line="61" column="41" selection-start-line="61" selection-start-column="41" selection-end-line="61" selection-end-column="41" />
<state vertical-scroll-proportion="0.38356164">
<caret line="119" column="57" selection-start-line="119" selection-start-column="57" selection-end-line="119" selection-end-column="57" />
<folding>
<element signature="imports" expanded="true" />
</folding>
......
......@@ -59,7 +59,6 @@ public class OrderInversion extends Configured implements Tool {
// TODO: implement the map method
String line = value.toString();
line.replaceAll("^\\s+", "");
String[] words = line.split("\\s+");
for (String firstWord : words) {
......@@ -118,6 +117,7 @@ public class OrderInversion extends Configured implements Tool {
job.setReducerClass(PairReducer.class);
job.setOutputKeyClass(DoubleWritable.class);
job.setOutputValueClass(DoubleWritable.class);
job.setPartitionerClass(PartitionerTextPair.class);
// TODO: set job output format
job.setOutputFormatClass(TextOutputFormat.class);
// TODO: add the input file as job input (from HDFS) to the variable inputFile
......
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