mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
### What is this PR for? Currently users who build Zeppelin from source need to include `-Psparkr` to use `%r` with embedded local Spark. But it's quite inconvenient to write this build profile every time we build i think. So I removed `-Psparkr` and make `r` related libraries automatically downloaded when we build Zeppelin like I did #2213 ### What type of PR is it? Improvement ### Todos * [x] - remove the rest of `-Psparkr` build profile in `dev/create_release.sh`, `dev/publish_release.sh`, and `docs/install/build.md` after #2213 merged ### What is the Jira issue? [ZEPPELIN-2341](https://issues.apache.org/jira/browse/ZEPPELIN-2341) ### How should this be tested? 1. Apply this patch 2. Build source with below command ``` mvn clean package -DskipTests -pl 'zeppelin-interpreter, zeppelin-zengine, zeppelin-server, zeppelin-display, spark, spark-dependencies' ``` Aftr this step, there will be `R` dir under `ZEPPELIN_HOME/interpreter/spark`. Before this PR, only `dep` dir and `zeppelin-spark_2.10-0.8.0-SNAPSHOT.jar` is generated without `-Psparkr` build profile. 4. Restart Zeppelin. To make sure, run R tutorial note under `Zeppelin Tutorial` folder It should be run successfully without any error ### Screenshots (if appropriate) If we build without `-Psparkr` - before : R related properties are not activated by default in Spark interpreter  - after  ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no Author: AhyoungRyu <fbdkdud93@hanmail.net> Author: Ahyoung Ryu <ahyoungryu@apache.org> Closes #2215 from AhyoungRyu/ZEPPELIN-2341/includeSparkRByDefault and squashes the following commits:8db18cc[AhyoungRyu] Remove the rest of '-Psparkr' in docs & sh filesf891fd4[Ahyoung Ryu] Merge branch 'master' into ZEPPELIN-2341/includeSparkRByDefault445be3e[AhyoungRyu] Add SPARKR env to check each test case need to download r dep or not67af02a[AhyoungRyu] Remove -PsparkR in travis filea00466c[AhyoungRyu] Remove sparkr build profile in pom files
48 lines
1.9 KiB
Bash
Executable file
48 lines
1.9 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
# 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.
|
|
#
|
|
|
|
# Script for installing R / Python dependencies for Travis CI
|
|
set -ev
|
|
touch ~/.environ
|
|
|
|
# Install R dependencies if SPARKR is true
|
|
if [[ "${SPARKR}" = "true" ]] ; then
|
|
echo "R_LIBS=~/R" > ~/.Renviron
|
|
echo "export R_LIBS=~/R" >> ~/.environ
|
|
source ~/.environ
|
|
if [[ ! -d "$HOME/R/knitr" ]] ; then
|
|
mkdir -p ~/R
|
|
R -e "install.packages('evaluate', repos = 'http://cran.us.r-project.org', lib='~/R')" > /dev/null 2>&1
|
|
R -e "install.packages('base64enc', repos = 'http://cran.us.r-project.org', lib='~/R')" > /dev/null 2>&1
|
|
R -e "install.packages('knitr', repos = 'http://cran.us.r-project.org', lib='~/R')" > /dev/null 2>&1
|
|
fi
|
|
fi
|
|
|
|
# Install Python dependencies for Python specific tests
|
|
if [[ -n "$PYTHON" ]] ; then
|
|
wget https://repo.continuum.io/miniconda/Miniconda${PYTHON}-4.2.12-Linux-x86_64.sh -O miniconda.sh
|
|
bash miniconda.sh -b -p $HOME/miniconda
|
|
echo "export PATH='$HOME/miniconda/bin:$PATH'" >> ~/.environ
|
|
source ~/.environ
|
|
hash -r
|
|
conda config --set always_yes yes --set changeps1 no
|
|
conda update -q conda
|
|
conda info -a
|
|
conda config --add channels conda-forge
|
|
conda install -q matplotlib pandasql
|
|
fi
|