当我尝试构建一个predictionIO引擎(https://github.com/peoplehum/BagOfWords_SentimentAnalysis_Template)时,我收到错误[INFO] [Engine $]寻找引擎...... [ERROR] [Engine $]未找到引擎。您的构建可能已失败。中止。
我看到构建过程创建了target / scala-2.10 / santimentanalysis_bagofwords_model_2.10-1.0.jar 和target / scala-2.10 / SantimentAnalysis_BagOfWords_Model-assembly-1.0-deps.jar但应该在target / scala-2.11中创建它们。
为什么引擎构建为scala-2.10而不是scala-2.11?
我使用以下内容构建了PredictionIO来处理我的环境:
./make-distribution.sh -Dscala.version=2.11.6 -Dspark.version=2.1.0 -Delasticsearch.version=2.3.3
ubuntu1604vm:〜/ mnt / PredictionIO-0.11.0-incubating / vendors / BagOfWords_SentimentAnalysis_Template $ pio build --verbose
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/b/mnt/PredictionIO-0.11.0-incubating/lib/spark/pio-data-hdfs-assembly-0.11.0-incubating.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/b/mnt/PredictionIO-0.11.0-incubating/lib/pio-assembly-0.11.0-incubating.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
[INFO] [Engine$] Using command '/home/b/mnt/PredictionIO-0.11.0-incubating/sbt/sbt' at /home/b/mnt/PredictionIO-0.11.0-incubating/vendors/BagOfWords_SentimentAnalysis_Template to build.
[INFO] [Engine$] If the path above is incorrect, this process will fail.
[INFO] [Engine$] Uber JAR disabled. Making sure lib/pio-assembly-0.11.0-incubating.jar is absent.
[INFO] [Engine$] Going to run: /home/b/mnt/PredictionIO-0.11.0-incubating/sbt/sbt package assemblyPackageDependency in /home/b/mnt/PredictionIO-0.11.0-incubating/vendors/BagOfWords_SentimentAnalysis_Template
[INFO] [Engine$] [info] Loading project definition from /home/b/mnt/PredictionIO-0.11.0-incubating/vendors/BagOfWords_SentimentAnalysis_Template/project
[INFO] [Engine$] [info] Set current project to SantimentAnalysis_BagOfWords_Model (in build file:/home/b/mnt/PredictionIO-0.11.0-incubating/vendors/BagOfWords_SentimentAnalysis_Template/)
[INFO] [Engine$] [success] Total time: 0 s, completed Apr 30, 2017 7:53:12 PM
[INFO] [Engine$] [info] Including from cache: scala-library-2.10.5.jar
[INFO] [Engine$] [info] Checking every *.class/*.jar file's SHA-1.
[INFO] [Engine$] [info] Merging files...
[INFO] [Engine$] [warn] Merging 'META-INF/MANIFEST.MF' with strategy 'discard'
[INFO] [Engine$] [warn] Strategy 'discard' was applied to a file
[INFO] [Engine$] [info] Assembly up to date: /home/b/mnt/PredictionIO-0.11.0-incubating/vendors/BagOfWords_SentimentAnalysis_Template/target/scala-2.10/SantimentAnalysis_BagOfWords_Model-assembly-1.0-deps.jar
[INFO] [Engine$] [success] Total time: 1 s, completed Apr 30, 2017 7:53:13 PM
[INFO] [Engine$] Compilation finished successfully.
[INFO] [Engine$] Looking for an engine...
[ERROR] [Engine$] No engine found. Your build might have failed. Aborting.
pio状态的结果
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/mnt/PredictionIO-0.11.0-incubating/lib/spark/pio-data-hdfs-assembly-0.11.0-incubating.jar!/org/slf4j/i mpl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/mnt/PredictionIO-0.11.0-incubating/lib/pio-assembly-0.11.0-incubating.jar!/org/slf4j/impl/StaticLogger Binder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
[INFO] [Management$] Inspecting PredictionIO...
[INFO] [Management$] PredictionIO 0.11.0-incubating is installed at /home/mnt/PredictionIO-0.11.0-incubating
[INFO] [Management$] Inspecting Apache Spark...
[INFO] [Management$] Apache Spark is installed at /home/mnt/PredictionIO-0.11.0-incubating/vendors/spark-2.1.0-bin-hadoop2.7
[INFO] [Management$] Apache Spark 2.1.0 detected (meets minimum requirement of 1.3.0)
[INFO] [Management$] Inspecting storage backend connections...
[INFO] [Storage$] Verifying Meta Data Backend (Source: PGSQL)...
[INFO] [Storage$] Verifying Model Data Backend (Source: PGSQL)...
[INFO] [Storage$] Verifying Event Data Backend (Source: PGSQL)...
[INFO] [Storage$] Test writing to Event Store (App Id 0)...
[INFO] [Management$] Your system is all ready to go.
的env
PIO_SCALA_VERSION=2.11.6
PIO_FS_BASEDIR=/home/tmp/.pio_store
PIO_ELASTICSEARCH_VERSION=2.3.3
PIO_HADOOP_VERSION=2.7
PIO_SPARK_VERSION=2.1.0
PIO_HOME=/home/mnt/PredictionIO-0.11.0-incubating
答案 0 :(得分:1)
要为引擎pio构建设置predictionIO引擎模板的Scala版本,请编辑引擎的build.sbt
对于我正在使用的发动机,我补充道 scalaVersion:=" 2.11.6" to build.sbt
匹配我的配置.. PredictionIO-0.11.0-incubating scala.version = 2.11.6 spark.version = 2.1.0)
PredictionIO-0.11.0-温育/销售商/ BagOfWords_SentimentAnalysis_Template / build.sbt:
assemblySettings
name := "SantimentAnalysis_BagOfWords_Model"
version := "1.0"
scalaVersion := "2.11.6"
libraryDependencies ++= Seq(
"org.apache.predictionio" %% "apache-predictionio-core" % "0.10.0-incubating" % "provided",
"org.apache.spark" %% "spark-core" % "1.5.1" % "provided",
"org.apache.spark" %% "spark-mllib" % "1.5.1" % "provided"
)