-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NIFI-13563: Updated Provenance Repository so that instead of returnin…
…g the single latest event for a component, we return the events from the latest invocation / session. Added system tests to verify the behavior. Also, when replaying latest event, attempt all of those events until one succeeds or all fail Signed-off-by: Matt Burgess <mattyb149@apache.org> This closes #9095
- Loading branch information
Showing
24 changed files
with
510 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
...t-dto/src/main/java/org/apache/nifi/web/api/dto/provenance/LatestProvenanceEventsDTO.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.nifi.web.api.dto.provenance; | ||
|
||
import jakarta.xml.bind.annotation.XmlType; | ||
|
||
import java.util.List; | ||
|
||
@XmlType(name = "latestProvenanceEvents") | ||
public class LatestProvenanceEventsDTO { | ||
private String componentId; | ||
private List<ProvenanceEventDTO> provenanceEvents; | ||
|
||
/** | ||
* @return the ID of the component whose latest events were fetched | ||
*/ | ||
public String getComponentId() { | ||
return componentId; | ||
} | ||
|
||
public void setComponentId(final String componentId) { | ||
this.componentId = componentId; | ||
} | ||
|
||
/** | ||
* @return the latest provenance events that were recorded for the associated component | ||
*/ | ||
public List<ProvenanceEventDTO> getProvenanceEvents() { | ||
return provenanceEvents; | ||
} | ||
|
||
public void setProvenanceEvents(final List<ProvenanceEventDTO> provenanceEvents) { | ||
this.provenanceEvents = provenanceEvents; | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
...client-dto/src/main/java/org/apache/nifi/web/api/entity/LatestProvenanceEventsEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.nifi.web.api.entity; | ||
|
||
import jakarta.xml.bind.annotation.XmlRootElement; | ||
import org.apache.nifi.web.api.dto.provenance.LatestProvenanceEventsDTO; | ||
|
||
@XmlRootElement(name = "latestProvenanceEventsEntity") | ||
public class LatestProvenanceEventsEntity extends Entity { | ||
private LatestProvenanceEventsDTO latestProvenanceEvents; | ||
|
||
/** | ||
* @return latest provenance events | ||
*/ | ||
public LatestProvenanceEventsDTO getLatestProvenanceEvents() { | ||
return latestProvenanceEvents; | ||
} | ||
|
||
public void setLatestProvenanceEvents(LatestProvenanceEventsDTO latestProvenanceEvents) { | ||
this.latestProvenanceEvents = latestProvenanceEvents; | ||
} | ||
} |
Oops, something went wrong.