0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
OperationRecreateIndexTables.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 
26 
27 #ifndef Hypertable_Master_OperationRecreateIndexTables_h
28 #define Hypertable_Master_OperationRecreateIndexTables_h
29 
30 #include "Operation.h"
31 
34 
35 #include <Common/String.h>
36 
37 namespace Hypertable {
38 
41 
44  public:
45 
54  OperationRecreateIndexTables(ContextPtr &context, std::string name,
55  TableParts parts);
56 
62 
69 
72 
74  void execute() override;
75 
79  const String name() override;
80 
83  const String label() override;
84 
87  void display_state(std::ostream &os) override;
88 
91  uint8_t encoding_version_state() const override;
92 
98  size_t encoded_length_state() const override;
99 
117  void encode_state(uint8_t **bufp) const override;
118 
128  void decode_state(uint8_t version, const uint8_t **bufp, size_t *remainp) override;
129 
130  void decode_state_old(uint8_t version, const uint8_t **bufp, size_t *remainp) override;
131 
132  private:
133 
134  bool fetch_schema(std::string &schema);
135 
138 
141 
142  };
143 
145 
146 } // namespace Hypertable
147 
148 #endif // Hypertable_Master_OperationRecreateIndexTables_h
void display_state(std::ostream &os) override
Writes human readable representation of object to output stream.
std::string String
A String is simply a typedef to std::string.
Definition: String.h:44
Declarations for Operation.
std::shared_ptr< Event > EventPtr
Smart pointer to Event.
Definition: Event.h:228
EntityHeader header
Entity header
Represents a set of table parts (sub-tables).
Definition: TableParts.h:47
std::shared_ptr< Context > ContextPtr
Smart pointer to Context.
Definition: Context.h:265
const String label() override
Returns descriptive label for operation.
void execute() override
Carries out recreate index tables operation.
Reconstructs a table's index tables.
Request parameters for recreate index tables operation.
Lib::Master::Request::Parameters::RecreateIndexTables m_params
Request parmaeters.
void decode_state_old(uint8_t version, const uint8_t **bufp, size_t *remainp) override
uint8_t encoding_version_state() const override
Returns encoding version of serialization format.
Hypertable definitions
Declarations for RecreateIndexTables request parameters.
const String name() override
Returns name of operation.
void encode_state(uint8_t **bufp) const override
Writes serialized encoding of object state.
void decode_state(uint8_t version, const uint8_t **bufp, size_t *remainp) override
Reads serialized encoding of object state.
Abstract base class for master operations.
Definition: Operation.h:124
A String class based on std::string.
size_t encoded_length_state() const override
Returns serialized state length.
OperationRecreateIndexTables(ContextPtr &context, std::string name, TableParts parts)
Constructor.
Declarations for TableParts.