Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Storage
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OSDU
OSDU Data Platform
System
Storage
Commits
b8afe52c
Commit
b8afe52c
authored
1 year ago
by
Konrad Krasnodebski
Browse files
Options
Downloads
Patches
Plain Diff
Change Record variable name
parent
fbdc56f1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!841
Draft: Update version of default branch to 0.26.0-SNAPSHOT
,
!796
Update persistablereference by UnitOfMeasureID
Pipeline
#231423
failed
1 year ago
Stage: review
Stage: build
Stage: coverage
Stage: containerize
Stage: scan
Stage: deploy
Stage: integration
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
storage-core/src/main/java/org/opengroup/osdu/storage/conversion/DpsConversionService.java
+10
-10
10 additions, 10 deletions
...engroup/osdu/storage/conversion/DpsConversionService.java
with
10 additions
and
10 deletions
storage-core/src/main/java/org/opengroup/osdu/storage/conversion/DpsConversionService.java
+
10
−
10
View file @
b8afe52c
...
...
@@ -233,8 +233,8 @@ public class DpsConversionService {
private
void
updatePersistableReference
(
List
<
ConversionRecord
>
conversionRecords
)
{
for
(
ConversionRecord
conversionRecord
:
conversionRecords
)
{
JsonObject
record
=
conversionRecord
.
getRecordJsonObject
();
JsonArray
metaArray
=
record
.
getAsJsonArray
(
Constants
.
META
);
JsonObject
record
Obj
=
conversionRecord
.
getRecordJsonObject
();
JsonArray
metaArray
=
record
Obj
.
getAsJsonArray
(
Constants
.
META
);
if
(
metaArray
==
null
)
{
return
;
}
...
...
@@ -260,12 +260,12 @@ public class DpsConversionService {
}
private
Record
getRecordFromCache
(
String
recordId
)
{
Record
record
=
null
;
Record
record
Obj
=
null
;
if
(
this
.
cache
!=
null
)
{
String
cacheKey
=
this
.
getCacheKey
(
this
.
headers
.
getPartitionId
(),
recordId
);
record
=
this
.
cache
.
get
(
cacheKey
);
record
Obj
=
this
.
cache
.
get
(
cacheKey
);
}
return
record
;
return
record
Obj
;
}
private
void
putRecordToCache
(
String
recordId
,
Record
record
)
{
...
...
@@ -276,22 +276,22 @@ public class DpsConversionService {
}
private
String
getPersistableReferenceByUnitOfMeasureID
(
String
unitOfMeasureID
)
{
Record
record
=
this
.
getRecordFromCache
(
unitOfMeasureID
);
if
(
record
==
null
)
{
Record
record
Obj
=
this
.
getRecordFromCache
(
unitOfMeasureID
);
if
(
record
Obj
==
null
)
{
String
blob
=
this
.
queryService
.
getRecordInfo
(
unitOfMeasureID
,
null
,
null
);
if
(
blob
==
null
)
{
this
.
logger
.
warning
(
String
.
format
(
"Wrong unitOfMeasureID provided: %s"
,
unitOfMeasureID
));
return
""
;
}
try
{
record
=
objectMapper
.
readValue
(
blob
,
Record
.
class
);
record
Obj
=
objectMapper
.
readValue
(
blob
,
Record
.
class
);
}
catch
(
JsonProcessingException
e
)
{
this
.
logger
.
error
(
String
.
format
(
"Error occured during parsing record for unitOfMeasureID: %s"
,
unitOfMeasureID
),
e
);
return
""
;
}
this
.
putRecordToCache
(
unitOfMeasureID
,
record
);
this
.
putRecordToCache
(
unitOfMeasureID
,
record
Obj
);
}
Map
<
String
,
Object
>
recordData
=
record
.
getData
();
Map
<
String
,
Object
>
recordData
=
record
Obj
.
getData
();
if
(
recordData
==
null
)
{
return
""
;
}
...
...
This diff is collapsed.
Click to expand it.
Konrad Krasnodebski
@konradkrasno
mentioned in commit
b5f4150e
·
1 year ago
mentioned in commit
b5f4150e
mentioned in commit b5f4150eb6780992cb80832e67197322df884e91
Toggle commit list
Mateusz Ruszczyk
@mruszczyk
mentioned in commit
e5e0ce37
·
9 months ago
mentioned in commit
e5e0ce37
mentioned in commit e5e0ce374f1e50dbb433341adf0b9e2522ce2f04
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment