Skip to content
Browse files

Allow snippet version overrides to be done by major Hadoop version.

  • Loading branch information...
1 parent fb237f6 commit 51a3d3351fac0e2a76e16e8c9b3f7ac304511df4 @tomwhite committed Jan 10, 2014
Showing with 26 additions and 52,548 deletions.
  1. +7 −6 README
  2. +0 −5 ch02/src/main/examples/max_temperature_py/0.23.10/input.txt
  3. +0 −2 ch02/src/main/examples/max_temperature_py/0.23.10/output/part-00000
  4. 0 ch02/src/main/examples/max_temperature_py/{2.2.0 → 2}/input.txt
  5. 0 ch02/src/main/examples/max_temperature_py/{2.2.0 → 2}/output/part-00000
  6. +0 −1 ch07/src/main/examples/PartitionByStationUsingMultipleOutputs/0.23.10/input.txt
  7. +0 −2,186 ch07/src/main/examples/PartitionByStationUsingMultipleOutputs/0.23.10/output/029070-99999-r-00000
  8. +0 −2,190 ch07/src/main/examples/PartitionByStationUsingMultipleOutputs/0.23.10/output/029500-99999-r-00000
  9. +0 −2,190 ch07/src/main/examples/PartitionByStationUsingMultipleOutputs/0.23.10/output/029600-99999-r-00000
  10. +0 −2,187 ch07/src/main/examples/PartitionByStationUsingMultipleOutputs/0.23.10/output/029720-99999-r-00000
  11. +0 −2,188 ch07/src/main/examples/PartitionByStationUsingMultipleOutputs/0.23.10/output/029810-99999-r-00000
  12. +0 −2,189 ch07/src/main/examples/PartitionByStationUsingMultipleOutputs/0.23.10/output/227070-99999-r-00000
  13. 0 ch07/src/main/examples/PartitionByStationUsingMultipleOutputs/0.23.10/output/part-r-00000
  14. 0 ch07/src/main/examples/PartitionByStationUsingMultipleOutputs/0.24.0-SNAPSHOT/output/part-r-00000
  15. +0 −2,186 ...xamples/PartitionByStationUsingMultipleOutputs/0.24.0-SNAPSHOT/output/station-02907099999-r-00000
  16. +0 −2,190 ...xamples/PartitionByStationUsingMultipleOutputs/0.24.0-SNAPSHOT/output/station-02950099999-r-00000
  17. +0 −2,190 ...xamples/PartitionByStationUsingMultipleOutputs/0.24.0-SNAPSHOT/output/station-02960099999-r-00000
  18. +0 −2,187 ...xamples/PartitionByStationUsingMultipleOutputs/0.24.0-SNAPSHOT/output/station-02972099999-r-00000
  19. +0 −2,188 ...xamples/PartitionByStationUsingMultipleOutputs/0.24.0-SNAPSHOT/output/station-02981099999-r-00000
  20. +0 −2,189 ...xamples/PartitionByStationUsingMultipleOutputs/0.24.0-SNAPSHOT/output/station-22707099999-r-00000
  21. 0 ch07/src/main/examples/PartitionByStationUsingMultipleOutputs/2.2.0/output/part-r-00000
  22. 0 ch07/src/main/examples/PartitionByStationUsingMultipleOutputs/{2.2.0 → 2}/input.txt
  23. 0 .../src/main/examples/PartitionByStationUsingMultipleOutputs/{2.2.0 → 2}/output/029070-99999-r-00000
  24. 0 .../src/main/examples/PartitionByStationUsingMultipleOutputs/{2.2.0 → 2}/output/029500-99999-r-00000
  25. 0 .../src/main/examples/PartitionByStationUsingMultipleOutputs/{2.2.0 → 2}/output/029600-99999-r-00000
  26. 0 .../src/main/examples/PartitionByStationUsingMultipleOutputs/{2.2.0 → 2}/output/029720-99999-r-00000
  27. 0 .../src/main/examples/PartitionByStationUsingMultipleOutputs/{2.2.0 → 2}/output/029810-99999-r-00000
  28. 0 .../src/main/examples/PartitionByStationUsingMultipleOutputs/{2.2.0 → 2}/output/227070-99999-r-00000
  29. 0 ...ionYearUsingMultipleOutputs/2.2.0 → PartitionByStationUsingMultipleOutputs/2}/output/part-r-00000
  30. +0 −1 ch07/src/main/examples/PartitionByStationYearUsingMultipleOutputs/0.23.10/input.txt
  31. +0 −1,095 ...examples/PartitionByStationYearUsingMultipleOutputs/0.23.10/output/029070-99999/1901/part-r-00000
  32. +0 −1,091 ...examples/PartitionByStationYearUsingMultipleOutputs/0.23.10/output/029070-99999/1902/part-r-00000
  33. +0 −1,095 ...examples/PartitionByStationYearUsingMultipleOutputs/0.23.10/output/029500-99999/1901/part-r-00000
  34. +0 −1,095 ...examples/PartitionByStationYearUsingMultipleOutputs/0.23.10/output/029500-99999/1902/part-r-00000
  35. +0 −1,095 ...examples/PartitionByStationYearUsingMultipleOutputs/0.23.10/output/029600-99999/1901/part-r-00000
  36. +0 −1,095 ...examples/PartitionByStationYearUsingMultipleOutputs/0.23.10/output/029600-99999/1902/part-r-00000
  37. +0 −1,092 ...examples/PartitionByStationYearUsingMultipleOutputs/0.23.10/output/029720-99999/1901/part-r-00000
  38. +0 −1,095 ...examples/PartitionByStationYearUsingMultipleOutputs/0.23.10/output/029720-99999/1902/part-r-00000
  39. +0 −1,094 ...examples/PartitionByStationYearUsingMultipleOutputs/0.23.10/output/029810-99999/1901/part-r-00000
  40. +0 −1,094 ...examples/PartitionByStationYearUsingMultipleOutputs/0.23.10/output/029810-99999/1902/part-r-00000
  41. +0 −1,094 ...examples/PartitionByStationYearUsingMultipleOutputs/0.23.10/output/227070-99999/1901/part-r-00000
  42. +0 −1,095 ...examples/PartitionByStationYearUsingMultipleOutputs/0.23.10/output/227070-99999/1902/part-r-00000
  43. 0 ch07/src/main/examples/PartitionByStationYearUsingMultipleOutputs/0.23.10/output/part-r-00000
  44. +0 −1,095 .../PartitionByStationYearUsingMultipleOutputs/0.24.0-SNAPSHOT/output/029070-99999/1901/part-r-00000
  45. +0 −1,091 .../PartitionByStationYearUsingMultipleOutputs/0.24.0-SNAPSHOT/output/029070-99999/1902/part-r-00000
  46. +0 −1,095 .../PartitionByStationYearUsingMultipleOutputs/0.24.0-SNAPSHOT/output/029500-99999/1901/part-r-00000
  47. +0 −1,095 .../PartitionByStationYearUsingMultipleOutputs/0.24.0-SNAPSHOT/output/029500-99999/1902/part-r-00000
  48. +0 −1,095 .../PartitionByStationYearUsingMultipleOutputs/0.24.0-SNAPSHOT/output/029600-99999/1901/part-r-00000
  49. +0 −1,095 .../PartitionByStationYearUsingMultipleOutputs/0.24.0-SNAPSHOT/output/029600-99999/1902/part-r-00000
  50. +0 −1,092 .../PartitionByStationYearUsingMultipleOutputs/0.24.0-SNAPSHOT/output/029720-99999/1901/part-r-00000
  51. +0 −1,095 .../PartitionByStationYearUsingMultipleOutputs/0.24.0-SNAPSHOT/output/029720-99999/1902/part-r-00000
  52. +0 −1,094 .../PartitionByStationYearUsingMultipleOutputs/0.24.0-SNAPSHOT/output/029810-99999/1901/part-r-00000
  53. +0 −1,094 .../PartitionByStationYearUsingMultipleOutputs/0.24.0-SNAPSHOT/output/029810-99999/1902/part-r-00000
  54. +0 −1,094 .../PartitionByStationYearUsingMultipleOutputs/0.24.0-SNAPSHOT/output/227070-99999/1901/part-r-00000
  55. +0 −1,095 .../PartitionByStationYearUsingMultipleOutputs/0.24.0-SNAPSHOT/output/227070-99999/1902/part-r-00000
  56. 0 ch07/src/main/examples/PartitionByStationYearUsingMultipleOutputs/{2.2.0 → 2}/input.txt
  57. 0 ...ples/PartitionByStationYearUsingMultipleOutputs/{2.2.0 → 2}/output/029070-99999/1901/part-r-00000
  58. 0 ...ples/PartitionByStationYearUsingMultipleOutputs/{2.2.0 → 2}/output/029070-99999/1902/part-r-00000
  59. 0 ...ples/PartitionByStationYearUsingMultipleOutputs/{2.2.0 → 2}/output/029500-99999/1901/part-r-00000
  60. 0 ...ples/PartitionByStationYearUsingMultipleOutputs/{2.2.0 → 2}/output/029500-99999/1902/part-r-00000
  61. 0 ...ples/PartitionByStationYearUsingMultipleOutputs/{2.2.0 → 2}/output/029600-99999/1901/part-r-00000
  62. 0 ...ples/PartitionByStationYearUsingMultipleOutputs/{2.2.0 → 2}/output/029600-99999/1902/part-r-00000
  63. 0 ...ples/PartitionByStationYearUsingMultipleOutputs/{2.2.0 → 2}/output/029720-99999/1901/part-r-00000
  64. 0 ...ples/PartitionByStationYearUsingMultipleOutputs/{2.2.0 → 2}/output/029720-99999/1902/part-r-00000
  65. 0 ...ples/PartitionByStationYearUsingMultipleOutputs/{2.2.0 → 2}/output/029810-99999/1901/part-r-00000
  66. 0 ...ples/PartitionByStationYearUsingMultipleOutputs/{2.2.0 → 2}/output/029810-99999/1902/part-r-00000
  67. 0 ...ples/PartitionByStationYearUsingMultipleOutputs/{2.2.0 → 2}/output/227070-99999/1901/part-r-00000
  68. 0 ...ples/PartitionByStationYearUsingMultipleOutputs/{2.2.0 → 2}/output/227070-99999/1902/part-r-00000
  69. 0 ...ain/examples/PartitionByStationYearUsingMultipleOutputs/{0.24.0-SNAPSHOT → 2}/output/part-r-00000
  70. +0 −1 ch08/src/main/examples/JoinRecordWithStationName/0.23.10/input.txt
  71. +0 −5 ch08/src/main/examples/JoinRecordWithStationName/0.23.10/output/part-r-00000
  72. +0 −5 ch08/src/main/examples/JoinRecordWithStationName/0.24.0-SNAPSHOT/output/part-r-00000
  73. 0 ch08/src/main/examples/JoinRecordWithStationName/{2.2.0 → 2}/input.txt
  74. 0 ch08/src/main/examples/JoinRecordWithStationName/{2.2.0 → 2}/output/part-r-00000
  75. +19 −2 snippet/src/test/java/ExamplesIT.java
