aehrc / aehrc/pathling

Implement file_name_mappers in R sparkly API

Open
#1,601 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

new feature R
Dominant language
Java
Stars
134
Forks
24
Avg merge
1d 15h
Merged PRs (30d)
8

Description

Functions such as ptl_read_ndjson should support file_name_mapper to allow flexible mapping of filenames to resource types.

sparkly java interface however does not provide any standard mechanism for R callback functions (i.e. calling back R code from JVM) in the same manner they are supported by Py4J.

It might be possible to adapt the code used in spark_apply() although this may require digging deep into sparklyr implementation and may make it very coupled with this implementation.

A better approach may be to implement an explicit mapper in Java, that explicitly maps all the files names to it's resources and then construct it in R using an R lambda. That would also require an interface from R to list all the files a directory described by spark supported filesystem URL.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the ptl_read_ndjson entry point and comparing the callback approach used by spark_apply() with the surrounding sparklyr implementation. Review the R-to-Java interface and Spark-supported filesystem handling; the work is done when file_name_mapper can map filenames to resource types through a defined R/Java path.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, r, spark
Domain
api, data-engineering
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.