spark:java.lang.UnsupportedOperationException: loadTable is not implemented

java.lang.UnsupportedOperationException: loadTable is not implemented
        at org.apache.spark.sql.catalyst.catalog.InMemoryCatalog.loadTable(InMemoryCatalog.scala:316)
        at org.apache.spark.sql.catalyst.catalog.SessionCatalog.loadTable(SessionCatalog.scala:319)
        at org.apache.spark.sql.execution.command.LoadDataCommand.run(tables.scala:302)
        at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult$lzycompute(commands.scala:58)
        at org.apache.spark.sql.execution.command.ExecutedCommandExec.sideEffectResult(commands.scala:56)

解决办法:

在代码中添加hive支持:

SparkSession sparkSession = SparkSession
        .builder()
        .appName("RowNumberWindowFunction")
        .enableHiveSupport()
        .getOrCreate();

 

 

你可能感兴趣的:(spark)