From 0ef6cb0ecb96e93e54b6e4b777e43dc1657057f8 Mon Sep 17 00:00:00 2001 From: weizijun Date: Thu, 14 Dec 2023 11:33:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81searcher=E5=90=AF=E5=8A=A8?= =?UTF-8?q?=E6=97=B6=E4=B8=8D=E5=8A=A0=E8=BD=BDtarget=EF=BC=8C=E7=94=B1fed?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/bin/havenask-command/general_search_starter.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/elastic-fed/distribution/src/bin/havenask-command/general_search_starter.py b/elastic-fed/distribution/src/bin/havenask-command/general_search_starter.py index b5e0fc42..d5c51bae 100755 --- a/elastic-fed/distribution/src/bin/havenask-command/general_search_starter.py +++ b/elastic-fed/distribution/src/bin/havenask-command/general_search_starter.py @@ -165,6 +165,7 @@ def addOptions(self): self.parser.add_option('', '--enablePublishTableTopoInfo', action='store_true', dest='enablePublishTableTopoInfo', default=False) self.parser.add_option('', '--force_tablet_load', action='store_true', dest='forceTabletLoad', default=False) self.parser.add_option('', '--qrsLoadTarget', action='store_true', dest='qrsLoadTarget', default=False) + self.parser.add_option('', '--searcherLoadTarget', action='store_true', dest='searcherLoadTarget', default=False) def parseParams(self, optionList): self.optionList = optionList @@ -247,6 +248,8 @@ def initMember(self, options): else: self.offlineConfigPath = os.path.join(self.offlineConfigPath, str(tableVersions[-1])) + self.qrsLoadTarget = options.qrsLoadTarget + self.searcherLoadTarget = options.searcherLoadTarget self.httpBindPort = options.httpBindPort self.arpcBindPort = options.arpcBindPort self.grpcBindPort = options.grpcBindPort @@ -387,7 +390,7 @@ def start_once(self): if len(zoneNames) > 1: return -1, ("", "local access mode only support one zone, now zone names " + str(zoneNames), -1) - if not self.enableLocalAccess: + if not self.enableLocalAccess and self.searcherLoadTarget: ret = self.loadSearcherTarget(searcherTargetInfos, terminator.left_time()) if ret != 0: return ret, ("", "load searcher target failed", -1)