Skip to content

Commit 576f371

Browse files
committed
feat(stack): add spark
1 parent 7d0a56f commit 576f371

2 files changed

Lines changed: 30 additions & 0 deletions

File tree

scripts/checker.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,12 @@
289289
"owner": "apache",
290290
"match": "^release-[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
291291
},
292+
"spark": {
293+
"name": "spark",
294+
"type": "github",
295+
"owner": "apache",
296+
"match": "^v[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}$",
297+
},
292298
}
293299

294300

stacks/spark/build.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
3+
# Load stack utils
4+
. /usr/bin/stack-utils
5+
6+
# Implement build function
7+
function build() {
8+
generate-stack-path
9+
curl -fsSL -o tmp.tgz https://dlcdn.apache.org/spark/spark-${STACK_VERSION}/spark-${STACK_VERSION}-bin-hadoop3.tgz
10+
tar -xzf tmp.tgz
11+
mv spark-${STACK_VERSION}-bin-hadoop3/* "${DATA_DIR}"
12+
rm spark-${STACK_VERSION}-bin-hadoop3 tmp.tgz -rf
13+
14+
mkdir -p "${DATA_DIR}"/env
15+
echo "/opt/drycc/spark" > "${DATA_DIR}"/env/SPARK_HOME
16+
cat << EOF > ${PROFILE_DIR}/${STACK_NAME}.sh
17+
export PATH="/opt/drycc/spark/bin:\$PATH"
18+
export PATH="/opt/drycc/${STACK_NAME}/sbin:\$PATH"
19+
EOF
20+
}
21+
22+
# call build stack
23+
build-stack "${1}"
24+

0 commit comments

Comments
 (0)