Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
hdfs-lzo-text-scanner.h
Go to the documentation of this file.
1 // Copyright (c) 2012 Cloudera, Inc. All rights reserved.
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_EXEC_HDFS_LZO_TEXT_SCANNER_H
16 #define IMPALA_EXEC_HDFS_LZO_TEXT_SCANNER_H
17 
18 #include <common/status.h>
19 #include <exec/scan-node.h>
20 #include <exec/hdfs-scanner.h>
21 #include <exec/hdfs-scan-node.h>
22 #include <boost/thread/locks.hpp>
23 
24 namespace impala {
25 
32  public:
33  static HdfsScanner* GetHdfsLzoTextScanner(HdfsScanNode* scan_node, RuntimeState* state);
34  static Status IssueInitialRanges(HdfsScanNode* scan_node,
35  const std::vector<HdfsFileDesc*>& files);
36 
37  private:
39  const static std::string LIB_IMPALA_LZO;
40 
43 
45  static boost::mutex lzo_load_lock_;
46 
48  static HdfsScanner* (*CreateLzoTextScanner)
49  (HdfsScanNode* scan_node, RuntimeState* state);
50 
53  HdfsScanNode* scan_node, const std::vector<HdfsFileDesc*>& files);
54 
57  static Status LoadLzoLibrary();
58 };
59 }
60 #endif
static boost::mutex lzo_load_lock_
Lock to protect loading of the lzo file library.
static Status(* LzoIssueInitialRanges)(HdfsScanNode *scan_node, const std::vector< HdfsFileDesc * > &files)
Dynamically linked function to set the initial scan ranges.
static HdfsScanner * GetHdfsLzoTextScanner(HdfsScanNode *scan_node, RuntimeState *state)
static Status IssueInitialRanges(HdfsScanNode *scan_node, const std::vector< HdfsFileDesc * > &files)
static Status library_load_status_
If non-OK, then we have tried and failed to load the LZO library.
static const std::string LIB_IMPALA_LZO
Impala LZO library name – GPL code.