0

In spark-shell, when I exectue import org.jblas.DoubleMatrix, it will throw "error: object jblas is not a member of package org" on the RHEL.

Actually, I googled about "jblas" and installed "gfortran" from https://gcc.gnu.org/wiki/GFortranBinaries#MacOS on my mac pro.

My spark version is spark-1.4.0-bin-hadoop2.6.tar or spark-1.5.1-bin-hadoop2.6.tar, which is download directly from the official website, it's to say that I didn't build from the source code.

feuyeux
  • 1,158
  • 1
  • 9
  • 26

1 Answers1

2

This step may be optional, it will install the jblas jar on your laptop repository.

git clone https://github.com/mikiobraun/jblas.git
cd jblas
mvn install

Enter into the spark directory

cd /Users/erichan/Garden/spark-1.5.1-bin-cdh4

Launch the spark shell with packages option, and if you didn't do the first step, you should give the right maven coordinate for jblas:

bin/spark-shell --name my_mlib --packages org.jblas:jblas:1.2.4-SNAPSHOT --driver-memory 4G --executor-memory 4G --driver-cores 2
feuyeux
  • 1,158
  • 1
  • 9
  • 26