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
RangeServer
Request
Handler
TableMaintenanceEnable.cc
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
#include <
Common/Compat.h
>
29
30
#include "
TableMaintenanceEnable.h
"
31
32
#include <
Hypertable/RangeServer/RangeServer.h
>
33
34
#include <
Hypertable/Lib/RangeServer/Request/Parameters/TableMaintenanceEnable.h
>
35
36
#include <
AsyncComm/ResponseCallback.h
>
37
38
#include <
Common/Error.h
>
39
#include <
Common/Logger.h
>
40
41
using namespace
Hypertable
;
42
using namespace
Hypertable::Apps
;
43
using namespace
Hypertable::RangeServer::Request::Handler
;
44
45
void
TableMaintenanceEnable::run() {
46
ResponseCallback
cb(m_comm, m_event);
47
48
try
{
49
const
uint8_t *ptr = m_event->payload;
50
size_t
remain = m_event->payload_len;
51
Lib::RangeServer::Request::Parameters::TableMaintenanceEnable
params;
52
params.
decode
(&ptr, &remain);
53
m_range_server->table_maintenance_enable(&cb, params.
table
());
54
}
55
catch
(
Exception
&e) {
56
HT_ERROR_OUT
<< e <<
HT_END
;
57
cb.
error
(e.
code
(), e.what());
58
}
59
}
Hypertable::RangeServer::Request::Handler
Definition:
AcknowledgeLoad.h:33
RangeServer.h
Declarations for RangeServer.
TableMaintenanceEnable.h
Declarations for TableMaintenanceEnable request parameters.
Logger.h
Logging routines and macros.
Compat.h
Compatibility Macros for C/C++.
HT_END
#define HT_END
Definition:
Logger.h:220
HT_ERROR_OUT
#define HT_ERROR_OUT
Definition:
Logger.h:301
Hypertable::Serializable::decode
virtual void decode(const uint8_t **bufp, size_t *remainp)
Reads serialized representation of object from a buffer.
Definition:
Serializable.cc:70
Hypertable::ResponseCallback
This class is used to generate and deliver standard responses back to a client.
Definition:
ResponseCallback.h:46
Hypertable
Hypertable definitions
Definition:
ApplicationHandler.h:36
Hypertable::ResponseCallback::error
virtual int error(int error, const String &msg)
Sends a standard error response back to the client.
Definition:
ResponseCallback.cc:42
Hypertable::Exception
This is a generic exception class for Hypertable.
Definition:
Error.h:314
Hypertable::Lib::RangeServer::Request::Parameters::TableMaintenanceEnable::table
const TableIdentifier & table()
Gets table identifier.
Definition:
TableMaintenanceEnable.h:65
ResponseCallback.h
Declarations for ResponseCallback.
Error.h
Error codes, Exception handling, error logging.
Hypertable::Lib::RangeServer::Request::Parameters::TableMaintenanceEnable
Request parameters for table maintenance enable function.
Definition:
TableMaintenanceEnable.h:51
Hypertable::Apps
Definition:
GroupCommitTimerHandler.h:34
Hypertable::Exception::code
int code() const
Returns the error code.
Definition:
Error.h:391
Generated on Tue Dec 22 2015 18:43:12 for Hypertable by
1.8.8