File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
src/config/common/cfgm_common/datastore/drivers Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 32
32
33
33
34
34
DEFAULT_CQL_PORT = 9042
35
+ DEFAULT_THRIFT_PORT = 9160
35
36
36
37
# Properties passed to the column familly
37
38
TABLE_PROPERTIES = {
@@ -360,6 +361,18 @@ def _Init_Cluster(self):
360
361
except ValueError :
361
362
endpoints .append (address )
362
363
364
+ # Best-effort to support upgrade from thrift to cql
365
+ if port == DEFAULT_THRIFT_PORT :
366
+ self .options .logger (
367
+ "Usage of thrift port '{}' detected for CQL driver. "
368
+ "Please consider fixing port number. Trying "
369
+ "best-effort by switching to default port for "
370
+ "CQL '{}'." .format (
371
+ DEFAULT_THRIFT_PORT ,
372
+ DEFAULT_CQL_PORT ),
373
+ level = SandeshLevel .SYS_WARN )
374
+ port = None
375
+
363
376
connector .ProtocolVersion .SUPPORTED_VERSIONS = self .ProtocolVersions
364
377
try :
365
378
self ._cluster = connector .cluster .Cluster (
You can’t perform that action at this time.
0 commit comments