Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
System
Storage
Commits
34bbf55b
Commit
34bbf55b
authored
Sep 15, 2021
by
neelesh thakur
Browse files
refactor
parent
9b9bc1db
Pipeline
#65760
passed with stages
in 43 minutes and 44 seconds
Changes
6
Pipelines
3
Expand all
Hide whitespace changes
Inline
Side-by-side
NOTICE
View file @
34bbf55b
This diff is collapsed.
Click to expand it.
provider/storage-aws/pom.xml
View file @
34bbf55b
...
...
@@ -58,7 +58,7 @@
<dependency>
<groupId>
org.opengroup.osdu.core.aws
</groupId>
<artifactId>
os-core-lib-aws
</artifactId>
<version>
0.11.0
-SNAPSHOT
</version>
<version>
0.11.0
</version>
</dependency>
<dependency>
<groupId>
org.opengroup.osdu
</groupId>
...
...
provider/storage-azure/src/main/java/org/opengroup/osdu/storage/provider/azure/util/Global
Cosmos
ExceptionMapper.java
→
provider/storage-azure/src/main/java/org/opengroup/osdu/storage/provider/azure/util/Global
Azure
ExceptionMapper.java
View file @
34bbf55b
// Copyright © Schlumberger
//
// Licensed 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.opengroup.osdu.storage.provider.azure.util
;
import
com.azure.cosmos.implementation.RequestRateTooLargeException
;
...
...
@@ -9,11 +23,11 @@ import org.springframework.web.bind.annotation.ControllerAdvice;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
@ControllerAdvice
public
class
Global
Cosmos
ExceptionMapper
{
public
class
Global
Azure
ExceptionMapper
{
private
GlobalExceptionMapper
mapper
;
public
Global
Cosmos
ExceptionMapper
(
GlobalExceptionMapper
mapper
)
{
public
Global
Azure
ExceptionMapper
(
GlobalExceptionMapper
mapper
)
{
this
.
mapper
=
mapper
;
}
...
...
@@ -21,7 +35,7 @@ public class GlobalCosmosExceptionMapper {
protected
ResponseEntity
<
Object
>
handleCosmosdbException
(
Exception
e
)
{
return
mapper
.
getErrorResponse
(
new
AppException
(
HttpStatus
.
SERVICE_UNAVAILABLE
.
value
(),
"Too many requests on cosmosdb."
,
e
.
getMessage
()
,
e
));
"Request rate is large. Please retry this request later"
,
e
));
}
}
...
...
provider/storage-azure/src/test/java/org/opengroup/osdu/storage/provider/azure/util/Global
Cosmos
ExceptionMapperTest.java
→
provider/storage-azure/src/test/java/org/opengroup/osdu/storage/provider/azure/util/Global
Azure
ExceptionMapperTest.java
View file @
34bbf55b
// Copyright © Schlumberger
//
// Licensed 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.opengroup.osdu.storage.provider.azure.util
;
import
com.azure.cosmos.implementation.RequestRateTooLargeException
;
...
...
@@ -18,10 +32,10 @@ import static org.mockito.Mockito.when;
import
static
org
.
springframework
.
http
.
HttpStatus
.
SERVICE_UNAVAILABLE
;
@RunWith
(
MockitoJUnitRunner
.
class
)
public
class
Global
Cosmos
ExceptionMapperTest
{
public
class
Global
Azure
ExceptionMapperTest
{
@InjectMocks
private
Global
Cosmos
ExceptionMapper
sut
;
private
Global
Azure
ExceptionMapper
sut
;
@Mock
private
GlobalExceptionMapper
mapper
;
...
...
provider/storage-gcp/pom.xml
View file @
34bbf55b
...
...
@@ -41,7 +41,7 @@
<dependency>
<groupId>
org.opengroup.osdu
</groupId>
<artifactId>
core-lib-gcp
</artifactId>
<version>
0.11.0
-SNAPSHOT
</version>
<version>
0.11.0
</version>
</dependency>
<dependency>
...
...
provider/storage-reference/pom.xml
View file @
34bbf55b
...
...
@@ -90,7 +90,7 @@
<dependency>
<groupId>
org.opengroup.osdu
</groupId>
<artifactId>
core-lib-gcp
</artifactId>
<version>
0.11.0
-SNAPSHOT
</version>
<version>
0.11.0
</version>
</dependency>
</dependencies>
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment