MCPcopy Create free account
hub / github.com/baidu/tera / GetLocalHostName

Function GetLocalHostName

src/utils/utils_cmd.cc:129–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129std::string GetLocalHostName() {
130 char str[kMaxHostNameSize + 1];
131 if (0 != gethostname(str, kMaxHostNameSize + 1)) {
132 LOG(FATAL) << "gethostname fail";
133 exit(1);
134 }
135 std::string hostname(str);
136 return hostname;
137}
138
139void SetupLog(const std::string& name) {
140 // log info/warning/error/fatal to tera.log

Callers 6

RowlockClientMethod · 0.85
TimeoracleEntryMethod · 0.85
MasterImplMethod · 0.85
TabletNodeImplMethod · 0.85
InitMethod · 0.85
InitMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected