本文整理匯總了Python中pyesgf.search.connection.SearchConnection.get_shard_list方法的典型用法代碼示例。如果您正苦於以下問題:Python SearchConnection.get_shard_list方法的具體用法?Python SearchConnection.get_shard_list怎麽用?Python SearchConnection.get_shard_list使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pyesgf.search.connection.SearchConnection
的用法示例。
在下文中一共展示了SearchConnection.get_shard_list方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_get_shard_list
# 需要導入模塊: from pyesgf.search.connection import SearchConnection [as 別名]
# 或者: from pyesgf.search.connection.SearchConnection import get_shard_list [as 別名]
def test_get_shard_list():
conn = SearchConnection(TEST_SERVICE, distrib=True)
shards = conn.get_shard_list()
#!NOTE: the exact shard list will change depending on the shard replication configuration
# on the test server
assert 'esgf-index2.ceda.ac.uk' in shards
# IPSL now replicates all non-local shards. Just check it has a few shards
assert len(shards['esgf-index2.ceda.ac.uk']) > 3
示例2: test_get_shard_list
# 需要導入模塊: from pyesgf.search.connection import SearchConnection [as 別名]
# 或者: from pyesgf.search.connection.SearchConnection import get_shard_list [as 別名]
def test_get_shard_list():
conn = SearchConnection(TEST_SERVICE, distrib=True)
shards = conn.get_shard_list()
assert 'localhost:8983/solr/datasets' in shards
assert 'pcmdi11.llnl.gov:8983/solr/datasets' in shards