spark Exception in thread "main" java.lang.IllegalArgumentException: java.net.URISyntaxException: Re
2017-03-20 23:38
531 查看
在windows上运行spark2.0的ml算法报错:
错误位置:
查询后发现使用spark sql时需要指定数据库的文件地址。
但这里并没有使用spark sql。应该是使用SparkSession,取代了原本的SQLContext与HiveContext。
改为:
就好了。
或者
这个目录可以随便选择,直接使用file:///也可以
Exception in thread "main" java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: file:F:/program/MyPrograms/spark-warehouse
错误位置:
val spark = SparkSession .builder .appName("EstimatorTransformerParamExample") .getOrCreate()
查询后发现使用spark sql时需要指定数据库的文件地址。
但这里并没有使用spark sql。应该是使用SparkSession,取代了原本的SQLContext与HiveContext。
改为:
val spark = SparkSession .builder .appName("EstimatorTransformerParamExample") .config("spark.sql.warehouse.dir", "F:/program/MyPrograms/spark-warehouse")
.master("local") .getOrCreate()
就好了。
或者
.config("spark.sql.warehouse.dir", "file:///F:/program/MyPrograms/spark-warehouse")
这个目录可以随便选择,直接使用file:///也可以
相关文章推荐
- Hive2.1:Exception in thread "main" java.lang.IllegalArgumentException: java.net.URISyntaxException:
- 安装Hive过程中,出现Exception in thread "main" java.lang.IllegalArgumentException: java.net.URISyntaxExcepti
- exception in thread "main" java.lang.RuntimeException: java.lang.IllegalArgumentException: java.net.
- Exception in thread "main" java.lang.IllegalArgumentException: Comparison method violates its gener
- Exception in thread "main" java.lang.IllegalArgumentException: node to traverse cannot be null!
- Exception in thread "main" java.lang.IllegalArgumentException: input == null!
- Exception in thread "main" java.lang.IllegalArgumentException: Not a host:port pair: PBUF
- Exception in thread "main" java.lang.IllegalArgumentException: Argument cannot be null
- Exception in thread "main" java.lang.IllegalArgumentException: Wrong FS: hdfs://localhost:9000/user/
- Exception in thread "main" java.lang.IllegalArgumentException:declares multiple JSON fields named id
- Exception in thread "main" java.lang.IllegalArgumentException: Wrong FS: hdfs://node1:9000/input/pia
- java 集合排序异常Exception in thread "main" java.lang.IllegalArgumentException: Comparison method violate
- hException in thread "main" java.lang.IllegalArgumentException: Wrong FS: hdfs://hadoop:9000/tadoop:
- Exception in thread "main" java.lang.IllegalArgumentException: Some primary key columns are missing
- FAILED java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI:hdfs:192.*
- Exception in thread "main" java.lang.IllegalArgumentException
- Exception in thread "main" java.lang.IllegalArgumentException: adding a window to a container
- Exception in thread "main" java.lang.IllegalArgumentException
- Exception in thread "main" java.lang.IllegalArgumentException: Not a host:port pair: PBUF
- Exception in thread "main" java.lang.IllegalArgumentException: Comparison method violates its gener