Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
path-builder.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 
16 #ifndef IMPALA_UTIL_PATH_BUILDER_H
17 #define IMPALA_UTIL_PATH_BUILDER_H
18 
19 #include <string>
20 
21 namespace impala {
22 
24 class PathBuilder {
25  public:
27  static void GetFullPath(const std::string& path, std::string* full_path);
28 
30  static void GetFullBuildPath(const std::string& path, std::string* full_path);
31 
32  private:
34  static const char* impala_home_;
35 
37  static void LoadImpalaHome();
38 };
39 
40 }
41 
42 #endif
43 
string path("/usr/lib/sasl2:/usr/lib64/sasl2:/usr/local/lib/sasl2:/usr/lib/x86_64-linux-gnu/sasl2")
static void GetFullBuildPath(const std::string &path, std::string *full_path)
Sets full_path to <IMPALA_HOME>/<build><debug or="" release>="">/path.
Definition: path-builder.cc:38
static void LoadImpalaHome()
Load impala_home_ if it is not already loaded.
Definition: path-builder.cc:26
static void GetFullPath(const std::string &path, std::string *full_path)
Sets full_path to <IMPALA_HOME>/path.
Definition: path-builder.cc:31
static const char * impala_home_
Cache of env['IMPALA_HOME'].
Definition: path-builder.h:34
Utility class to construct full paths relative to the impala_home path.
Definition: path-builder.h:24