MCPcopy Create free account
hub / github.com/4paradigm/OpenMLDB / CheckJava

Function CheckJava

tools/deploy.py:72–81  ·  view source on GitHub ↗
(host)

Source from the content-addressed store, hash-verified

70 print("execute cmd[{}] success".format(cmd))
71
72def CheckJava(host):
73 (prefix, suffix, is_local) = GetPrefixAndSuffix(host)
74 cmd = "{} java -version {}".format(prefix, suffix)
75 (returncode,output,errout) = RunWithRetunCode(cmd)
76 if returncode != 0:
77 print("execute cmd[{}] failed! error msg: {}".format(cmd, errout))
78 return False
79 if output.find("java: command not found") != -1 or errout.find("java: command not found") != -1:
80 return False
81 return True
82
83def DeployJava(host, path, source_file, teardown):
84 (prefix, suffix, is_local) = GetPrefixAndSuffix(host)

Callers 1

DeployZookeeperFunction · 0.85

Calls 2

GetPrefixAndSuffixFunction · 0.85
RunWithRetunCodeFunction · 0.85

Tested by

no test coverage detected