Skip to content
Open
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 @@ -190,7 +190,7 @@ public Response getContainers(
.map(container -> {
ContainerMetadata containerMetadata =
new ContainerMetadata(container.getContainerID());
containerMetadata.setNumberOfKeys(container.getNumberOfKeys());
containerMetadata.setNumberOfBlocks(container.getNumberOfKeys());
return containerMetadata;
})
.collect(Collectors.toList());
Expand Down Expand Up @@ -546,7 +546,7 @@ public Response getSCMDeletedContainers(
DeletedContainerInfo deletedContainerInfo = new DeletedContainerInfo();
deletedContainerInfo.setContainerID(containerInfo.getContainerID());
deletedContainerInfo.setPipelineID(containerInfo.getPipelineID());
deletedContainerInfo.setNumberOfKeys(containerInfo.getNumberOfKeys());
deletedContainerInfo.setNumberOfBlocks(containerInfo.getNumberOfKeys());
deletedContainerInfo.setContainerState(containerInfo.getState().name());
deletedContainerInfo.setStateEnterTime(
containerInfo.getStateEnterTime().toEpochMilli());
Expand Down Expand Up @@ -657,8 +657,8 @@ public Response getContainerMisMatchInsights(
ContainerDiscrepancyInfo containerDiscrepancyInfo =
new ContainerDiscrepancyInfo();
containerDiscrepancyInfo.setContainerID(nonSCMContainer.getContainerID());
containerDiscrepancyInfo.setNumberOfKeys(
nonSCMContainer.getNumberOfKeys());
containerDiscrepancyInfo.setNumberOfBlocks(
nonSCMContainer.getNumberOfBlocks());
containerDiscrepancyInfo.setPipelines(
nonSCMContainer.getPipelines());
containerDiscrepancyInfo.setExistsAt("OM");
Expand Down Expand Up @@ -688,7 +688,7 @@ public Response getContainerMisMatchInsights(
nonOMContainers.forEach(containerInfo -> {
ContainerDiscrepancyInfo containerDiscrepancyInfo = new ContainerDiscrepancyInfo();
containerDiscrepancyInfo.setContainerID(containerInfo.getContainerID());
containerDiscrepancyInfo.setNumberOfKeys(0);
containerDiscrepancyInfo.setNumberOfBlocks(0);
List<Pipeline> pipelines = new ArrayList<>();
PipelineID pipelineID = null;
try {
Expand Down Expand Up @@ -742,7 +742,7 @@ public Response getContainerMisMatchInsights(
* [
* {
* "containerId": 2,
* "numberOfKeys": 2,
* "numberOfBlocks": 2,
* "pipelines": []
* }
* ]
Expand Down Expand Up @@ -792,7 +792,7 @@ public Response getOmContainersDeletedInSCM(
containerDiscrepancyInfoList = omContainersDeletedInSCM.stream().map(containerMetadataEntry -> {
ContainerDiscrepancyInfo containerDiscrepancyInfo = new ContainerDiscrepancyInfo();
containerDiscrepancyInfo.setContainerID(containerMetadataEntry.getContainerID());
containerDiscrepancyInfo.setNumberOfKeys(containerMetadataEntry.getNumberOfKeys());
containerDiscrepancyInfo.setNumberOfBlocks(containerMetadataEntry.getNumberOfBlocks());
containerDiscrepancyInfo.setPipelines(containerMetadataEntry.getPipelines());
return containerDiscrepancyInfo;
}).collect(Collectors.toList());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public class ContainerDiscrepancyInfo {
@JsonProperty("containerId")
private long containerID;

@JsonProperty("numberOfKeys")
private long numberOfKeys;
@JsonProperty("numberOfBlocks")
private long numberOfBlocks;

@JsonProperty("pipelines")
private List<Pipeline> pipelines;
Expand All @@ -52,12 +52,12 @@ public void setContainerID(long containerID) {
this.containerID = containerID;
}

public long getNumberOfKeys() {
return numberOfKeys;
public long getNumberOfBlocks() {
return numberOfBlocks;
}

public void setNumberOfKeys(long numberOfKeys) {
this.numberOfKeys = numberOfKeys;
public void setNumberOfBlocks(long numberOfBlocks) {
this.numberOfBlocks = numberOfBlocks;
}

public List<Pipeline> getPipelines() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public class ContainerMetadata {
@XmlElement(name = "ContainerID")
private long containerID;

@XmlElement(name = "NumberOfKeys")
private long numberOfKeys;
@XmlElement(name = "NumberOfBlocks")
private long numberOfBlocks;

@JsonProperty("pipelines")
private List<Pipeline> pipelines;
Expand All @@ -51,12 +51,12 @@ public void setContainerID(long containerID) {
this.containerID = containerID;
}

public long getNumberOfKeys() {
return numberOfKeys;
public long getNumberOfBlocks() {
return numberOfBlocks;
}

public void setNumberOfKeys(long numberOfKeys) {
this.numberOfKeys = numberOfKeys;
public void setNumberOfBlocks(long numberOfBlocks) {
this.numberOfBlocks = numberOfBlocks;
}

public List<Pipeline> getPipelines() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ public class DeletedContainerInfo {
@JsonInclude(JsonInclude.Include.NON_NULL)
private PipelineID pipelineID;

@JsonProperty("numberOfKeys")
@JsonProperty("numberOfBlocks")
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
private long numberOfKeys;
private long numberOfBlocks;

@JsonProperty("containerState")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
Expand Down Expand Up @@ -83,12 +83,12 @@ public void setPipelineID(PipelineID pipelineID) {
this.pipelineID = pipelineID;
}

public long getNumberOfKeys() {
return numberOfKeys;
public long getNumberOfBlocks() {
return numberOfBlocks;
}

public void setNumberOfKeys(long numberOfKeys) {
this.numberOfKeys = numberOfKeys;
public void setNumberOfBlocks(long numberOfBlocks) {
this.numberOfBlocks = numberOfBlocks;
}

public String getContainerState() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ public ContainerMetadata next() {
ContainerMetadata containerMetadata = new ContainerMetadata(currentKey.getKey().getContainerId());
do {
ContainerKeyPrefix containerKeyPrefix = this.currentKey.getKey();
containerMetadata.setNumberOfKeys(containerMetadata.getNumberOfKeys() + 1);
containerMetadata.setNumberOfBlocks(containerMetadata.getNumberOfBlocks() + 1);
getPipelines(containerKeyPrefix).forEach(pipeline -> {
pipelines.putIfAbsent(pipeline.getId(), pipeline);
});
Expand Down
Loading