Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
Indexer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
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
Indexer
Commits
a026129a
Commit
a026129a
authored
4 years ago
by
ethiraj krishnamanaidu
Browse files
Options
Downloads
Patches
Plain Diff
Fixed IBM build issue
parent
242b0ac8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1
ado-codemerge and removed slb reference
Pipeline
#1157
failed
4 years ago
Stage: build
Stage: test
Stage: deploy
Stage: verify
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
testing/indexer-test-ibm/src/test/java/org/opengroup/osdu/util/ElasticUtilsIBM.java
+28
-26
28 additions, 26 deletions
...rc/test/java/org/opengroup/osdu/util/ElasticUtilsIBM.java
with
28 additions
and
26 deletions
testing/indexer-test-ibm/src/test/java/org/opengroup/osdu/util/ElasticUtilsIBM.java
+
28
−
26
View file @
a026129a
...
@@ -40,16 +40,15 @@ import lombok.extern.java.Log;
...
@@ -40,16 +40,15 @@ import lombok.extern.java.Log;
*/
*/
@Log
@Log
public
class
ElasticUtilsIBM
extends
ElasticUtils
{
public
class
ElasticUtilsIBM
extends
ElasticUtils
{
private
static
final
int
REST_CLIENT_CONNECT_TIMEOUT
=
5000
;
private
static
final
int
REST_CLIENT_CONNECT_TIMEOUT
=
5000
;
private
static
final
int
REST_CLIENT_SOCKET_TIMEOUT
=
60000
;
private
static
final
int
REST_CLIENT_SOCKET_TIMEOUT
=
60000
;
private
static
final
int
REST_CLIENT_RETRY_TIMEOUT
=
60000
;
private
static
final
int
REST_CLIENT_RETRY_TIMEOUT
=
60000
;
public
ElasticUtilsIBM
()
{
public
ElasticUtilsIBM
()
{
super
();
super
();
}
}
@Override
protected
RestHighLevelClient
createClient
(
String
username
,
String
password
,
String
host
)
{
protected
RestHighLevelClient
createClient
(
String
username
,
String
password
,
String
host
)
{
RestHighLevelClient
restHighLevelClient
;
RestHighLevelClient
restHighLevelClient
;
...
@@ -70,29 +69,33 @@ public class ElasticUtilsIBM extends ElasticUtils {
...
@@ -70,29 +69,33 @@ public class ElasticUtilsIBM extends ElasticUtils {
new
BasicHeader
(
"xpack.security.transport.ssl.enabled"
,
Boolean
.
toString
(
true
)),
new
BasicHeader
(
"xpack.security.transport.ssl.enabled"
,
Boolean
.
toString
(
true
)),
new
BasicHeader
(
"Authorization"
,
String
.
format
(
"Basic %s"
,
Base64
.
getEncoder
().
encodeToString
(
rawString
.
getBytes
()))),
new
BasicHeader
(
"Authorization"
,
String
.
format
(
"Basic %s"
,
Base64
.
getEncoder
().
encodeToString
(
rawString
.
getBytes
()))),
};
};
SSLContext
sslContext
=
SSLContext
.
getInstance
(
"SSL"
);
SSLContext
sslContext
=
SSLContext
.
getInstance
(
"SSL"
);
// set up a TrustManager that trusts everything
// set up a TrustManager that trusts everything
sslContext
.
init
(
null
,
new
TrustManager
[]
{
new
X509TrustManager
()
{
sslContext
.
init
(
null
,
new
TrustManager
[]{
new
X509TrustManager
()
{
public
X509Certificate
[]
getAcceptedIssuers
()
{
public
X509Certificate
[]
getAcceptedIssuers
()
{
return
null
;
return
null
;
}
}
public
void
checkClientTrusted
(
X509Certificate
[]
certs
,
String
authType
)
{
}
public
void
checkServerTrusted
(
X509Certificate
[]
certs
,
String
authType
)
{
}
public
void
checkClientTrusted
(
X509Certificate
[]
certs
,
String
authType
)
{
}
},
new
SecureRandom
());
}
builder
.
setHttpClientConfigCallback
(
new
HttpClientConfigCallback
()
{
public
void
checkServerTrusted
(
X509Certificate
[]
certs
,
String
authType
)
{
@Override
}
public
HttpAsyncClientBuilder
customizeHttpClient
(
}},
new
SecureRandom
());
HttpAsyncClientBuilder
httpClientBuilder
)
{
return
httpClientBuilder
builder
.
setHttpClientConfigCallback
(
new
HttpClientConfigCallback
()
{
.
setHostnameVerifier
(
SSLSocketFactory
.
ALLOW_ALL_HOSTNAME_VERIFIER
)
.
setSSLContext
(
sslContext
);
public
HttpAsyncClientBuilder
customizeHttpClient
(
}
HttpAsyncClientBuilder
httpClientBuilder
)
{
})
return
httpClientBuilder
.
setDefaultHeaders
(
defaultHeaders
);
.
setHostnameVerifier
(
SSLSocketFactory
.
ALLOW_ALL_HOSTNAME_VERIFIER
)
.
setSSLContext
(
sslContext
);
}
})
.
setDefaultHeaders
(
defaultHeaders
);
restHighLevelClient
=
new
RestHighLevelClient
(
builder
);
restHighLevelClient
=
new
RestHighLevelClient
(
builder
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -100,5 +103,4 @@ public class ElasticUtilsIBM extends ElasticUtils {
...
@@ -100,5 +103,4 @@ public class ElasticUtilsIBM extends ElasticUtils {
}
}
return
restHighLevelClient
;
return
restHighLevelClient
;
}
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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