Skip to content

Commit a5aba43

Browse files
author
Thomas Weise
committed
Added Second Hadoop Example + Improved Hadoop Examples Documentation
I added a "Web Finder" example for finding relationships between websites. I also improved the Hadoop examples documentation slightly.
1 parent 2469fc4 commit a5aba43

File tree

19 files changed

+948
-30
lines changed

19 files changed

+948
-30
lines changed

.gitignore

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,14 @@ mpi/structScatter.exe
219219

220220
## Hadoop
221221
### word count example
222-
/hadoop/wwordCount/target/
223-
/hadoop/wwordCount/temp/
224-
/hadoop/wwordCount/tmp/
225-
/hadoop/wwordCount/bin/
226-
/hadoop/wwordCount/.classpath
222+
/hadoop/wordCount/target/
223+
/hadoop/wordCount/temp/
224+
/hadoop/wordCount/tmp/
225+
/hadoop/wordCount/bin/
226+
/hadoop/wordCount/.classpath
227+
### web finder example
228+
/hadoop/webFinder/target/
229+
/hadoop/webFinder/temp/
230+
/hadoop/webFinder/tmp/
231+
/hadoop/webFinder/bin/
232+
/hadoop/webFinder/.classpath

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ We then discuss [Web Services](https://en.wikipedia.org/wiki/Web_service). Web s
6565

6666
The second-to-last tier of our lecture focuses on how the computing power of massive clusters can be utilized for large-scale scientific and engineering computations. Obviously, Web Services, Java Servlets, or even just Java and the HTTP protocol, would be the wrong technologies for that: For large-scale computations, we want to get as efficient as possible with as little overhead as possible. We want to exchange primitive data types efficiently and we want to use communication paradigms not supported by HTTP/TCP, such as broadcasts, multicasts, and asynchronous communication. For this, an implementation of the Message Passing Interface ([MPI](https://en.wikipedia.org/wiki/Message_Passing_Interface)) would be the method of choice. We explore this technology based on [several examples](http://github.com/thomasWeise/distributedComputingExamples/tree/master/mpi/) in the C programming language.
6767

68-
In a final step we then combine discuss a technology which combines the ability to create large-scale distributed computations (from the MPI world) with the rich tool support of the Java ecosystem: [Apache](http://hadoop.apache.org/) [Hadoop](https://en.wikipedia.org/wiki/Apache_Hadoop). The [Hadoop examples](http://github.com/thomasWeise/distributedComputingExamples/tree/master/hadoop/) focus on the [MapReduce](https://en.wikipedia.org/wiki/MapReduce) pattern (which is a bit similar to scatter/gather/reduce in MPI).
68+
In a final step we then combine discuss a technology which combines the ability to create large-scale distributed computations (from the MPI world) with the rich tool support of the Java ecosystem: [Apache](http://hadoop.apache.org/) [Hadoop](https://en.wikipedia.org/wiki/Apache_Hadoop). The [Hadoop examples](http://github.com/thomasWeise/distributedComputingExamples/tree/master/hadoop/) focus on the [MapReduce](https://en.wikipedia.org/wiki/MapReduce) pattern (which is a tiny little bit similar to scatter/gather/reduce in MPI).
6969

7070
All in all, this course will give you a rough understanding of the dominant technologies in different fields of distributed computing, from dynamic websites over company-internal distributed application systems, to distributed engineering and scientific computations. Each field is explored with hands-on examples and you get to test and play with several example technologies.
7171

hadoop/README.md

Lines changed: 116 additions & 13 deletions
Large diffs are not rendered by default.

hadoop/make_linux.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ echo "We now build all the Hadoop examples."
1212
cd "$currentDir/wordCount"
1313
"$currentDir/wordCount/make_linux.sh"
1414

15+
cd "$currentDir/webFinder"
16+
"$currentDir/webFinder/make_linux.sh"
17+
1518
echo "Successfully finished building the Hadoop examples."

hadoop/webFinder/.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Java
2+
*.class
3+
4+
# Mobile Tools for Java (J2ME)
5+
.mtj.tmp/
6+
7+
# Package Files #
8+
*.jar
9+
*.war
10+
*.ear
11+
12+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
13+
hs_err_pid*
14+
/target/
15+
16+
# other files, potentially created by build tools
17+
/.classpath
18+
/bin
19+
/classes
20+
/build
21+
/temp
22+
/tmp
23+
/out
24+
/.gradle
25+
/dependency-reduced-pom.xml

hadoop/webFinder/.project

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>webFinder</name>
4+
<comment>The page speed example for finding interconnections between websites using Hadoop's map reduce.</comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.m2e.core.maven2Builder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
</buildSpec>
19+
<natures>
20+
<nature>org.eclipse.jdt.core.javanature</nature>
21+
<nature>org.eclipse.m2e.core.maven2Nature</nature>
22+
</natures>
23+
</projectDescription>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
eclipse.preferences.version=1
2+
encoding//src/main/java=UTF-8
3+
encoding//src/main/resources=UTF-8
4+
encoding//src/test/java=UTF-8
5+
encoding//src/test/resources=UTF-8
6+
encoding/<project>=UTF-8
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
3+
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
4+
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
5+
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
6+
org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
7+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
8+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
9+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
10+
org.eclipse.jdt.core.compiler.compliance=1.7
11+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
12+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
13+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
14+
org.eclipse.jdt.core.compiler.doc.comment.support=disabled
15+
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
16+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
17+
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
18+
org.eclipse.jdt.core.compiler.problem.comparingIdentical=ignore
19+
org.eclipse.jdt.core.compiler.problem.deadCode=ignore
20+
org.eclipse.jdt.core.compiler.problem.deprecation=ignore
21+
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
22+
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
23+
org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore
24+
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
25+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
26+
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
27+
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
28+
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
29+
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
30+
org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore
31+
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=ignore
32+
org.eclipse.jdt.core.compiler.problem.forbiddenReference=ignore
33+
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=ignore
34+
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=enabled
35+
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=ignore
36+
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
37+
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
38+
org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error
39+
org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
40+
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
41+
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
42+
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
43+
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
44+
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=ignore
45+
org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
46+
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
47+
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
48+
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
49+
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error
50+
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
51+
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=private
52+
org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
53+
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error
54+
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
55+
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
56+
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
57+
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
58+
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
59+
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
60+
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
61+
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=ignore
62+
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=ignore
63+
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
64+
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
65+
org.eclipse.jdt.core.compiler.problem.nullReference=ignore
66+
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
67+
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=error
68+
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=ignore
69+
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
70+
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
71+
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
72+
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
73+
org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
74+
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=error
75+
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
76+
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
77+
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
78+
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
79+
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
80+
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=enabled
81+
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=ignore
82+
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
83+
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
84+
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
85+
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=ignore
86+
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
87+
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore
88+
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
89+
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
90+
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
91+
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
92+
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
93+
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
94+
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
95+
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
96+
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
97+
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
98+
org.eclipse.jdt.core.compiler.problem.unusedImport=ignore
99+
org.eclipse.jdt.core.compiler.problem.unusedLabel=ignore
100+
org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore
101+
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
102+
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
103+
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
104+
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
105+
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
106+
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore
107+
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
108+
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=ignore
109+
org.eclipse.jdt.core.compiler.source=1.7

hadoop/webFinder/input/urlList.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
http://www.bing.com
2+
http://www.tudou.com
3+
http://www.youku.com
4+
http://www.qq.com
5+
http://www.baidu.com
6+
http://www.sogou.com

hadoop/webFinder/make_linux.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
# strict error handling
4+
set -o pipefail # trace ERR through pipes
5+
set -o errtrace # trace ERR through 'time command' and other functions
6+
set -o nounset # set -u : exit the script if you try to use an uninitialised variable
7+
set -o errexit # set -e : exit the script if any statement returns a non-true return value
8+
9+
echo "We now build the Web Finder Hadoop example."
10+
11+
rm -rf target
12+
mvn clean compile package
13+
rm -rf target/generated-sources
14+
rm -rf target/maven-archiver
15+
rm -rf target/maven-status
16+
17+
echo "Successfully finished building the Web Finder Hadoop example."

0 commit comments

Comments
 (0)