Skip to content

Commit

Permalink
Remove snippet markers from ch05 files that aren't used in book listi…
Browse files Browse the repository at this point in the history
…ngs.
  • Loading branch information
tomwhite committed Sep 19, 2011
1 parent 5bf140e commit 10f9590
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 25 deletions.
3 changes: 0 additions & 3 deletions ch05/src/main/java/v3/MaxTemperatureDriver.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// == MaxTemperatureDriverV3
// vv MaxTemperatureDriverV3
package v3;

import org.apache.hadoop.conf.Configured;
Expand Down Expand Up @@ -47,4 +45,3 @@ public static void main(String[] args) throws Exception {
System.exit(exitCode);
}
}
//^^ MaxTemperatureDriverV3
3 changes: 0 additions & 3 deletions ch05/src/main/java/v4/MaxTemperatureDriver.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// == MaxTemperatureDriverV4
// vv MaxTemperatureDriverV4
package v4;

import org.apache.hadoop.conf.Configured;
Expand Down Expand Up @@ -47,4 +45,3 @@ public static void main(String[] args) throws Exception {
System.exit(exitCode);
}
}
//^^ MaxTemperatureDriverV4
3 changes: 0 additions & 3 deletions ch05/src/main/java/v5/MaxTemperatureDriver.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//== MaxTemperatureDriverV5
//vv MaxTemperatureDriverV5
package v5;

import org.apache.hadoop.conf.Configured;
Expand Down Expand Up @@ -47,4 +45,3 @@ public static void main(String[] args) throws Exception {
System.exit(exitCode);
}
}
//^^ MaxTemperatureDriverV5
3 changes: 0 additions & 3 deletions ch05/src/main/java/v5/NcdcRecordParser.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// cc NcdcRecordParserV5 A class for parsing weather records in NCDC format
package v5;
import org.apache.hadoop.io.Text;

// vv NcdcRecordParserV5
public class NcdcRecordParser {

private static final int MISSING_TEMPERATURE = 9999;
Expand Down Expand Up @@ -47,4 +45,3 @@ public int getAirTemperature() {
return airTemperature;
}
}
// ^^ NcdcRecordParserV5
3 changes: 0 additions & 3 deletions ch05/src/main/java/v7/MaxTemperatureDriver.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
//== MaxTemperatureDriverV7
//vv MaxTemperatureDriverV7
package v7;

import org.apache.hadoop.conf.Configured;
Expand Down Expand Up @@ -47,4 +45,3 @@ public static void main(String[] args) throws Exception {
System.exit(exitCode);
}
}
//^^ MaxTemperatureDriverV7
3 changes: 0 additions & 3 deletions ch05/src/test/java/v2/MaxTemperatureMapperTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// == MaxTemperatureMapperTestV2
// vv MaxTemperatureMapperTestV2
package v2;

import static org.mockito.Mockito.*;
Expand Down Expand Up @@ -43,4 +41,3 @@ public void ignoresMissingTemperatureRecord() throws IOException,
verify(context, never()).write(any(Text.class), any(IntWritable.class));
}
}
//^^ MaxTemperatureMapperTestV2
3 changes: 0 additions & 3 deletions ch05/src/test/java/v3/MaxTemperatureMapperTest.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// == MaxTemperatureMapperTestV3
// vv MaxTemperatureMapperTestV3
package v3;

import static org.mockito.Mockito.*;
Expand Down Expand Up @@ -79,4 +77,3 @@ public void ignoresSuspectQualityRecord() throws IOException,
}

}
//^^ MaxTemperatureMapperTestV3
7 changes: 3 additions & 4 deletions snippet/bin/generate_listings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ bin=`cd "$bin"; pwd`

actual="$bin"/../actual

perl $bin/phragmite_db.pl $actual/ch02/ $bin/../../ch02/src/main/java/*.java
perl $bin/phragmite_db.pl $actual/ch04/ $bin/../../ch04/src/main/java/*.java
perl $bin/phragmite_db.pl $actual/ch05/ $bin/../../ch05/src/main/java/*.java $bin/../../ch05/src/test/java/*.java
perl $bin/phragmite_db.pl $actual/ch05/ $bin/../../ch05/src/main/java/v?/*.java $bin/../../ch05/src/test/java/v?/*.java
perl $bin/phragmite_db.pl $actual/ch02/ $(grep -ElR '(// ?cc|// ?==)' --include '*.java' $bin/../../ch02)
perl $bin/phragmite_db.pl $actual/ch04/ $(grep -ElR '(// ?cc|// ?==)' --include '*.java' $bin/../../ch04)
perl $bin/phragmite_db.pl $actual/ch05/ $(grep -ElR '(// ?cc|// ?==)' --include '*.java' $bin/../../ch05)

0 comments on commit 10f9590

Please sign in to comment.