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

ImlCopy: metadata -> step #1415

Merged
merged 2 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public static CompilationStepGraph compileSteps(String sourceId, String targetId

CopySpacePost postCopySpace = new CopySpacePost().withSpaceId(targetSpaceId)
.withJobId(jobId)
.withTargetType(targetType);
.withOutputMetadata(Map.of(targetType, targetSpaceId));

startGraph.addExecution(postCopySpace);

Expand All @@ -141,7 +141,7 @@ public CompilationStepGraph compile(Job job) {
job.getId(),
((DatasetDescription.Space<?>) job.getSource()).getFilters(),
((DatasetDescription.Space<?>) job.getSource()).getVersionRef(),
job.getTarget().getClass().getSimpleName() );
"Space" );

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ public class CopySpacePost extends SpaceBasedStep<CopySpacePost> {
@JsonView({Internal.class, Static.class})
private long copiedByteSize = 0;

@JsonView({Internal.class, Static.class})
private String targetType = "Space";

public long getCopiedByteSize() {
return copiedByteSize;
}
Expand All @@ -99,20 +96,6 @@ public long getFetchedVersion() {
return fetchedVersion;
}

public String getTargetType() {
return targetType;
}

public void setTargetType(String targetType) {
this.targetType = targetType;
}

public CopySpacePost withTargetType(String targetType) {
setTargetType( targetType );
return this;
}


@Override
public List<Load> getNeededResources() {
try {
Expand Down Expand Up @@ -203,7 +186,6 @@ public void execute() throws Exception {
infoLog(STEP_EXECUTE, this,String.format("Get stats for version %d - %s", fetchedVersion, getSpaceId() ));

FeatureStatistics statistics = getCopiedFeatures(fetchedVersion);
statistics.withMetadata( getTargetType(), getSpaceId() ); // key = [Layer(iml)|Space(xyz)]

infoLog(STEP_EXECUTE, this,"Job Statistics: bytes=" + statistics.getByteSize() + " rows=" + statistics.getFeatureCount());
registerOutputs(List.of(statistics), true);
Expand Down
Loading