No FileSystem for scheme: wasbs
I compile the source code of mmlspark-0.15, i install 'mmlspark-0.15-py2.py3-none-any.whl' package to my ubuntu16.04 envrionment, and copy the 'mmlspark_2.11-0.15.jar' and 'mmlspark_2.11-0.15.jar' to the $SPARK_HOME/jars directory.
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 export JRE_HOME=$JAVA_HOME/lib export CLASS_PATH=$CLASS_PATH:$JAVA_HOME/lib:$JRE_HOME/lib export SPARK_HOME=/opt/spark export SPARK_CLASSPATH=$SPARK_HOME/jars export HADOOP_HOME=/usr/local/hadoop export PYSPARK_PYTHON=/usr/bin/python3 export PYTHONPATH=${SPARK_HOME}/python/:$(echo ${SPARK_HOME}/python/lib/py4j-*-src.zip):${PYTHONPATH} export PYSPARK_DRIVER_PYTHON="jupyter" export PYSPARK_DRIVER_PYTHON_OPTS="notebook" export PATH=$HADOOP_HOME/bin:$SPARK_HOME/bin:$JAVA_HOME/bin:$PATH
when i run the jupyter example of '106 - Quantile Regression with LightGBM'
It arise the following error, I don't know why it happen?
Py4JJavaError Traceback (most recent call last)
----> 2 .load("wasbs://[email protected]/triazines.scale.svmlight")
/opt/spark/python/pyspark/sql/readwriter.py in load(self, path, format, schema, **options) 164 self.options(**options) 165 if isinstance(path, basestring): --> 166 return self._df(self._jreader.load(path)) 167 elif path is not None: 168 if type(path) != list:
/opt/spark/python/lib/py4j-0.10.7-src.zip/py4j/java_gateway.py in call(self, *args) 1255 answer = self.gateway_client.send_command(command) 1256 return_value = get_return_value( -> 1257 answer, self.gateway_client, self.target_id, self.name) 1258 1259 for temp_arg in temp_args:
/opt/spark/python/pyspark/sql/utils.py in deco(*a, **kw) 61 def deco(*a, **kw): 62 try: ---> 63 return f(*a, **kw) 64 except py4j.protocol.Py4JJavaError as e: 65 s = e.java_exception.toString()
/opt/spark/python/lib/py4j-0.10.7-src.zip/py4j/protocol.py in get_return_value(answer, gateway_client, target_id, name) 326 raise Py4JJavaError( 327 "An error occurred while calling {0}{1}{2}.\n". --> 328 format(target_id, ".", name), value) 329 else: 330 raise Py4JError(
Py4JJavaError: An error occurred while calling o28.load. : java.io.IOException: No FileSystem for scheme: wasbs at org.apache.hadoop.fs.FileSystem.getFileSystemClass(FileSystem.java:2660) at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2667) at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:94) at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2703) at org.apache.hadoop.fs.FileSystem$Cache.get(FileSystem.java:2685) at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:373) at org.apache.hadoop.fs.Path.getFileSystem(Path.java:295) at org.apache.spark.sql.execution.datasources.DataSource$$anonfun$org$apache$spark$sql$execution$datasources$DataSource$$checkAndGlobPathIfNecessary$1.apply(DataSource.scala:547) at org.apache.spark.sql.execution.datasources.DataSource$$anonfun$org$apache$spark$sql$execution$datasources$DataSource$$checkAndGlobPathIfNecessary$1.apply(DataSource.scala:545) at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:241) at scala.collection.TraversableLike$$anonfun$flatMap$1.apply(TraversableLike.scala:241) at scala.collection.immutable.List.foreach(List.scala:392) at scala.collection.TraversableLike$class.flatMap(TraversableLike.scala:241) at scala.collection.immutable.List.flatMap(List.scala:355) at org.apache.spark.sql.execution.datasources.DataSource.org$apache$spark$sql$execution$datasources$DataSource$$checkAndGlobPathIfNecessary(DataSource.scala:545) at org.apache.spark.sql.execution.datasources.DataSource.resolveRelation(DataSource.scala:359) at org.apache.spark.sql.DataFrameReader.loadV1Source(DataFrameReader.scala:223) at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:211) at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:178) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244) at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357) at py4j.Gateway.invoke(Gateway.java:282) at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132) at py4j.commands.CallCommand.execute(CallCommand.java:79) at py4j.GatewayConnection.run(GatewayConnection.java:238) at java.lang.Thread.run(Thread.java:748)
@vinglogn we have two sets of notebooks, one for HDI cluster compute and the other for local compute - they are generated from one set of notebooks during build time. I think you are running the HDI cluster notebook locally which is causing the problem. It looks like you don't have wasb available in the environment you are running the notebook from.
what is wasb, do you have a 'wasb' jar package for me to deal with is problem? and where to find the wiki?
hi @vinglogn wasb is just an extension on hadoop HDFS APIs. It's used on cluster compute. You shouldn't be using it in a local notebook. We have separate local notebooks that don't use wasb storage which you can run. EDIT: here is a good explanation https://blogs.msdn.microsoft.com/cindygross/2015/02/04/understanding-wasb-and-hadoop-storage-in-azure/
@imatiach-msft I am very appreciated for your reply! you tell me there are two sets of notebooks, HDI cluster compute and local compute environment, and my problem is with the latter. Actually, I pull a docker image of mmlspark from official docker hub, and all the notebooks run well,I want to know the difference between the two of docker env and my own local compute? if i want to build a docker env of mmlspark, wish all the notebooks run well just likes the official image,How can I achieve this goal? any wiki or help doc for me?
hi @vinglogn "HDI cluster compute and local compute environment, and my problem is with the latter."
maybe there is some misunderstanding - there are two sets of notebooks, cluster and local, and it looks like you are running the cluster notebooks locally whereas you should be running the local notebooks instead. When you build the code by running ./runme, the local notebooks should be in the folder:
I got it, thanks! @imatiach-msft
Is the folder for local notebooks also in github "/notebooks/local" ? Or do I have to build myself? Thanks.
is this still true for latest 0.18.1? I can't find the local folder? BuildArtifacts is also not there. I see target folder only after building. Can somebody please help?
Agree with androtan. Can someone please provide the full URL to the notebooks/local to the code that can run locally without wasbs?
Oh sorry. I think the local notebooks have all been removed since then, that was several years ago. You will need to get the datasets locally some other way now.
I actually found this really old example here as I was hitting this same issue locally: https://github.com/microsoft/SynapseML/blame/95bdef7c976822a967e86474434131e04863df74/notebooks/samples/106%20-%20Quantile%20Regression%20with%20LightGBM.ipynb
from pyspark.context import SparkContext
from pyspark.sql.session import SparkSession
import pyspark
spark = pyspark.sql.SparkSession.builder.appName("MyApp") \
.config("spark.jars.packages", "com.microsoft.azure:synapseml_2.12:0.9.5") \
.getOrCreate()
dataFile = "triazines.scale.svmlight"
import os, urllib.request
urllib.request.urlretrieve("https://mmlspark.azureedge.net/datasets/"+dataFile, dataFile)
triazines = spark.read.format("libsvm").load(dataFile)
# print dataset size
print("records read: " + str(triazines.count()))
print("Schema: ")
triazines.printSchema()
it was a different dataset back then though