0.9.8.10
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
home
doug
src
hypertable
src
cc
Hypertable
Master
GcWorker.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
22
#ifndef HYPERTABLE_GCWORKER_H
23
#define HYPERTABLE_GCWORKER_H
24
25
#include <
Hypertable/Master/Context.h
>
26
27
#include <
Hypertable/Lib/Client.h
>
28
29
#include <
Common/CstrHashMap.h
>
30
31
namespace
Hypertable
{
32
33
typedef
CstrHashMap<int>
CountMap
;
// filename -> reference count
34
35
class
GcWorker
{
36
public
:
37
GcWorker
(
ContextPtr
&context);
38
void
gc
();
39
40
private
:
41
void
scan_metadata
(CountMap &files_map);
42
void
delete_row
(
const
std::string &row,
TableMutatorPtr
&mutator);
43
void
delete_cell
(
const
Cell
&cell,
TableMutatorPtr
&mutator);
44
void
insert_files
(CountMap &map,
const
char
*buf,
size_t
len,
int
c=0);
45
void
insert_file
(CountMap &map,
const
char
*fname,
int
c);
46
void
reap
(CountMap &files_map);
47
48
ContextPtr
m_context
;
49
String
m_tables_dir
;
50
};
51
52
}
// namespace Hypertable
53
54
#endif // HYPERTABLE_GCWORKER_H
Hypertable::GcWorker::delete_cell
void delete_cell(const Cell &cell, TableMutatorPtr &mutator)
Definition:
GcWorker.cc:135
Hypertable::String
std::string String
A String is simply a typedef to std::string.
Definition:
String.h:44
Hypertable::GcWorker::m_context
ContextPtr m_context
Definition:
GcWorker.h:48
Hypertable::GcWorker
Definition:
GcWorker.h:35
Hypertable::CstrHashMap
A hash map for storing and lookup char * strings efficiently.
Definition:
CstrHashMap.h:44
Hypertable::GcWorker::GcWorker
GcWorker(ContextPtr &context)
Definition:
GcWorker.cc:35
Client.h
Hypertable::GcWorker::reap
void reap(CountMap &files_map)
Currently only stale cs files and range directories are reaped Table directories probably should be o...
Definition:
GcWorker.cc:178
Hypertable::GcWorker::m_tables_dir
String m_tables_dir
Definition:
GcWorker.h:49
Hypertable::ContextPtr
std::shared_ptr< Context > ContextPtr
Smart pointer to Context.
Definition:
Context.h:265
Hypertable::TableMutatorPtr
std::shared_ptr< TableMutator > TableMutatorPtr
Smart pointer to TableMutator.
Definition:
TableMutator.h:257
Hypertable
Hypertable definitions
Definition:
ApplicationHandler.h:36
Hypertable::GcWorker::scan_metadata
void scan_metadata(CountMap &files_map)
Definition:
GcWorker.cc:54
Hypertable::GcWorker::gc
void gc()
Definition:
GcWorker.cc:41
CstrHashMap.h
HashMap optimized for char * strings.
Hypertable::GcWorker::delete_row
void delete_row(const std::string &row, TableMutatorPtr &mutator)
Definition:
GcWorker.cc:120
Hypertable::Cell
Encapsulates decomposed key and value.
Definition:
Cell.h:32
Hypertable::CountMap
CstrHashMap< int > CountMap
Definition:
GcWorker.h:33
Context.h
Declarations for Context.
Hypertable::GcWorker::insert_files
void insert_files(CountMap &map, const char *buf, size_t len, int c=0)
Definition:
GcWorker.cc:146
Hypertable::GcWorker::insert_file
void insert_file(CountMap &map, const char *fname, int c)
Definition:
GcWorker.cc:163
Generated on Tue Dec 22 2015 18:43:13 for Hypertable by
1.8.8