This is an automated email from the ASF dual-hosted git repository.
zkaoudi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-wayang-website.git
The following commit(s) were added to refs/heads/main by this push:
new c6bc7ea4 Add how to build and run WordCount to usage-examples (#33)
c6bc7ea4 is described below
commit c6bc7ea4ca8b55deffcac021faaf517cc6eacfce
Author: Juri Petersen <[email protected]>
AuthorDate: Wed Jan 31 11:29:30 2024 +0100
Add how to build and run WordCount to usage-examples (#33)
* Add how to build and run WordCount to usage-examples
* Remove placeholder for further examples
* Move guide to installation.md
---
docs/guide/installation.md | 52 ++++++++++++++++++++++++++++++++++++++++++--
docs/guide/usage-examples.md | 6 -----
2 files changed, 50 insertions(+), 8 deletions(-)
diff --git a/docs/guide/installation.md b/docs/guide/installation.md
index ab2811cd..b151434b 100644
--- a/docs/guide/installation.md
+++ b/docs/guide/installation.md
@@ -22,6 +22,55 @@ id: installation
limitations under the License.
-->
+# Installing and building Apache Wayang
+
+## Clone repository
+```shell
+git clone https://github.com/apache/incubator-wayang.git
+```
+
+## Create binaries
+Running following commands to build Wayang and generate the tar.gz
+```shell
+cd incubator-wayang
+./mvnw clean package -pl :wayang-assembly -Pdistribution
+```
+Then you can find the `wayang-assembly-0.7.1-SNAPSHOT-dist.tar.gz` under
`wayang-assembly/target` directory.
+
+
+## Prepare the environment
+### Wayang
+```shell
+tar -xvf wayang-assembly-0.7.1-SNAPSHOT-dist.tar.gz
+cd wayang-0.7.1-SNAPSHOT
+```
+
+In linux
+```shell
+echo "export WAYANG_HOME=$(pwd)" >> ~/.bashrc
+echo "export PATH=${PATH}:${WAYANG_HOME}/bin" >> ~/.bashrc
+source ~/.bashrc
+```
+In MacOS
+```shell
+echo "export WAYANG_HOME=$(pwd)" >> ~/.zshrc
+echo "export PATH=${PATH}:${WAYANG_HOME}/bin" >> ~/.zshrc
+source ~/.zshrc
+```
+### Others
+- You need to install Apache Spark version 3 or higher. Don’t forget to set
the `SPARK_HOME` environment variable.
+- You need to install Apache Hadoop version 3 or higher. Don’t forget to set
the `HADOOP_HOME` environment variable.
+
+## Run the program
+
+To execute the WordCount example with Apache Wayang, you need to execute your
program with the 'wayang-submit' command:
+
+```shell
+cd wayang-0.7.1-SNAPSHOT
+./bin/wayang-submit org.apache.wayang.apps.wordcount.Main java
file://$(pwd)/README.md
+```
+Then you should be able to see the output of the Wordcount example.
+
# Compiling Apache Wayang
Apache Wayang (incubating) has different dependencies, for compiling, it needs
to add some profile in the compilation to enable maven works properly.
@@ -42,11 +91,10 @@ The modules are:
- wayang-profiler
- wayang-tests-integration
-
# Executing Coverage
```shell
mvn clean verify jacoco:report
```
-the final report is placed on `./target/aggregate.exec/aggregate.exec`
\ No newline at end of file
+the final report is placed on `./target/aggregate.exec/aggregate.exec`
diff --git a/docs/guide/usage-examples.md b/docs/guide/usage-examples.md
index 8aa6ce63..096bef2f 100644
--- a/docs/guide/usage-examples.md
+++ b/docs/guide/usage-examples.md
@@ -219,9 +219,3 @@ public class OrtMLModel {
}
}
```
-
-## Example 2: [Title]
-- Description of the task
-- Step-by-step guide
-
-... more examples ...