Skip to content

Commit

Permalink
feat(sparkR): integration of sparkr
Browse files Browse the repository at this point in the history
  • Loading branch information
selmazrg authored and rpignolet committed Oct 6, 2023
1 parent e600b17 commit 4e52e25
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
16 changes: 16 additions & 0 deletions roles/spark/client/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,19 @@
owner: root
group: root
mode: "755"

- name: "Render /usr/bin/{{ spark_version }}R-shell command"
ansible.builtin.template:
src: sparkr-shell-command.j2
dest: "/usr/bin/{{ spark_version }}r-shell"
owner: root
group: root
mode: "755"
when: (spark_version == "spark3") and spark_enable_r

- name: Create symbolic link to R library
ansible.builtin.file:
src: "{{ spark_install_dir }}/R/lib/SparkR"
dest: "/usr/lib64/R/library/SparkR"
state: link
when: (spark_version == "spark3") and spark_enable_r
7 changes: 7 additions & 0 deletions roles/spark/common/templates/sparkr-shell-command.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash


export YARN_CONF_DIR=/etc/hadoop/conf


/opt/tdp/spark3/bin/sparkR "$@"
3 changes: 3 additions & 0 deletions tdp_vars_defaults/spark/spark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ hbase_install_dir: "{{ spark_root_dir }}/hbase"
# Spark pid directories
spark_pid_dir: /var/run/spark

# SparkR
spark_enable_r: false

#Spark logging configuration
# Root logger should be: [RFA | DRFA]
spark_root_logger: RFA
Expand Down
3 changes: 3 additions & 0 deletions tdp_vars_defaults/spark3/spark3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ spark_hs_conf_dir: "{{ spark_conf_dir }}/conf.hs"
# Spark pid directories
spark_pid_dir: /var/run/spark3

# SparkR
spark_enable_r: false

#Spark3 logging configuration
# Root logger should be: [RFA | DRFA]
spark_root_logger: RFA
Expand Down

0 comments on commit 4e52e25

Please sign in to comment.