| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| [HBase](http://hbase.apache.org) can be used as the backend of the event data |
| repository. |
| |
| Download HBase from a [mirror](http://www.apache.org/dyn/closer.cgi/hbase/<%= |
| data.versions.hbase_version %>/<%= data.versions.hbase_basename %>-<%= |
| data.versions.hbase_variant %>.tar.gz). Extract HBase by following the example |
| below. |
| |
| ``` |
| $ tar zxvfC <%= data.versions.hbase_basename %>-<%= data.versions.hbase_variant %>.tar.gz PredictionIO-<%= data.versions.pio %>/vendors |
| ``` |
| |
| INFO: If you decide to install HBase to another location, you must edit |
| `PredictionIO-<%= data.versions.pio %>/conf/pio-env.sh` and change the |
| `PIO_STORAGE_SOURCES_HBASE_HOME` variable to point to your own HBase |
| installation. |
| |
| You will need to at least add a minimal configuration to HBase to start it in |
| standalone mode. Details can be found |
| [here](http://hbase.apache.org/book/quickstart.html). Here, we are showing a |
| sample minimal configuration. |
| |
| INFO: For production deployment, run a fully distributed HBase configuration. |
| |
| Edit `PredictionIO-<%= data.versions.pio %>/vendors/<%= |
| data.versions.hbase_basename %>/conf/hbase-site.xml`. |
| |
| ``` |
| <configuration> |
| <property> |
| <name>hbase.rootdir</name> |
| <value>file:///home/abc/PredictionIO-<%= data.versions.pio %>/vendors/<%= data.versions.hbase_basename %>/data</value> |
| </property> |
| <property> |
| <name>hbase.zookeeper.property.dataDir</name> |
| <value>/home/abc/PredictionIO-<%= data.versions.pio %>/vendors/<%= data.versions.hbase_basename %>/zookeeper</value> |
| </property> |
| </configuration> |
| ``` |
| |
| INFO: HBase will create `hbase.rootdir` automatically to store its data. |
| |
| Edit `PredictionIO-<%= data.versions.pio %>/vendors/<%= |
| data.versions.hbase_basename %>/conf/hbase-env.sh` to set `JAVA_HOME` for the |
| cluster. For example: |
| |
| ``` |
| export JAVA_HOME=/usr/lib/jvm/java-8-oracle/jre |
| ``` |
| |
| For Mac users, use this instead (change `1.8` to `1.7` if you have Java 7 |
| installed): |
| |
| ``` |
| export JAVA_HOME=`/usr/libexec/java_home -v 1.8` |
| ``` |