1
"brew install apache-spark"を使用してsparkをダウンロードしました。スパークシェルを始めると、私は大量のエラーが発生します。私は火花セッション作成しようとすると:Spark-Shell起動時に多くのエラーが発生する
val spark = SparkSession.builder().appName("Spark Postgresql Example").getOrCreate()
を私は次のエラーを取得:
Unable to open a test connection to the given database. JDBC url = jdbc:derby:;databaseName=metastore_db;create=true, username = APP. Terminating connection pool (set lazyInit to true if you expect to start your database after your app). Original Exception: ------
java.sql.SQLException: Failed to start database 'metastore_db' with class loader [email protected]a116d, see the next exception for details.
Caused by: ERROR XJ040: Failed to start database 'metastore_db' with class loader [email protected]a116d, see the next exception for details.
org.datanucleus.exceptions.NucleusDataStoreException: Unable to open a test connection to the given database. JDBC url = jdbc:derby:;databaseName=metastore_db;create=true, username = APP. Terminating connection pool (set lazyInit to true if you expect to start your database after your app). Original Exception: ------
java.sql.SQLException: Failed to start database 'metastore_db' with class loader [email protected]a116d, see the next exception for details.
Caused by: java.sql.SQLException: Unable to open a test connection to the given database. JDBC url = jdbc:derby:;databaseName=metastore_db;create=true, username = APP. Terminating connection pool (set lazyInit to true if you expect to start your database after your app). Original Exception: ------
java.sql.SQLException: Failed to start database 'metastore_db' with class loader [email protected]a116d, see the next exception for details.
Nested Throwables StackTrace:
java.sql.SQLException: Unable to open a test connection to the given database. JDBC url = jdbc:derby:;databaseName=metastore_db;create=true, username = APP. Terminating connection pool (set lazyInit to true if you expect to start your database after your app). Original Exception: ------
java.sql.SQLException: Failed to start database 'metastore_db' with class loader [email protected]a116d, see the next exception for details.
17/07/18 13:12:35 WARN HiveMetaStore: Retrying creating default database after error: Unable to open a test connection to the given database. JDBC url = jdbc:derby:;databaseName=metastore_db;create=true, username = APP. Terminating connection pool (set lazyInit to true if you expect to start your database after your app). Original Exception: ------
java.sql.SQLException: Failed to start database 'metastore_db' with class loader [email protected]a116d, see the next exception for details.
javax.jdo.JDOFatalDataStoreException: Unable to open a test connection to the given database. JDBC url = jdbc:derby:;databaseName=metastore_db;create=true, username = APP. Terminating connection pool (set lazyInit to true if you expect to start your database after your app). Original Exception: ------
java.sql.SQLException: Failed to start database 'metastore_db' with class loader [email protected]a116d, see the next exception for details.
17/07/18 13:12:35 ERROR Schema: Failed initialising database.
Unable to open a test connection to the given database. JDBC url = jdbc:derby:;databaseName=metastore_db;create=true, username = APP. Terminating connection pool (set lazyInit to true if you expect to start your database after your app). Original Exception: ------
java.sql.SQLException: Failed to start database 'metastore_db' with class loader [email protected]a116d, see the next exception for details.
とかなり詳細..
scala> import spark.implicits._
<console>:18: error: not found: value spark
import spark.implicits._
^
起動時にSparkSessionオブジェクトが表示されますなぜ新しいものを作るのですか? –
私は試しましたが、変数sparkが見つかりませんでした – squad21
あなたのインストールは何とかうんざりしてしまったと思いますが、実際の起動プロンプトが表示されると仮定すると、 'spark context available 'sc''、' Spark session available' spark ' ' –