0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
CellStoreScannerIntervalBlockIndex.h
Go to the documentation of this file.
1 /* -*- c++ -*-
2  * Copyright (C) 2007-2015 Hypertable, Inc.
3  *
4  * This file is part of Hypertable.
5  *
6  * Hypertable is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; version 3 of the
9  * License, or any later version.
10  *
11  * Hypertable is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  * 02110-1301, USA.
20  */
21 
27 
28 #ifndef Hypertable_RangeServer_CellStoreScannerIntervalBlockIndex_h
29 #define Hypertable_RangeServer_CellStoreScannerIntervalBlockIndex_h
30 
34 
35 #include <Common/DynamicBuffer.h>
36 
37 namespace Hypertable {
38 
40 
43 
46  template <typename IndexT>
48  public:
49 
50  typedef typename IndexT::iterator IndexIteratorT;
51 
52  CellStoreScannerIntervalBlockIndex(CellStorePtr &cellstore, IndexT *index,
53  SerializedKey start_key, SerializedKey end_key, ScanContext *scan_ctx);
55  virtual void forward();
56  virtual bool get(Key &key, ByteString &value);
57 
58  private:
59 
60  bool fetch_next_block(bool eob=false);
61 
63  IndexT *m_index {};
64  IndexIteratorT m_iter;
65  BlockInfo m_block;
71  const char * m_end_row {};
75  int32_t m_fd {-1};
76  bool m_cached {};
78  int m_file_id {};
81  };
82 
84 }
85 
86 #endif // Hypertable_RangeServer_CellStoreScannerIntervalBlockIndex_h
Scan context information.
Definition: ScanContext.h:52
A dynamic, resizable and reference counted memory buffer.
Definition: DynamicBuffer.h:42
A class managing one or more serializable ByteStrings.
Definition: ByteString.h:47
Declarations for CellStore.
A dynamic, resizable memory buffer.
Declarations for ScanContext.
std::set< const char *, LtCstr, CstrAlloc > CstrRowSet
Definition: ScanContext.h:75
std::shared_ptr< CellStore > CellStorePtr
Smart pointer to CellStore.
Definition: CellStore.h:340
Hypertable definitions
Provides the ability to scan over a portion of a cell store using its block index.
Provides access to internal components of opaque key.
Definition: Key.h:40
CellStoreScannerIntervalBlockIndex(CellStorePtr &cellstore, IndexT *index, SerializedKey start_key, SerializedKey end_key, ScanContext *scan_ctx)
bool fetch_next_block(bool eob=false)
This method fetches the 'next' compressed block of key/value pairs from the underlying CellStore...
Abstract base class for block compression codecs.