libfoedus-core
FOEDUS Core Library
snapshot_options.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014-2015, Hewlett-Packard Development Company, LP.
3  * This program is free software; you can redistribute it and/or modify it
4  * under the terms of the GNU General Public License as published by the Free
5  * Software Foundation; either version 2 of the License, or (at your option)
6  * any later version.
7  *
8  * This program is distributed in the hope that it will be useful, but WITHOUT
9  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11  * more details. You should have received a copy of the GNU General Public
12  * License along with this program; if not, write to the Free Software
13  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
14  *
15  * HP designates this particular file as subject to the "Classpath" exception
16  * as provided by HP in the LICENSE.txt file that accompanied this code.
17  */
18 #ifndef FOEDUS_SNAPSHOT_SNAPSHOT_OPTIONS_HPP_
19 #define FOEDUS_SNAPSHOT_SNAPSHOT_OPTIONS_HPP_
20 #include <string>
21 #include <vector>
22 
23 #include "foedus/cxx11.hpp"
26 #include "foedus/fs/filesystem.hpp"
27 
28 namespace foedus {
29 namespace snapshot {
36  enum Constants {
46  };
47 
52 
68 
75 
81 
88 
96 
104 
116 
121 
128 
137 
145 
148 
150  std::string convert_folder_path_pattern(int node) const;
151 
153  std::string construct_snapshot_file_path(int snapshot_id, int node) const;
154 
159  std::string get_primary_folder_path() const {
160  return convert_folder_path_pattern(0);
161  }
162 
164 };
165 } // namespace snapshot
166 } // namespace foedus
167 #endif // FOEDUS_SNAPSHOT_SNAPSHOT_OPTIONS_HPP_
Represents an object that can be written to and read from files/bytes in XML format.
uint32_t snapshot_writer_page_pool_size_mb_
The size in MB of one snapshot writer, which holds data pages modified in the snapshot and them seque...
Root package of FOEDUS (Fast Optimistic Engine for Data Unification Services).
Definition: assert_nd.hpp:44
foedus::fs::DeviceEmulationOptions emulation_
Settings to emulate slower data device.
#define EXTERNALIZABLE(clazz)
Macro to declare/define essential methods for an externalizable class.
SnapshotOptions()
Constructs option values with default values.
uint32_t log_mapper_bucket_kb_
The size in KB of bucket (buffer for each partition) in mapper.
bool log_mapper_sort_before_send_
Whether to sort logs in mapper side before sending it to reducer.
uint16_t log_mapper_io_buffer_mb_
The size in MB of IO buffer to read log files in mapper.
uint32_t snapshot_interval_milliseconds_
Interval in milliseconds to take snapshots.
uint32_t log_reducer_read_io_buffer_kb_
The size in KB of a buffer in reducer to read one temporary file.
#define CXX11_FINAL
Used in public headers in place of "final" of C++11.
Definition: cxx11.hpp:131
Set of options for snapshot manager.
std::string construct_snapshot_file_path(int snapshot_id, int node) const
'folder_path'/snapshot_'snapshot-id'node'node-id'.data.
uint32_t log_reducer_buffer_mb_
The size in MB of a buffer to store log entries in reducer (partition).
Set of configurations to emulate slower devices for some experiments.
fs::FixedPath folder_path_pattern_
String pattern of path of snapshot folders in each NUMA node.
uint32_t log_reducer_dump_io_buffer_mb_
The size in MB of a buffer to write out sorted log entries in reducer to a temporary file...
std::string get_primary_folder_path() const
Returns the path of first node, which is also used as the primary place to write out global files...
uint32_t snapshot_writer_intermediate_pool_size_mb_
The size in MB of additional page pool for one snapshot writer just for holding intermediate pages...
std::string convert_folder_path_pattern(int node) const
converts folder_path_pattern_ into a string with the given node.
uint16_t snapshot_trigger_page_pool_percent_
When the main page pool runs under this percent (roughly calculated) of free pages, snapshot manager starts snapshotting to drop volatile pages even before the interval.