+0
-48
lines changedFilter options
+0
-48
lines changed Original file line number Diff line number Diff line change
@@ -1225,24 +1225,6 @@ def _target_type_from_refresh_args(keyspace, table, usertype, function, aggregat
1225
1225
return SchemaTargetType.KEYSPACE
1226
1226
return None
1227
1227
1228
-
def submit_schema_refresh(self, keyspace=None, table=None, usertype=None, function=None, aggregate=None):
1229
-
"""
1230
-
.. deprecated:: 2.6.0
1231
-
Use refresh_*_metadata instead
1232
-
1233
-
Schedule a refresh of the internal representation of the current
1234
-
schema for this cluster. See :meth:`~.refresh_schema` for description of parameters.
1235
-
"""
1236
-
msg = "submit_schema_refresh is deprecated. Use Cluster.refresh_*_metadata instead."
1237
-
warnings.warn(msg, DeprecationWarning)
1238
-
log.warning(msg)
1239
-
1240
-
self._validate_refresh_schema(keyspace, table, usertype, function, aggregate)
1241
-
target_type = self._target_type_from_refresh_args(keyspace, table, usertype, function, aggregate)
1242
-
return self.executor.submit(
1243
-
self.control_connection.refresh_schema, target_type=target_type, keyspace=keyspace, table=table,
1244
-
type=usertype, function=function, aggregate=aggregate)
1245
-
1246
1228
def refresh_schema_metadata(self, max_schema_agreement_wait=None):
1247
1229
"""
1248
1230
Synchronously refresh all schema metadata.
Original file line number Diff line number Diff line change
@@ -254,32 +254,6 @@ def test_cluster_settings(self):
254
254
cluster.set_max_connections_per_host(HostDistance.LOCAL, max_connections_per_host + 1)
255
255
self.assertEqual(cluster.get_max_connections_per_host(HostDistance.LOCAL), max_connections_per_host + 1)
256
256
257
-
def test_submit_schema_refresh(self):
258
-
"""
259
-
Ensure new new schema is refreshed after submit_schema_refresh()
260
-
"""
261
-
262
-
cluster = Cluster(protocol_version=PROTOCOL_VERSION)
263
-
cluster.connect()
264
-
self.assertNotIn("newkeyspace", cluster.metadata.keyspaces)
265
-
266
-
other_cluster = Cluster(protocol_version=PROTOCOL_VERSION)
267
-
session = other_cluster.connect()
268
-
execute_until_pass(session,
269
-
"""
270
-
CREATE KEYSPACE newkeyspace
271
-
WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'}
272
-
""")
273
-
274
-
future = cluster.submit_schema_refresh()
275
-
future.result()
276
-
277
-
self.assertIn("newkeyspace", cluster.metadata.keyspaces)
278
-
279
-
execute_until_pass(session, "DROP KEYSPACE newkeyspace")
280
-
cluster.shutdown()
281
-
other_cluster.shutdown()
282
-
283
257
def test_refresh_schema(self):
284
258
cluster = Cluster(protocol_version=PROTOCOL_VERSION)
285
259
session = cluster.connect()
@@ -605,10 +579,6 @@ def test_pool_management(self):
605
579
cluster.refresh_schema_metadata()
606
580
cluster.refresh_schema_metadata(max_schema_agreement_wait=0)
607
581
608
-
# submit schema refresh
609
-
future = cluster.submit_schema_refresh()
610
-
future.result()
611
-
612
582
assert_quiescent_pool_state(self, cluster)
613
583
614
584
cluster.shutdown()
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4