在Spark中加载PipelineModel

时间:2018-08-22 16:41:42

标签: java maven apache-spark load

我想在Apache Spark版本PipelineModel中加载2.3.0。我使用以下代码:

PipelineModel.read().load(path);

我得到以下日志:

2018-08-22 19:32:58.841  INFO 15540 --- [nio-8080-exec-5] o.a.spark.storage.memory.MemoryStore     : Block broadcast_0 stored as values in memory (estimated size 216.6 KB, free 1999.0 MB)
2018-08-22 19:32:58.904  INFO 15540 --- [nio-8080-exec-5] o.a.spark.storage.memory.MemoryStore     : Block broadcast_0_piece0 stored as bytes in memory (estimated size 20.5 KB, free 1999.0 MB)
2018-08-22 19:32:58.911  INFO 15540 --- [nio-8080-exec-5] org.apache.spark.SparkContext            : Created broadcast 0 from textFile at ReadWrite.scala:382

我尝试使用try-catch,但是没有抛出异常。在加载PipelineModel之前,SparkSession使用以下代码初始化:

spark = SparkSession
            .builder()
            .appName("Application Name")
            .master("local[*]")
            .getOrCreate();

我直接从IDE运行代码,Spark在项目中用作Maven依赖项。我写PipelineModel没问题,但是很遗憾,我无法将其装回。任何帮助表示赞赏。

0 个答案:

没有答案