2021-07-02 11:40:16 +08:00
|
|
|
import logging
|
|
|
|
from milvus_benchmark.env.base import BaseEnv
|
|
|
|
|
|
|
|
logger = logging.getLogger("milvus_benchmark.env.local")
|
|
|
|
|
|
|
|
|
|
|
|
class LocalEnv(BaseEnv):
|
|
|
|
"""docker env class wrapper"""
|
2021-10-06 21:04:26 +08:00
|
|
|
""" The current method of using the deployed Kubernetes environment to call """
|
2021-07-02 11:40:16 +08:00
|
|
|
env_mode = "local"
|
|
|
|
|
|
|
|
def __init__(self, deploy_mode=None):
|
|
|
|
super(LocalEnv, self).__init__(deploy_mode)
|
|
|
|
|
|
|
|
def start_up(self, hostname, port):
|
|
|
|
res = True
|
|
|
|
try:
|
|
|
|
self.set_hostname(hostname)
|
2021-10-08 17:49:13 +08:00
|
|
|
self.set_port(port)
|
2021-07-02 11:40:16 +08:00
|
|
|
except Exception as e:
|
|
|
|
logger.error(str(e))
|
|
|
|
res = False
|
|
|
|
return res
|