0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
PseudoTables.cc
Go to the documentation of this file.
1 /*
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 
28 #include <Common/Compat.h>
29 
30 #include "PseudoTables.h"
31 
32 #include <cstring>
33 
34 using namespace Hypertable;
35 using namespace std;
36 
39 
40 namespace {
41 
42  const char *cellstore_index_schema_str =
43  "<Schema generation=\"1\">\n"
44  " <AccessGroup name=\"default\">\n"
45  " <ColumnFamily id=\"1\">\n"
46  " <Generation>1</Generation>\n"
47  " <Name>Size</Name>\n"
48  " </ColumnFamily>\n"
49  " <ColumnFamily id=\"2\">\n"
50  " <Generation>1</Generation>\n"
51  " <Name>CompressedSize</Name>\n"
52  " </ColumnFamily>\n"
53  " <ColumnFamily id=\"3\">\n"
54  " <Generation>1</Generation>\n"
55  " <Name>KeyCount</Name>\n"
56  " </ColumnFamily>\n"
57  " </AccessGroup>\n"
58  "</Schema>\n";
59 }
60 
62  cellstore_index = Schema::new_instance(cellstore_index_schema_str);
63 }
64 
66 }
static std::mutex mutex
Definition: Logger.cc:43
Type declarations for PseudoTables class.
STL namespace.
Singleton class holding Schema objects for pseudo tables.
Definition: PseudoTables.h:43
Compatibility Macros for C/C++.
~PseudoTables()
Destructor (private).
Definition: PseudoTables.cc:65
Hypertable definitions
static Schema * new_instance(const std::string &buf)
Creates schema object from XML schema string.
Definition: Schema.cc:202
PseudoTables()
Constructor (private).
Definition: PseudoTables.cc:61
static std::mutex ms_mutex
Mutex for serializing access to ms_instance.
Definition: PseudoTables.h:97
static PseudoTables * ms_instance
Pointer to singleton instance of this class.
Definition: PseudoTables.h:94