View
13 README
@@ -27,19 +27,20 @@ Then you can build the code with:
% mvn package -DskipTests
-By default Hadoop 1.2.1 is used. This can be changed by specifying the hadoop.version
-property, e.g.
+By default Hadoop 1.2.1 is used. This can be changed by specifying the
+hadoop.version property, e.g.
% mvn package -DskipTests -Dhadoop.version=1.2.0
-There are also profiles for different Hadoop major versions,
-specified in hadoop-meta/pom.xml. For example, to use Hadoop 2:
+There are profiles for different Hadoop major versions and distributions,
+specified in hadoop-meta/pom.xml, and they are specified using the hadoop.distro
+property. For example, to use the default version of Hadoop 2:
-% mvn package -DskipTests -P apache-2
+% mvn package -DskipTests -Dhadoop.distro=apache-2
Again, you can specify hadoop.version to use a particular Hadoop 2 version:
-% mvn package -DskipTests -P apache-2 -Dhadoop.version=2.1.1-beta
+% mvn package -DskipTests -Dhadoop.distro=apache-2 -Dhadoop.version=2.1.1-beta
You should then be able to run the examples from the book.
View
5 ch02/src/main/examples/max_temperature_py/0.23.10/input.txt
@@ -1,5 +0,0 @@
-hadoop jar $HADOOP_HOME/share/hadoop/tools/lib/hadoop-streaming-*.jar \
- -input input/ncdc/sample.txt \
- -output output \
- -mapper ch02/src/main/python/max_temperature_map.py \
- -reducer ch02/src/main/python/max_temperature_reduce.py
View
2 ch02/src/main/examples/max_temperature_py/0.23.10/output/part-00000
@@ -1,2 +0,0 @@
-1949 111
-1950 22
View
0 ...amples/max_temperature_py/2.2.0/input.txt → ...n/examples/max_temperature_py/2/input.txt
File renamed without changes.
View
0 ...ax_temperature_py/2.2.0/output/part-00000 → ...es/max_temperature_py/2/output/part-00000
File renamed without changes.
View
1 ch07/src/main/examples/PartitionByStationUsingMultipleOutputs/0.23.10/input.txt
@@ -1 +0,0 @@
-hadoop PartitionByStationUsingMultipleOutputs "input/ncdc/all/190{1,2}.gz" output
View
2,186 .../main/examples/PartitionByStationUsingMultipleOutputs/0.23.10/output/029070-99999-r-00000
0 additions, 2,186 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
2,190 .../main/examples/PartitionByStationUsingMultipleOutputs/0.23.10/output/029500-99999-r-00000
0 additions, 2,190 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
2,190 .../main/examples/PartitionByStationUsingMultipleOutputs/0.23.10/output/029600-99999-r-00000
0 additions, 2,190 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
2,187 .../main/examples/PartitionByStationUsingMultipleOutputs/0.23.10/output/029720-99999-r-00000
0 additions, 2,187 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
2,188 .../main/examples/PartitionByStationUsingMultipleOutputs/0.23.10/output/029810-99999-r-00000
0 additions, 2,188 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
2,189 .../main/examples/PartitionByStationUsingMultipleOutputs/0.23.10/output/227070-99999-r-00000
0 additions, 2,189 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
0 ch07/src/main/examples/PartitionByStationUsingMultipleOutputs/0.23.10/output/part-r-00000
No changes.
View
0 .../main/examples/PartitionByStationUsingMultipleOutputs/0.24.0-SNAPSHOT/output/part-r-00000
No changes.
View
2,186 ...PartitionByStationUsingMultipleOutputs/0.24.0-SNAPSHOT/output/station-02907099999-r-00000
0 additions, 2,186 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
2,190 ...PartitionByStationUsingMultipleOutputs/0.24.0-SNAPSHOT/output/station-02950099999-r-00000
0 additions, 2,190 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
2,190 ...PartitionByStationUsingMultipleOutputs/0.24.0-SNAPSHOT/output/station-02960099999-r-00000
0 additions, 2,190 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
2,187 ...PartitionByStationUsingMultipleOutputs/0.24.0-SNAPSHOT/output/station-02972099999-r-00000
0 additions, 2,187 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
2,188 ...PartitionByStationUsingMultipleOutputs/0.24.0-SNAPSHOT/output/station-02981099999-r-00000
0 additions, 2,188 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
2,189 ...PartitionByStationUsingMultipleOutputs/0.24.0-SNAPSHOT/output/station-22707099999-r-00000
0 additions, 2,189 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
0 ch07/src/main/examples/PartitionByStationUsingMultipleOutputs/2.2.0/output/part-r-00000
No changes.
View
0 ...ationUsingMultipleOutputs/2.2.0/input.txt → ...ByStationUsingMultipleOutputs/2/input.txt
File renamed without changes.
View
0 ...Outputs/2.2.0/output/029070-99999-r-00000 → ...ipleOutputs/2/output/029070-99999-r-00000
File renamed without changes.
View
0 ...Outputs/2.2.0/output/029500-99999-r-00000 → ...ipleOutputs/2/output/029500-99999-r-00000
File renamed without changes.
View
0 ...Outputs/2.2.0/output/029600-99999-r-00000 → ...ipleOutputs/2/output/029600-99999-r-00000
File renamed without changes.
View
0 ...Outputs/2.2.0/output/029720-99999-r-00000 → ...ipleOutputs/2/output/029720-99999-r-00000
File renamed without changes.
View
0 ...Outputs/2.2.0/output/029810-99999-r-00000 → ...ipleOutputs/2/output/029810-99999-r-00000
File renamed without changes.
View
0 ...Outputs/2.2.0/output/227070-99999-r-00000 → ...ipleOutputs/2/output/227070-99999-r-00000
File renamed without changes.
View
0 ...MultipleOutputs/2.2.0/output/part-r-00000 → ...singMultipleOutputs/2/output/part-r-00000
File renamed without changes.
View
1 ch07/src/main/examples/PartitionByStationYearUsingMultipleOutputs/0.23.10/input.txt
@@ -1 +0,0 @@
-hadoop PartitionByStationYearUsingMultipleOutputs "input/ncdc/all/190{1,2}.gz" output
View
1,095 .../PartitionByStationYearUsingMultipleOutputs/0.23.10/output/029070-99999/1901/part-r-00000
0 additions, 1,095 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1,091 .../PartitionByStationYearUsingMultipleOutputs/0.23.10/output/029070-99999/1902/part-r-00000
0 additions, 1,091 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1,095 .../PartitionByStationYearUsingMultipleOutputs/0.23.10/output/029500-99999/1901/part-r-00000
0 additions, 1,095 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1,095 .../PartitionByStationYearUsingMultipleOutputs/0.23.10/output/029500-99999/1902/part-r-00000
0 additions, 1,095 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1,095 .../PartitionByStationYearUsingMultipleOutputs/0.23.10/output/029600-99999/1901/part-r-00000
0 additions, 1,095 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1,095 .../PartitionByStationYearUsingMultipleOutputs/0.23.10/output/029600-99999/1902/part-r-00000
0 additions, 1,095 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1,092 .../PartitionByStationYearUsingMultipleOutputs/0.23.10/output/029720-99999/1901/part-r-00000
0 additions, 1,092 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1,095 .../PartitionByStationYearUsingMultipleOutputs/0.23.10/output/029720-99999/1902/part-r-00000
0 additions, 1,095 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1,094 .../PartitionByStationYearUsingMultipleOutputs/0.23.10/output/029810-99999/1901/part-r-00000
0 additions, 1,094 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1,094 .../PartitionByStationYearUsingMultipleOutputs/0.23.10/output/029810-99999/1902/part-r-00000
0 additions, 1,094 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1,094 .../PartitionByStationYearUsingMultipleOutputs/0.23.10/output/227070-99999/1901/part-r-00000
0 additions, 1,094 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1,095 .../PartitionByStationYearUsingMultipleOutputs/0.23.10/output/227070-99999/1902/part-r-00000
0 additions, 1,095 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
0 .../src/main/examples/PartitionByStationYearUsingMultipleOutputs/0.23.10/output/part-r-00000
No changes.
View
1,095 ...onByStationYearUsingMultipleOutputs/0.24.0-SNAPSHOT/output/029070-99999/1901/part-r-00000
0 additions, 1,095 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1,091 ...onByStationYearUsingMultipleOutputs/0.24.0-SNAPSHOT/output/029070-99999/1902/part-r-00000
0 additions, 1,091 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1,095 ...onByStationYearUsingMultipleOutputs/0.24.0-SNAPSHOT/output/029500-99999/1901/part-r-00000
0 additions, 1,095 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1,095 ...onByStationYearUsingMultipleOutputs/0.24.0-SNAPSHOT/output/029500-99999/1902/part-r-00000
0 additions, 1,095 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1,095 ...onByStationYearUsingMultipleOutputs/0.24.0-SNAPSHOT/output/029600-99999/1901/part-r-00000
0 additions, 1,095 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1,095 ...onByStationYearUsingMultipleOutputs/0.24.0-SNAPSHOT/output/029600-99999/1902/part-r-00000
0 additions, 1,095 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1,092 ...onByStationYearUsingMultipleOutputs/0.24.0-SNAPSHOT/output/029720-99999/1901/part-r-00000
0 additions, 1,092 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1,095 ...onByStationYearUsingMultipleOutputs/0.24.0-SNAPSHOT/output/029720-99999/1902/part-r-00000
0 additions, 1,095 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1,094 ...onByStationYearUsingMultipleOutputs/0.24.0-SNAPSHOT/output/029810-99999/1901/part-r-00000
0 additions, 1,094 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1,094 ...onByStationYearUsingMultipleOutputs/0.24.0-SNAPSHOT/output/029810-99999/1902/part-r-00000
0 additions, 1,094 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1,094 ...onByStationYearUsingMultipleOutputs/0.24.0-SNAPSHOT/output/227070-99999/1901/part-r-00000
0 additions, 1,094 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1,095 ...onByStationYearUsingMultipleOutputs/0.24.0-SNAPSHOT/output/227070-99999/1902/part-r-00000
0 additions, 1,095 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
0 ...nYearUsingMultipleOutputs/2.2.0/input.txt → ...ationYearUsingMultipleOutputs/2/input.txt
File renamed without changes.
View
0 ...2.0/output/029070-99999/1901/part-r-00000 → ...s/2/output/029070-99999/1901/part-r-00000
File renamed without changes.
View
0 ...2.0/output/029070-99999/1902/part-r-00000 → ...s/2/output/029070-99999/1902/part-r-00000
File renamed without changes.
View
0 ...2.0/output/029500-99999/1901/part-r-00000 → ...s/2/output/029500-99999/1901/part-r-00000
File renamed without changes.
View
0 ...2.0/output/029500-99999/1902/part-r-00000 → ...s/2/output/029500-99999/1902/part-r-00000
File renamed without changes.
View
0 ...2.0/output/029600-99999/1901/part-r-00000 → ...s/2/output/029600-99999/1901/part-r-00000
File renamed without changes.
View
0 ...2.0/output/029600-99999/1902/part-r-00000 → ...s/2/output/029600-99999/1902/part-r-00000
File renamed without changes.
View
0 ...2.0/output/029720-99999/1901/part-r-00000 → ...s/2/output/029720-99999/1901/part-r-00000
File renamed without changes.
View
0 ...2.0/output/029720-99999/1902/part-r-00000 → ...s/2/output/029720-99999/1902/part-r-00000
File renamed without changes.
View
0 ...2.0/output/029810-99999/1901/part-r-00000 → ...s/2/output/029810-99999/1901/part-r-00000
File renamed without changes.
View
0 ...2.0/output/029810-99999/1902/part-r-00000 → ...s/2/output/029810-99999/1902/part-r-00000
File renamed without changes.
View
0 ...2.0/output/227070-99999/1901/part-r-00000 → ...s/2/output/227070-99999/1901/part-r-00000
File renamed without changes.
View
0 ...2.0/output/227070-99999/1902/part-r-00000 → ...s/2/output/227070-99999/1902/part-r-00000
File renamed without changes.
View
0 ...tputs/0.24.0-SNAPSHOT/output/part-r-00000 → ...singMultipleOutputs/2/output/part-r-00000 100755 → 100644
File renamed without changes.
View
1 ch08/src/main/examples/JoinRecordWithStationName/0.23.10/input.txt
@@ -1 +0,0 @@
-hadoop JoinRecordWithStationName input/ncdc/sample.txt input/ncdc/metadata/stations-fixed-width.txt output
View
5 ch08/src/main/examples/JoinRecordWithStationName/0.23.10/output/part-r-00000
@@ -1,5 +0,0 @@
-011990-99999 SIHCCAJAVRI 0043011990999991950051518004+68750+023550FM-12+038299999V0203201N00261220001CN9999999N9-00111+99999999999
-011990-99999 SIHCCAJAVRI 0043011990999991950051512004+68750+023550FM-12+038299999V0203201N00671220001CN9999999N9+00221+99999999999
-011990-99999 SIHCCAJAVRI 0067011990999991950051507004+68750+023550FM-12+038299999V0203301N00671220001CN9999999N9+00001+99999999999
-012650-99999 TYNSET-HANSMOEN 0043012650999991949032418004+62300+010750FM-12+048599999V0202701N00461220001CN0500001N9+00781+99999999999
-012650-99999 TYNSET-HANSMOEN 0043012650999991949032412004+62300+010750FM-12+048599999V0202701N00461220001CN0500001N9+01111+99999999999
View
5 ch08/src/main/examples/JoinRecordWithStationName/0.24.0-SNAPSHOT/output/part-r-00000
@@ -1,5 +0,0 @@
-011990-99999 SIHCCAJAVRI 0043011990999991950051518004+68750+023550FM-12+038299999V0203201N00261220001CN9999999N9-00111+99999999999
-011990-99999 SIHCCAJAVRI 0043011990999991950051512004+68750+023550FM-12+038299999V0203201N00671220001CN9999999N9+00221+99999999999
-011990-99999 SIHCCAJAVRI 0067011990999991950051507004+68750+023550FM-12+038299999V0203301N00671220001CN9999999N9+00001+99999999999
-012650-99999 TYNSET-HANSMOEN 0043012650999991949032418004+62300+010750FM-12+048599999V0202701N00461220001CN0500001N9+00781+99999999999
-012650-99999 TYNSET-HANSMOEN 0043012650999991949032412004+62300+010750FM-12+048599999V0202701N00461220001CN0500001N9+01111+99999999999
View
0 ...JoinRecordWithStationName/2.2.0/input.txt → ...les/JoinRecordWithStationName/2/input.txt
File renamed without changes.
View
0 ...WithStationName/2.2.0/output/part-r-00000 → ...cordWithStationName/2/output/part-r-00000
File renamed without changes.
View
21 snippet/src/test/java/ExamplesIT.java
@@ -92,6 +92,7 @@
private File actualOutputDir = new File(PROJECT_BASE_DIR, "output");
private static Map<String, String> env;
private static String version;
+ private static String majorVersion;
private static String mode;
public ExamplesIT(File example) {
@@ -125,7 +126,20 @@ public static void setUpClass() throws IOException {
}
assertNotNull("Version not found", version);
System.out.printf("version=%s\n", version);
-
+
+ majorVersion = version.substring(0, version.indexOf('.'));
+ // Treat 0.2x as Hadoop 1 or 2 for the purposes of these tests
+ if ("0".equals(majorVersion)) {
+ if (version.startsWith("0.20")) {
+ majorVersion = "1";
+ } else if (version.startsWith("0.21") || version.startsWith("0.22") ||
+ version.startsWith("0.23")) {
+ majorVersion = "2";
+ }
+ }
+ assertNotNull("Major version not found", majorVersion);
+ System.out.printf("majorVersion=%s\n", majorVersion);
+
}
@Before
@@ -184,10 +198,13 @@ public void test() throws Exception {
}
private File findBaseExampleDirectory(File example) {
- // Look in base/<version>/<mode> then base/<version> then base/<mode>
+ // Look in base/<version>/<mode> then base/<version> then base/<major-version>/<mode>
+ // then base/<major-version> then base/<mode>
File[] candidates = {
new File(new File(example, version), mode),
new File(example, version),
+ new File(new File(example, majorVersion), mode),
+ new File(example, majorVersion),
new File(example, mode),
};
for (File candidate : candidates) {

0 comments on commit 51a3d33

Please sign in to comment.
Something went wrong with that request. Please try again.