xushiyan commented on code in PR #13939:
URL: https://github.com/apache/hudi/pull/13939#discussion_r2380896986


##########
docker/compose/notebooks/utils.ipynb:
##########
@@ -0,0 +1,223 @@
+{
+ "cells": [
+  {
+   "cell_type": "code",
+   "execution_count": 2,
+   "id": "3c22eccc-8655-4b87-bc0d-cd5a068b889b",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "#  Licensed to the Apache Software Foundation (ASF) under one\n",
+    "#  or more contributor license agreements.  See the NOTICE file\n",
+    "#  distributed with this work for additional information\n",
+    "#  regarding copyright ownership.  The ASF licenses this file\n",
+    "#  to you under the Apache License, Version 2.0 (the\n",
+    "#  \"License\"); you may not use this file except in compliance\n",
+    "#  with the License.  You may obtain a copy of the License at\n",
+    "#\n",
+    "#      http://www.apache.org/licenses/LICENSE-2.0\n";,
+    "#\n",
+    "#  Unless required by applicable law or agreed to in writing, software\n",
+    "#  distributed under the License is distributed on an \"AS IS\" BASIS,\n",
+    "#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.\n",
+    "#  See the License for the specific language governing permissions and\n",
+    "# limitations under the License."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 1,
+   "id": "f8bbcda9-7b8a-4415-8915-acadcfa07660",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "import os\n",
+    "from pyspark.sql import SparkSession"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 2,
+   "id": "c44b9eca-63e2-468a-ba86-8113533b4d15",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "HUDI_JAR = os.environ.get(\"HUDI_SPARK_BUNDLE\")\n",
+    "if not HUDI_JAR:\n",
+    "        raise EnvironmentError(\"HUDI_SPARK_BUNDLE environment variable 
not set\")\n",
+    "\n",
+    "HADOOP_S3_JAR = 
\"/opt/spark/jars/hadoop-aws-3.3.4.jar,/opt/spark/jars/aws-java-sdk-bundle-1.12.734.jar\"\n",
+    "\n",
+    "ALL_JARS = f\"{HUDI_JAR},{HADOOP_S3_JAR}\""
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 3,
+   "id": "7f104543-3374-4c78-b666-bf44f3be962c",
+   "metadata": {},
+   "outputs": [],
+   "source": [
+    "def get_spark_session(app_name=\"Hudi-Notebooks\"):\n",

Review Comment:
   utils need to be put in a notebook? they're supposed to be just imported by 
other notebooks and can live in .py files?



##########
docker/hoodie/hadoop/sparkmaster/entrypoint.sh:
##########
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Start the spark master in the background

Review Comment:
   add comments before this explain who use this script



##########
docker/hoodie/hadoop/sparkmaster/Dockerfile:
##########
@@ -20,12 +20,27 @@ ARG HIVE_VERSION=3.1.3
 ARG SPARK_VERSION=3.5.3
 FROM 
apachehudi/hudi-hadoop_${HADOOP_VERSION}-hive_${HIVE_VERSION}-sparkbase_${SPARK_VERSION}
 
-COPY master.sh /opt/spark
+#COPY master.sh /opt/spark
+#RUN chmod +x /opt/spark/master.sh
+
+#COPY jupyter.sh /opt/spark
+#RUN chmod +x /opt/spark/jupyter.sh
+
+#COPY entrypoint.sh /opt/spark
+#RUN chmod +x /opt/spark/entrypoint.sh

Review Comment:
   do not leave commented code. either remove or keep them



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to