Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RDD lineage support #33

Open
karanglass34 opened this issue Jun 29, 2019 · 17 comments
Open

RDD lineage support #33

karanglass34 opened this issue Jun 29, 2019 · 17 comments
Assignees
Labels

Comments

@karanglass34
Copy link

karanglass34 commented Jun 29, 2019

Currently there is no one easy solution to provide lineage for RDDs, but there are several ways how to provide at lease some of it or define it manually. This ticket will group all of them.

Subtasks:

Task Ticket
partial RDD support (Write - LogicalPlan, Read - RDD) #498
RDD Read support
RDD manual lineage metadata enrichment

Original message:

I am using the latest spline version. When I enable spline, I see incomplete lineage, my code reads the file from parquet and creates a temporary view, performs some transformations and creates a new view which is then finally written to a parquet. However I am not able to see lineages for my transformations.

lineage

Are there any constraints like all the intermediate RDD's should be in memory? or any specific spark config apart from that mentioned in the documentation which needs to enabled?

@lukasnalezenec
Copy link

Hi, can you please add some script reproducin issue ?
We need to know how you read and write data, we are not interested in operations like filter, aggregations...

@wajda
Copy link
Contributor

wajda commented Jul 17, 2019

Are you using RDD or DataFrame? Spline can only track Spark transformations defined using Spark SQL / DataFrame API. Unfortunately RDD transformations are untrackable due to lack of meta information.

@ghost
Copy link

ghost commented Aug 1, 2019

@wajda Do you think this issue of RDD transformations not having metadata could be potentially solvable through Spline eventually?

More specifically: I see that the entry point for the lineage data is through the QueryExecutionListeners, which is why the RDD transformations aren't getting picked up. Do you know of any ways/think it is possible for Spline to track RDD transformations through some other means?

@wajda
Copy link
Contributor

wajda commented Aug 2, 2019

Yes, we brainstormed this question a while ago, a few possible partial solution popped out. But they were either fragile or cumbersome to use, and neither was solving the problem completely.
We could capture a physical lineage, but the goal is to capture logical one, so we need to keep as close to a user source code as possible. We thought we could use AspectJ to intercept the RDD methods calls and capture the logical plan that way. But again, most of the RDD methods accept lambdas, and in JVM we don't know what is inside lambdas. This is the biggest issue. Perhaps the best solution would be the one that approaches the problem from both sides - utilizes a static source code analysis, and then link the static metadata with the dynamic metadata collected on runtime. IMO that sounds doable in theory, but quite complex in practice. But we never say never :)

@dan-coates
Copy link

In the event that Spline can't capture this lineage information automatically, we were considering options to augment the lineage data more or less manually. Ideally Spline has full visibility to all actions and can report them automatically, but where the operations are opaque or simply not captured at the sufficient detail in Spark's plans, business requirements would dictate that we still need to capture the actions somehow.

Do you think there would be any possibility in Spline's architecture to essentially inject user-defined lineage events into Spline? For context, we are calling DataFrame.foreachPartition and executing JDBC calls for each row here, so we would like to note that in the lineage stream, and could call a Spline method when we execute a DataFrame or RDD operation which Spline does not support.

I can see us having to have some kind of sidecar in any case to have complete visibility over lineage information, so if it can be part of Spline itself, that can at least contain all the lineage information in a single graph. If that doesn't make sense architecturally though, we can simply have two sets of lineage data and stitch them together outside of Spline.

@wajda
Copy link
Contributor

wajda commented Aug 5, 2019

Yes, it makes perfect sense. Thanks for the great idea. Need to think about it. So, basically, the way it could be done is something like this:

val df0: DataFrame = ... // my initial DataFrame
val rdd0 = df0.rdd       // switch to an RDD level. Automatic lineage is lost at this point!
val rdd1 = rdd0.map(myCoolRDDTransformFunction) // do some stuff on RDD
val df1 = rdd1.toDF()    // get back to DataFrame.
// From the business perspective df1 is derived from df0 via myCoolRDDTransformFunction, so...
df1.derivesLineageFrom(df0).as(spline.CustomOperation("my-cool-rdd-transform", ... /* other relevant info */ ))

I wonder if this approach could also work for tracking ML lineages.

@wajda wajda changed the title Incomplete Lineage RDD lineage support Sep 24, 2019
@RavikumarRapolu
Copy link

Hi Wajda,

we are also facing issue with rdd, actually above idea is good. can we expext it in next release please , we want to use spline into our business model.

@Nikhith-kudumula
Copy link

Hi Wajda,

We are experiecing issue with generating lineage while there is a rdd logic in code. Can we expect fix for it in next version of Spline ?

@wajda
Copy link
Contributor

wajda commented Jan 26, 2020

We'll see. Not in 0.5, but maybe in one of the nearest future releases.

@Nikhith-kudumula
Copy link

Hi Wajda,

Can you please let us know if RDD lineage support is planned for release in near time. We are intergrating Spline in our business Model and we have rdd's in our code.

Thanks,
Nikhith

@wajda
Copy link
Contributor

wajda commented Apr 1, 2020

We'll try to include it in 0.6, aiming for the release at the beginning of June.

@wajda wajda transferred this issue from AbsaOSS/spline May 5, 2020
@wajda wajda added the feature label May 5, 2020
@ashyamala
Copy link

@wajda Do you still feel that Spline is still on track to support user-defined RDD lineage or any kind of RDD lineage within the 0.6 release or before the end of the year?

@wajda
Copy link
Contributor

wajda commented Jun 5, 2020

@ashyamala, it's still on the road map, the demand for this feature is growing. But apparently it won't fit into 0.6, as we've got plenty of stuff to do in 0.6 already.

@wajda
Copy link
Contributor

wajda commented Jun 5, 2020

End of the year - I'd say very likely.
Or, of course if anybody from the community could help us with that it could be released earlier.

@wajda
Copy link
Contributor

wajda commented Mar 4, 2021

It didn't make it to 0.6. It doesn't seem to be a priority so far...

@wajda wajda added this to the 1.1.0 milestone Jun 22, 2021
@elymberopoulos
Copy link

Hello, I'm just wondering what the state of this issue is? Is it actively in progress?

@wajda
Copy link
Contributor

wajda commented Oct 28, 2021

No, it's not a priority at the moment, but is still on the road map.

@cerveada cerveada self-assigned this Jul 13, 2022
cerveada added a commit that referenced this issue Sep 2, 2022
- temp switch to Scala 2.12
cerveada added a commit that referenced this issue Sep 2, 2022
- add another builder branch for processing RDDs
- add another plugin type for RDD reads
- add leaf finding capabilities to LineageWalker
- add test for RDD lineages
cerveada added a commit that referenced this issue Sep 2, 2022
- add another builder branch for processing RDDs
- add another plugin type for RDD reads
- add leaf finding capabilities to LineageWalker
- add test for RDD lineages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
Development

No branches or pull requests

9 participants