Skip to content

Compilation

flow edited this page Jul 7, 2017 · 19 revisions

Table Of Contents

Requirements

  • JDK 1.8+
  • C++ compiler
    • Linux: GCC 4.4.7, or higher version
    • Mac: We use LLVM 7.0.0, other versions should work as well
  • Maven 3.0+

Source code

$> git clone git@github.com:shunfei/indexr.git
$> cd indexr
$> git checkout <indexr-release-tag>
$> git clone git@github.com:shunfei/indexr-compress-lib
$> cd indexr-compress-lib
$> git checkout <indexr-release-tag>
$> git clone git@github.com:shunfei/drill.git
$> cd drill
$> git checkout indexr-<indexr-version>-drill-<drill-version>

Currently IndexR plugin is not yet in official Apache Drill project, and we are working into it.

Node that you can and add other fast 3rdparty maven repository mirror sites to ~/.m2/settings.xml if your network is slow to access offical site. e.g.

    <mirrors>
		<mirror>
			<id>alimaven</id>
			<name>aliyun maven</name>
			<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
			<mirrorOf>central</mirrorOf>
		</mirror>
	</mirrors>

Build cpp libs

$> cd .../indexr
$> mkdir -p lib
$> cp .../indexr-compress-lib/lib/* lib/
$> ls lib/

Build IndexR

  • Run compilation scripts.
$> sh script/setup_all.sh
$> sh script/release_all.sh
$> ls distribution/indexr-<version>

Expected to list some generated folders:

indexr-drill/ indexr-hive/  indexr-tool/  lib/

They are what we need for deployment.

Build Drill Plugin

Note that you should use corresponding indexr version branch of Drill, NOT master branch! For example if you are using IndexR release of indexr-0.4.2 and Drill 1.10.0, you should use indexr-0.4.2-drill-1.10.0.

$> cd .../drill

$> git checkout indexr-<indexr-version>-drill-<drill-version>

$> cd contrib/storage-indexr
$> mvn clean install -DskipTests
$> ls contrib/storage-indexr/target/drill-indexr-storage-<version>.jar 

drill-indexr-storage-<version>.jar is the jar file we need for deployment.