Skip to content

Commit ebe526b

Browse files
Merge branch 'main' into jdbc-join-operator
2 parents 56b9bc2 + f6d2aa9 commit ebe526b

120 files changed

Lines changed: 9571 additions & 187 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/documentation.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,5 @@ jobs:
5555
key: ${{ runner.os }}-maven
5656
- name: Generate the documentation
5757
run: |
58-
./mvnw clean gem:exec@bundle-install gem:exec@generate-documentation gem:exec@generate-documentation-as-latest site -pl wayang-docs -Pweb-documentation
58+
./mvnw clean install -DskipTests
59+
./mvnw gem:exec@bundle-install gem:exec@generate-documentation gem:exec@generate-documentation-as-latest site -pl wayang-docs -Pweb-documentation

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ pom.xml.*
3434

3535
# Scala Plugin for VSCode
3636
.metals
37+
.bloop/

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ Apache Wayang aims at freeing data engineers and software developers from the bu
5555
- [Apache Spark](https://spark.apache.org/)
5656
- [Apache Flink](https://flink.apache.org/)
5757
- [Apache Giraph](https://giraph.apache.org/)
58-
- [GraphChi](https://github.com/GraphChi/graphchi-java)
5958
- [Postgres](http://www.postgresql.org)
6059
- [SQLite](https://www.sqlite.org/)
6160
- [Apache Kafka](https://kafka.apache.org)
@@ -101,13 +100,13 @@ tar -xvf wayang-1.0.1-SNAPSHOT.tar.gz
101100
cd wayang-1.0.1-SNAPSHOT
102101
```
103102

104-
In linux
103+
In Linux
105104
```shell
106105
echo "export WAYANG_HOME=$(pwd)" >> ~/.bashrc
107106
echo "export PATH=${PATH}:${WAYANG_HOME}/bin" >> ~/.bashrc
108107
source ~/.bashrc
109108
```
110-
In MacOS
109+
In macOS
111110
```shell
112111
echo "export WAYANG_HOME=$(pwd)" >> ~/.zshrc
113112
echo "export PATH=${PATH}:${WAYANG_HOME}/bin" >> ~/.zshrc
@@ -193,7 +192,7 @@ Spark 3.4.4, Compatible with Scala 2.12.
193192
Maven
194193
```
195194

196-
> **NOTE:** In windows, you need to define the variable `HADOOP_HOME` with the winutils.exe, an not official option to obtain [this repository](https://github.com/steveloughran/winutils), or you can generate your winutils.exe following the instructions in the repository. Also, you may need to install [msvcr100.dll](https://www.microsoft.com/en-us/download/details.aspx?id=26999)
195+
>**NOTE:** In Windows, you need to define the variable `HADOOP_HOME` with the winutils.exe. An unofficial option to obtain it is from [this repository](https://github.com/steveloughran/winutils), or you can generate your winutils.exe following the instructions in the repository. Also, you may need to install [msvcr100.dll](https://www.microsoft.com/en-us/download/details.aspx?id=26999)
197196
198197
> **NOTE:** Make sure that the JAVA_HOME environment variable is set correctly to Java 17 as the prerequisite checker script currently supports up to Java 17 and checks the latest version of Java if you have higher version installed. In Linux, it is preferably to use the export JAVA_HOME method inside the project folder. It is also recommended running './mvnw clean install' before opening the project using IntelliJ.
199198

guides/windows-setup.md

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
<!--
2+
Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing,
13+
software distributed under the License is distributed on an
14+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
KIND, either express or implied. See the License for the
16+
specific language governing permissions and limitations
17+
under the License.
18+
-->
19+
20+
# Running Apache Wayang on Windows
21+
22+
This guide helps Windows users successfully build and run Apache Wayang.
23+
24+
Many users encounter issues related to Hadoop, winutils, and environment variables.
25+
Follow these steps carefully.
26+
27+
---
28+
29+
## 1. Install Java 17
30+
31+
Download and install:
32+
33+
https://adoptium.net/
34+
35+
After installation verify:
36+
java -version
37+
38+
---
39+
40+
## 2. Install Maven
41+
42+
Download:
43+
44+
https://maven.apache.org/download.cgi
45+
46+
Extract and add Maven `/bin` to your **System PATH**.
47+
48+
Verify:
49+
mvn -version
50+
51+
---
52+
53+
## 3. Install Hadoop winutils
54+
55+
Wayang requires Hadoop utilities on Windows.
56+
57+
### Download winutils
58+
59+
Download from:
60+
61+
https://github.com/steveloughran/winutils
62+
63+
Choose a version matching Hadoop 3.x.
64+
65+
### Setup
66+
67+
Create directory: C:\hadoop\bin
68+
69+
Place: winutils.exe
70+
71+
inside `bin`.
72+
73+
---
74+
75+
## 4. Set Environment Variables
76+
77+
Open:
78+
79+
**System Properties → Environment Variables**
80+
81+
### Add:
82+
83+
#### HADOOP_HOME
84+
C:\hadoop
85+
86+
#### Add to PATH
87+
C:\hadoop\bin
88+
89+
Restart terminal after saving.
90+
91+
---
92+
93+
## 5. Verify Hadoop setup
94+
95+
Run:
96+
winutils.exe ls
97+
98+
99+
If no error appears → setup is correct.
100+
101+
---
102+
103+
## 6. Build Wayang
104+
105+
From project root:
106+
./mvnw clean install -DskipTests
107+
108+
---
109+
110+
## 7. Common Issues
111+
112+
### ❌ winutils.exe not found
113+
Ensure:
114+
115+
• file exists in `C:\hadoop\bin`
116+
• PATH includes the bin folder
117+
118+
### ❌ HADOOP_HOME not set
119+
Verify environment variable.
120+
121+
### ❌ Access denied errors
122+
Run terminal as Administrator.
123+
124+
---
125+
126+
## 8. Notes
127+
128+
• Windows support requires winutils.
129+
• WSL (Windows Subsystem for Linux) can be used as an alternative.
130+
131+
---
132+
133+
You are now ready to run Apache Wayang on Windows.
134+

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
<scala.version>2.12.17</scala.version>
9797
<scala.mayor.version>2.12</scala.mayor.version>
9898
<spark.version>3.4.4</spark.version>
99+
<sedona.version>1.6.1</sedona.version>
99100
<flink.version>1.20.0</flink.version>
100101
<calcite.version>1.39.0</calcite.version>
101102

python/src/pywy/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
# we support python 3.11
1919
numpy==1.24.0
2020
cloudpickle==3.1.2
21-
pytest==8.3.5
22-
requests==2.32.4
21+
pytest==9.0.3
22+
requests==2.33.0

python/src/pywy/tests/resources/sample_data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ The list of [contributors](https://github.com/apache/incubator-wayang/graphs/con
246246
## License
247247
All files in this repository are licensed under the Apache Software License 2.0
248248

249-
Copyright 2020 - 2025 The Apache Software Foundation.
249+
Copyright 2020 - 2026 The Apache Software Foundation.
250250

251251
Licensed under the Apache License, Version 2.0 (the "License");
252252
you may not use this file except in compliance with the License.

python/src/pywy/tests/test_word_count.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def config(pytestconfig):
5555

5656

5757
# TODO: implement tuple types support
58-
@pytest.mark.skip(reason="missing implementation for tuple types in operators")
58+
# @pytest.mark.skip(reason="missing implementation for tuple types in operators")
5959
def test_wordcount(config):
6060
with resources.path(resources_folder, "sample_data.md") as resource_path, \
6161
resources.path(resources_folder, "wordcount_out_python.txt") as output_path, \

python/src/pywy/types.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# limitations under the License.
1616
#
1717

18+
import collections
1819
import re
1920

2021
from inspect import signature
@@ -175,7 +176,7 @@ def get_type_flatmap_function(call: FlatmapFunction) -> (type, type):
175176
)
176177
)
177178

178-
if type(sig.return_annotation) != type(Iterable):
179+
if get_origin(sig.return_annotation) is not collections.abc.Iterable:
179180
raise PywyException(
180181
"the return for the FlatmapFunction is not Iterable, {}".format(
181182
str(sig.return_annotation)
@@ -196,11 +197,15 @@ def typecheck(input_type: Type[ConstrainedOperatorType]):
196197

197198
if isinstance(input_type, List) and args:
198199
typecheck(args[0])
199-
elif isinstance(input_type, Tuple):
200+
elif get_origin(input_type) is tuple:
200201
if all(arg in allowed_types for arg in args):
201202
return
202203
else:
203204
raise TypeError(f"Unsupported Operator type: {input_type}")
205+
elif isinstance(input_type,tuple):
206+
for arg in input_type:
207+
typecheck(arg)
208+
return
204209
else:
205210
raise TypeError(f"Unsupported Operator type: {input_type}, {origin}, {args}")
206211

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<!--
2+
- Licensed to the Apache Software Foundation (ASF) under one
3+
- or more contributor license agreements. See the NOTICE file
4+
- distributed with this work for additional information
5+
- regarding copyright ownership. The ASF licenses this file
6+
- to you under the Apache License, Version 2.0 (the
7+
- "License"); you may not use this file except in compliance
8+
- with the License. You may obtain a copy of the License at
9+
-
10+
- http://www.apache.org/licenses/LICENSE-2.0
11+
-
12+
- Unless required by applicable law or agreed to in writing,
13+
- software distributed under the License is distributed on an
14+
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
- KIND, either express or implied. See the License for the
16+
- specific language governing permissions and limitations
17+
- under the License.
18+
-->
19+
20+
# Wayang JSON REST API
21+
22+
## Getting Started
23+
24+
### 1. Package the Project
25+
26+
```bash
27+
./mvnw clean package -pl :wayang-assembly -Pdistribution
28+
```
29+
30+
### 2. Starting the REST API
31+
32+
```bash
33+
cd wayang-assembly/target/
34+
tar -xvf apache-wayang-assembly-1.1.1-dist.tar.gz
35+
cd wayang-1.1.1
36+
./bin/wayang-submit org.apache.wayang.api.json.Main
37+
```

0 commit comments

Comments
 (0)