File tree 1 file changed +4
-1
lines changed
src/main/java/org/elasticsearch/repositories/cos
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 7
7
import com .qcloud .cos .region .Region ;
8
8
import org .elasticsearch .ElasticsearchException ;
9
9
import org .elasticsearch .cluster .metadata .RepositoryMetaData ;
10
+ import org .elasticsearch .common .Strings ;
10
11
import org .elasticsearch .common .component .AbstractLifecycleComponent ;
11
12
import org .elasticsearch .common .settings .Settings ;
12
13
import org .elasticsearch .common .unit .ByteSizeUnit ;
@@ -32,7 +33,9 @@ private synchronized COSClient createClient(RepositoryMetaData metaData) {
32
33
33
34
COSCredentials cred = new BasicCOSCredentials (access_key_id , access_key_secret );
34
35
ClientConfig clientConfig = new ClientConfig (new Region (region ));
35
- clientConfig .setEndPointSuffix (endPoint );
36
+ if (Strings .hasLength (endPoint )) {
37
+ clientConfig .setEndPointSuffix (endPoint );
38
+ }
36
39
COSClient client = new COSClient (cred , clientConfig );
37
40
38
41
return client ;
You can’t perform that action at this time.
0 commit comments