Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
os-info.h
Go to the documentation of this file.
1 // Copyright 2012 Cloudera Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef IMPALA_UTIL_OS_INFO_H
16 #define IMPALA_UTIL_OS_INFO_H
17 
18 #include <string>
19 #include "common/logging.h"
20 
21 namespace impala {
22 
24 class OsInfo {
25  public:
27  static void Init();
28 
29  static const std::string os_version() {
30  DCHECK(initialized_);
31  return os_version_;
32  }
33 
34  static std::string DebugString();
35 
36  private:
37  static bool initialized_;
38  static std::string os_version_;
39 };
40 
41 }
42 #endif
static void Init()
Initialize OsInfo.
Definition: os-info.cc:32
static std::string os_version_
Definition: os-info.h:38
static bool initialized_
Definition: os-info.h:37
Provides information about the OS we're running on.
Definition: os-info.h:24
static std::string DebugString()
Definition: os-info.cc:41
static const std::string os_version()
Definition: os-info.h:29