0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
KeySpec.cc
Go to the documentation of this file.
1 
21 #include "Common/Compat.h"
22 #include "Common/Logger.h"
23 #include "KeySpec.h"
24 
25 namespace Hypertable {
26 
27  std::ostream &operator<<(std::ostream &os, const KeySpec &cell) {
28  os <<"{KeySpec:";
29 
30  HT_DUMP_CSTR(os, key, cell.row);
31  HT_DUMP_CSTR(os, cf, cell.column_family);
32  HT_DUMP_CSTR(os, cq, cell.column_qualifier);
33 
34  if (cell.flag == FLAG_DELETE_ROW)
35  os << " flag=DELETE_ROW";
36  else if (cell.flag == FLAG_DELETE_COLUMN_FAMILY)
37  os << " flag=DELETE_COLUMN_FAMILY";
38  else if (cell.flag == FLAG_DELETE_CELL)
39  os << " flag=DELETE_CELL";
40  else if (cell.flag == FLAG_DELETE_CELL_VERSION)
41  os << " flag=DELETE_CELL_VERSION";
42  else if (cell.flag == FLAG_INSERT)
43  os << " flag=INSERT";
44  else
45  os << " flag=" << cell.flag << " (unrecognized)";
46 
47  if (cell.timestamp == TIMESTAMP_AUTO)
48  os <<" ts=AUTO";
49  else if (cell.timestamp == TIMESTAMP_NULL)
50  os <<" ts=NULL";
51  else if (cell.timestamp == TIMESTAMP_MIN)
52  os <<" ts=MIN";
53  else if (cell.timestamp == TIMESTAMP_MAX)
54  os <<" ts=MAX";
55  else
56  os << " ts=" << cell.timestamp;
57  os <<'}';
58  return os;
59  }
60 
61 }
62 
63 
int64_t timestamp
Definition: KeySpec.h:130
static const uint32_t FLAG_DELETE_ROW
Definition: KeySpec.h:40
static const uint32_t FLAG_INSERT
Definition: KeySpec.h:47
const char * column_qualifier
Definition: KeySpec.h:128
static const uint32_t FLAG_DELETE_CELL
Definition: KeySpec.h:42
const void * row
Definition: KeySpec.h:125
static const uint32_t FLAG_DELETE_COLUMN_FAMILY
Definition: KeySpec.h:41
static const int64_t TIMESTAMP_MIN
Definition: KeySpec.h:34
Logging routines and macros.
Compatibility Macros for C/C++.
#define HT_DUMP_CSTR(_os_, _label_, _str_)
Definition: Logger.h:227
std::ostream & operator<<(std::ostream &os, const crontab_entry &entry)
Helper function to write crontab_entry to an ostream.
Definition: Crontab.cc:301
static const int64_t TIMESTAMP_NULL
Definition: KeySpec.h:36
Hypertable definitions
static const int64_t TIMESTAMP_MAX
Definition: KeySpec.h:35
static const int64_t TIMESTAMP_AUTO
Definition: KeySpec.h:37
const char * column_family
Definition: KeySpec.h:127
static const uint32_t FLAG_DELETE_CELL_VERSION
Definition: KeySpec.h:43