mirror of https://github.com/apache/nifi.git
NIFI-12775: Renamed provenance/FileResource to ProvenanceFileResource
This closes #8392. Signed-off-by: Peter Turcsanyi <turcsanyi@apache.org>
This commit is contained in:
parent
b6b0b241c3
commit
bf86103abf
|
@ -20,10 +20,10 @@ package org.apache.nifi.provenance;
|
|||
* Holds information of a file resource for UPLOAD
|
||||
* provenance events.
|
||||
*/
|
||||
public record FileResource(String location, long size) {
|
||||
public record ProvenanceFileResource(String location, long size) {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "FileResource[location=%s, size=%d]".formatted(location, size);
|
||||
return "ProvenanceFileResource[location=%s, size=%d]".formatted(location, size);
|
||||
}
|
||||
}
|
|
@ -330,7 +330,7 @@ public interface ProvenanceReporter {
|
|||
* events to an external Enterprise-wide system that is then able to
|
||||
* correlate the SEND and RECEIVE events.
|
||||
*/
|
||||
void upload(FlowFile flowFile, FileResource fileResource, String transitUri);
|
||||
void upload(FlowFile flowFile, ProvenanceFileResource fileResource, String transitUri);
|
||||
|
||||
/**
|
||||
* Emits a Provenance Event of type {@link ProvenanceEventType#UPLOAD UPLOAD}
|
||||
|
@ -355,7 +355,7 @@ public interface ProvenanceReporter {
|
|||
* ProvenanceReporter is associated is rolled back. Otherwise, the Event
|
||||
* will be recorded only on a successful session commit.
|
||||
*/
|
||||
void upload(FlowFile flowFile, FileResource fileResource, String transitUri, String details, long transmissionMillis, boolean force);
|
||||
void upload(FlowFile flowFile, ProvenanceFileResource fileResource, String transitUri, String details, long transmissionMillis, boolean force);
|
||||
|
||||
/**
|
||||
* Emits a Provenance Event of type {@link ProvenanceEventType#REMOTE_INVOCATION}
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.apache.nifi.provenance.ProvenanceEventRecord;
|
|||
import org.apache.nifi.provenance.ProvenanceEventType;
|
||||
import org.apache.nifi.provenance.ProvenanceReporter;
|
||||
import org.apache.nifi.provenance.StandardProvenanceEventRecord;
|
||||
import org.apache.nifi.provenance.FileResource;
|
||||
import org.apache.nifi.provenance.ProvenanceFileResource;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -228,13 +228,13 @@ public class MockProvenanceReporter implements ProvenanceReporter {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void upload(final FlowFile flowFile, final FileResource fileResource, final String transitUri) {
|
||||
public void upload(final FlowFile flowFile, final ProvenanceFileResource fileResource, final String transitUri) {
|
||||
upload(flowFile, fileResource, transitUri, null, -1L, true);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void upload(FlowFile flowFile, FileResource fileResource, String transitUri, String details, long transmissionMillis, boolean force) {
|
||||
public void upload(FlowFile flowFile, ProvenanceFileResource fileResource, String transitUri, String details, long transmissionMillis, boolean force) {
|
||||
try {
|
||||
final String fileResourceDetails = fileResource.toString();
|
||||
final String enrichedDetails = details == null ? fileResourceDetails : details + " " + fileResourceDetails;
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.apache.nifi.provenance.ProvenanceEventBuilder;
|
|||
import org.apache.nifi.provenance.ProvenanceEventRecord;
|
||||
import org.apache.nifi.provenance.ProvenanceEventRepository;
|
||||
import org.apache.nifi.provenance.ProvenanceEventType;
|
||||
import org.apache.nifi.provenance.FileResource;
|
||||
import org.apache.nifi.provenance.ProvenanceFileResource;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -282,12 +282,12 @@ public class StandardProvenanceReporter implements InternalProvenanceReporter {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void upload(final FlowFile flowFile, final FileResource fileResource, final String transitUri) {
|
||||
public void upload(final FlowFile flowFile, final ProvenanceFileResource fileResource, final String transitUri) {
|
||||
upload(flowFile, fileResource, transitUri, null, -1L, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void upload(final FlowFile flowFile, final FileResource fileResource, final String transitUri, final String details, final long transmissionMillis, final boolean force) {
|
||||
public void upload(final FlowFile flowFile, final ProvenanceFileResource fileResource, final String transitUri, final String details, final long transmissionMillis, final boolean force) {
|
||||
try {
|
||||
final String fileResourceDetails = fileResource.toString();
|
||||
final String enrichedDetails = details == null ? fileResourceDetails : details + " " + fileResourceDetails;
|
||||
|
|
Loading…
Reference in New Issue