Commit a97fc97d authored by harshit aggarwal's avatar harshit aggarwal
Browse files

minor fix

parent a9b77e5b
Pipeline #18066 failed with stages
in 2 minutes and 5 seconds
......@@ -8,6 +8,7 @@ import org.opengroup.osdu.wks.model.RelationshipStatus;
import java.sql.Timestamp;
import java.util.List;
import java.util.Set;
import java.util.UUID;
@Getter
@AllArgsConstructor
......@@ -24,7 +25,7 @@ public class RelationshipStatusDoc {
private Timestamp lastModified;
public RelationshipStatusDoc(RelationshipStatus relationshipStatus) {
this.id = relationshipStatus.getRawRecordId();
this.id = UUID.randomUUID().toString();
this.rawRecordId = relationshipStatus.getRawRecordId();
this.rawRecordVersion = relationshipStatus.getRawRecordVersion();
this.mappingId = relationshipStatus.getMappingId();
......
......@@ -71,13 +71,14 @@ public class MappingStoreImpl implements MappingStore {
public List<MappingsModel> getMappingFilesFromStorage(List<MappingInfo> mappingsDocList) {
List<MappingsModel> mappingsList = new ArrayList<>();
ObjectMapper mapper = new ObjectMapper();
for (MappingInfo mappingInfoDoc : mappingsDocList) {
try {
String content = blobStore.readFromStorageContainer(
requestIdentity.getDataPartitionId(),
mappingInfoDoc.getFileName(),
azureBootstrapConfig.containerName());
ObjectMapper mapper = new ObjectMapper();
mappingsList.add(mapper.readValue(content, MappingsModel.class));
} catch (Exception e) {
LOGGER.error("Error while processing mappings from blob store {}", e.getMessage());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment