mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-08 07:23:34 +00:00
fix(frontend): Extract lastModified field from downstream/upstream aspect (#1672)
This commit is contained in:
parent
fe3494c955
commit
0114d14ff9
@ -36,7 +36,7 @@ public class LineageDao {
|
||||
.collect(Collectors.toSet()));
|
||||
|
||||
return upstreamArray.stream()
|
||||
.map(us -> toLineageView(datasets.get(us.getDataset()), us.getType().name(), us.getAuditStamp().getActor().toString()))
|
||||
.map(us -> toLineageView(datasets.get(us.getDataset()), us.getType().name(), us.getAuditStamp()))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ public class LineageDao {
|
||||
.collect(Collectors.toSet()));
|
||||
|
||||
return downstreamArray.stream()
|
||||
.map(ds -> toLineageView(datasets.get(ds.getDataset()), ds.getType().name(), ds.getAuditStamp().getActor().toString()))
|
||||
.map(ds -> toLineageView(datasets.get(ds.getDataset()), ds.getType().name(), ds.getAuditStamp()))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package com.linkedin.datahub.util;
|
||||
|
||||
import com.linkedin.common.AuditStamp;
|
||||
import com.linkedin.common.urn.DatasetUrn;
|
||||
import com.linkedin.datahub.models.view.DatasetView;
|
||||
import com.linkedin.datahub.models.view.LineageView;
|
||||
@ -79,15 +80,18 @@ public class DatasetUtil {
|
||||
* for the dataset in the lineage response
|
||||
* @param dataset dataset
|
||||
* @param lineageType type of lineage
|
||||
* @param actor lineage actor
|
||||
* @param auditStamp audit stamp
|
||||
* @return LineageView
|
||||
*/
|
||||
public static LineageView toLineageView(Dataset dataset, String lineageType, String actor) {
|
||||
public static LineageView toLineageView(Dataset dataset, String lineageType, AuditStamp auditStamp) {
|
||||
LineageView view = new LineageView();
|
||||
|
||||
view.setDataset(toDatasetView(dataset));
|
||||
DatasetView datasetView = toDatasetView(dataset);
|
||||
datasetView.setModifiedTime(auditStamp.getTime());
|
||||
|
||||
view.setDataset(datasetView);
|
||||
view.setType(lineageType);
|
||||
view.setActor(actor);
|
||||
view.setActor(auditStamp.getActor().toString());
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user