File tree Expand file tree Collapse file tree 3 files changed +31
-1
lines changed
Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 4343 with :
4444 java-version : ${{ env.JDK_VERSION }}
4545 distribution : ' adopt'
46+ - name : Set up hadoop dependency
47+ run : |
48+ mkdir -p ${{ github.workspace }}/temp
49+ curl -L -o ${{ github.workspace }}/temp/bundled-hadoop.jar \
50+ https://repo.maven.apache.org/maven2/org/apache/flink/flink-shaded-hadoop-2-uber/2.8.3-10.0/flink-shaded-hadoop-2-uber-2.8.3-10.0.jar
51+ ls -al ${{ github.workspace }}/temp
52+ if [ ! -f ${{ github.workspace }}/temp/bundled-hadoop.jar ]; then
53+ echo "JAR download failed."
54+ exit 1
4655 - name : Run lint-python.sh
56+ env :
57+ _PYPAIMON_HADOOP_CLASSPATH : ${{ github.workspace }}/temp/bundled-hadoop.jar
4758 run : |
4859 chmod +x dev/lint-python.sh
4960 ./dev/lint-python.sh
61+
62+
63+
64+
65+ # Create a temporary directory
66+ - name : Create temporary directory
67+ run : mkdir -p ${{ github.workspace }}/temp
68+
69+ # Download the JAR file and save to the temporary directory
70+ - name : Download JAR
71+ run : |
72+ curl -L -o ${{ github.workspace }}/temp/your-dependency.jar https://central.maven.org/maven2/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar
73+
74+ # List files in the temporary directory
75+ - name : List downloaded files
76+ run : ls -al ${{ github.workspace }}/temp
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ def _get_hadoop_classpath(env):
103103 return env [constants .PYPAIMON_HADOOP_CLASSPATH ]
104104
105105 if 'HADOOP_CLASSPATH' in env :
106- return None
106+ return env [ 'HADOOP_CLASSPATH' ]
107107 else :
108108 raise EnvironmentError (f"You haven't set '{ constants .PYPAIMON_HADOOP_CLASSPATH } ', \
109109 and 'HADOOP_CLASSPATH' is also not set. Ensure one of them is set." )
Original file line number Diff line number Diff line change 2323
2424
2525def setup_hadoop_bundle_jar (hadoop_dir ):
26+ if constants .PYPAIMON_HADOOP_CLASSPATH in os .environ :
27+ return
28+
2629 url = 'https://repo.maven.apache.org/maven2/org/apache/flink/' \
2730 'flink-shaded-hadoop-2-uber/2.8.3-10.0/flink-shaded-hadoop-2-uber-2.8.3-10.0.jar'
2831
You can’t perform that action at this time.
0 commit comments