2
我創建並配置了一個小的hadoop集羣(1個master和1個slave),並安裝了spark。來自不同用戶的spark-shell導致錯誤
我用前buil spark-1.6.0-bin-hadoop2.6
和hadoop-2.7
。
當我運行例如
$ ./bin/spark-submit --class org.apache.spark.examples.SparkPi \
--master yarn \
--deploy-mode cluster \
--driver-memory 4g \
--executor-memory 2g \
--executor-cores 1 \
--queue thequeue \
lib/spark-examples*.jar \
10
從hduser(用戶擁有/usr/local/hadoop
),一切工作正常,但是當我嘗試從以下錯誤相同的用戶運行bin/spark-shell
發生:
Database Class Loader started - derby.database.classpath='' 16/03/02 16:55:32 ERROR Datastore.Schema:
Failed initialising database. Cannot get a connection, pool error Could not create a validated object, cause:
A read-only user or a user in a read-only database is not permitted to disable read-only mode on a connection.
org.datanucleus.exceptions.NucleusDataStoreException: Cannot get a connection, pool error Could not create a validated object, cause:
A read-only user or a user in a read-only database is not permitted to disable read-only mode on a connection.
然而,當我運行bin/spark-shell
從用戶:user
,誰擁有/usr/local/spark
,它工作正常。
我有兩個問題:
首先,就是爲什麼這個錯誤首先發生什麼呢?
二,處理它的最好方法是什麼?也許讓一個擁有spark和hadoop的用戶?或者這是一個不好的做法?