java流星蝴蝶剑下载_PredictionIO 0.9.1 安装步骤

廉鸿运
2023-12-01

1.下载PIO源码&安装:

https://github.com/apache/incubator-predictionio/tree/v0.9.1

$ tar zxvf incubator-predictionio-0.9.1.zip

$ cd incubator-predictionio-0.9.1

$ ./make-distribution.sh

$ tar zxvf PredictionIO-0.9.1.tar.gz

$ mkdir PredictionIO-0.9.1/vendors

2.下载Spark1.2 & ES1.4.4 & Hbase1.0

http://d3kbcqa49mib13.cloudfront.net/spark-1.2.0-bin-hadoop2.4.tgz

https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.4.4.tar.gz

http://archive.apache.org/dist/hbase/hbase-1.0.0/hbase-1.0.0-bin.tar.gz

解压到 vendors目录 ,  tar zxvf xxxx.tar.gz

3.配置Hbase:

3.1 vendors/hbase-1.0.0/conf/hbase-site.xml,加入如下配置

hbase.rootdir

file:///~xxx/vendors/hbase-1.0.0/data

hbase.zookeeper.property.dataDir

/~xxx/vendors/hbase-1.0.0/zookeeper

3.2 vendors/hbase-1.0.0/conf/hbase-env.sh,配置JAVA环境变量

export JAVA_HOME=/usr/lib/jvm/java8

3.3 vendors/elasticsearch-1.4.4/config/elasticsearch.yml ,设置cluster.name

cluster.name: elasticsearch

4.配置PIO

PredictionIO-0.9.1/conf/pio-env.sh,配置如下:

# Elasticsearch Example

PIO_STORAGE_SOURCES_ELASTICSEARCH_TYPE=elasticsearch

PIO_STORAGE_SOURCES_ELASTICSEARCH_HOSTS=localhost

PIO_STORAGE_SOURCES_ELASTICSEARCH_PORTS=9300

PIO_STORAGE_SOURCES_ELASTICSEARCH_HOME=$PIO_HOME/vendors/elasticsearch-1.4.4

PIO_STORAGE_SOURCES_ELASTICSEARCH_CLUSTERNAME=elasticsearch

# HBase Example

PIO_STORAGE_SOURCES_HBASE_TYPE=hbase

PIO_STORAGE_SOURCES_HBASE_HOSTS=0

PIO_STORAGE_SOURCES_HBASE_PORTS=0

PIO_STORAGE_SOURCES_HBASE_HOME=$PIO_HOME/vendors/hbase-1.0.0

5. 配置PIO环境变量,方便使用命令行

.bash_profile 加入如下:

export PIO091_HOME=/Users/gongsy/predictionio-0.9.1/PredictionIO-0.9.1/bin;

6.启动PIO 以及实用命令

$PIO091_HOME/pio-start-all  启动

$PIO091_HOME/pio-stop-all   停止

$PIO091_HOME/pio status   查看状态

$PIO091_HOME/pio app new xxxxApp

$PIO091_HOME/pio app list

$ cd xxxxEngine 到安装的engine目录下

$PIO091_HOME/pio build --verbose

$PIO091_HOME/pio train

$PIO091_HOME/pio deploy

注意 pio build时 ,sbt-launch-0.13.7.jar文件生成错误:

/Users/gongsy/predictionio-0.9.1/PredictionIO-0.9.1/sbt/sbt-launch-0.13.7.jar

 类似资料: