00001
00006 #ifndef Hbase_TYPES_H
00007 #define Hbase_TYPES_H
00008
00009 #include <stdint.h>
00010 #include <Thrift.h>
00011 #include <TApplicationException.h>
00012 #include <protocol/TProtocol.h>
00013 #include <transport/TTransport.h>
00014
00015
00016
00017 namespace apache { namespace hadoop { namespace hbase { namespace thrift {
00018
00019 typedef std::string Text;
00020
00021 typedef std::string Bytes;
00022
00023 typedef int32_t ScannerID;
00024
00025 typedef struct _TCell__isset {
00026 _TCell__isset() : value(false), timestamp(false) {}
00027 bool value;
00028 bool timestamp;
00029 } _TCell__isset;
00030
00031 class TCell {
00032 public:
00033
00034 static const char* ascii_fingerprint;
00035 static const uint8_t binary_fingerprint[16];
00036
00037 TCell() : value(""), timestamp(0) {
00038 }
00039
00040 virtual ~TCell() throw() {}
00041
00042 Bytes value;
00043 int64_t timestamp;
00044
00045 _TCell__isset __isset;
00046
00047 void __set_value(const Bytes& val) {
00048 value = val;
00049 }
00050
00051 void __set_timestamp(const int64_t val) {
00052 timestamp = val;
00053 }
00054
00055 bool operator == (const TCell & rhs) const
00056 {
00057 if (!(value == rhs.value))
00058 return false;
00059 if (!(timestamp == rhs.timestamp))
00060 return false;
00061 return true;
00062 }
00063 bool operator != (const TCell &rhs) const {
00064 return !(*this == rhs);
00065 }
00066
00067 bool operator < (const TCell & ) const;
00068
00069 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00070 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00071
00072 };
00073
00074 typedef struct _ColumnDescriptor__isset {
00075 _ColumnDescriptor__isset() : name(false), maxVersions(false), compression(false), inMemory(false), bloomFilterType(false), bloomFilterVectorSize(false), bloomFilterNbHashes(false), blockCacheEnabled(false), timeToLive(false) {}
00076 bool name;
00077 bool maxVersions;
00078 bool compression;
00079 bool inMemory;
00080 bool bloomFilterType;
00081 bool bloomFilterVectorSize;
00082 bool bloomFilterNbHashes;
00083 bool blockCacheEnabled;
00084 bool timeToLive;
00085 } _ColumnDescriptor__isset;
00086
00087 class ColumnDescriptor {
00088 public:
00089
00090 static const char* ascii_fingerprint;
00091 static const uint8_t binary_fingerprint[16];
00092
00093 ColumnDescriptor() : name(""), maxVersions(3), compression("NONE"), inMemory(false), bloomFilterType("NONE"), bloomFilterVectorSize(0), bloomFilterNbHashes(0), blockCacheEnabled(false), timeToLive(-1) {
00094 }
00095
00096 virtual ~ColumnDescriptor() throw() {}
00097
00098 Text name;
00099 int32_t maxVersions;
00100 std::string compression;
00101 bool inMemory;
00102 std::string bloomFilterType;
00103 int32_t bloomFilterVectorSize;
00104 int32_t bloomFilterNbHashes;
00105 bool blockCacheEnabled;
00106 int32_t timeToLive;
00107
00108 _ColumnDescriptor__isset __isset;
00109
00110 void __set_name(const Text& val) {
00111 name = val;
00112 }
00113
00114 void __set_maxVersions(const int32_t val) {
00115 maxVersions = val;
00116 }
00117
00118 void __set_compression(const std::string& val) {
00119 compression = val;
00120 }
00121
00122 void __set_inMemory(const bool val) {
00123 inMemory = val;
00124 }
00125
00126 void __set_bloomFilterType(const std::string& val) {
00127 bloomFilterType = val;
00128 }
00129
00130 void __set_bloomFilterVectorSize(const int32_t val) {
00131 bloomFilterVectorSize = val;
00132 }
00133
00134 void __set_bloomFilterNbHashes(const int32_t val) {
00135 bloomFilterNbHashes = val;
00136 }
00137
00138 void __set_blockCacheEnabled(const bool val) {
00139 blockCacheEnabled = val;
00140 }
00141
00142 void __set_timeToLive(const int32_t val) {
00143 timeToLive = val;
00144 }
00145
00146 bool operator == (const ColumnDescriptor & rhs) const
00147 {
00148 if (!(name == rhs.name))
00149 return false;
00150 if (!(maxVersions == rhs.maxVersions))
00151 return false;
00152 if (!(compression == rhs.compression))
00153 return false;
00154 if (!(inMemory == rhs.inMemory))
00155 return false;
00156 if (!(bloomFilterType == rhs.bloomFilterType))
00157 return false;
00158 if (!(bloomFilterVectorSize == rhs.bloomFilterVectorSize))
00159 return false;
00160 if (!(bloomFilterNbHashes == rhs.bloomFilterNbHashes))
00161 return false;
00162 if (!(blockCacheEnabled == rhs.blockCacheEnabled))
00163 return false;
00164 if (!(timeToLive == rhs.timeToLive))
00165 return false;
00166 return true;
00167 }
00168 bool operator != (const ColumnDescriptor &rhs) const {
00169 return !(*this == rhs);
00170 }
00171
00172 bool operator < (const ColumnDescriptor & ) const;
00173
00174 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00175 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00176
00177 };
00178
00179 typedef struct _TRegionInfo__isset {
00180 _TRegionInfo__isset() : startKey(false), endKey(false), id(false), name(false), version(false), serverName(false), port(false) {}
00181 bool startKey;
00182 bool endKey;
00183 bool id;
00184 bool name;
00185 bool version;
00186 bool serverName;
00187 bool port;
00188 } _TRegionInfo__isset;
00189
00190 class TRegionInfo {
00191 public:
00192
00193 static const char* ascii_fingerprint;
00194 static const uint8_t binary_fingerprint[16];
00195
00196 TRegionInfo() : startKey(""), endKey(""), id(0), name(""), version(0), serverName(""), port(0) {
00197 }
00198
00199 virtual ~TRegionInfo() throw() {}
00200
00201 Text startKey;
00202 Text endKey;
00203 int64_t id;
00204 Text name;
00205 int8_t version;
00206 Text serverName;
00207 int32_t port;
00208
00209 _TRegionInfo__isset __isset;
00210
00211 void __set_startKey(const Text& val) {
00212 startKey = val;
00213 }
00214
00215 void __set_endKey(const Text& val) {
00216 endKey = val;
00217 }
00218
00219 void __set_id(const int64_t val) {
00220 id = val;
00221 }
00222
00223 void __set_name(const Text& val) {
00224 name = val;
00225 }
00226
00227 void __set_version(const int8_t val) {
00228 version = val;
00229 }
00230
00231 void __set_serverName(const Text& val) {
00232 serverName = val;
00233 }
00234
00235 void __set_port(const int32_t val) {
00236 port = val;
00237 }
00238
00239 bool operator == (const TRegionInfo & rhs) const
00240 {
00241 if (!(startKey == rhs.startKey))
00242 return false;
00243 if (!(endKey == rhs.endKey))
00244 return false;
00245 if (!(id == rhs.id))
00246 return false;
00247 if (!(name == rhs.name))
00248 return false;
00249 if (!(version == rhs.version))
00250 return false;
00251 if (!(serverName == rhs.serverName))
00252 return false;
00253 if (!(port == rhs.port))
00254 return false;
00255 return true;
00256 }
00257 bool operator != (const TRegionInfo &rhs) const {
00258 return !(*this == rhs);
00259 }
00260
00261 bool operator < (const TRegionInfo & ) const;
00262
00263 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00264 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00265
00266 };
00267
00268 typedef struct _Mutation__isset {
00269 _Mutation__isset() : isDelete(false), column(false), value(false) {}
00270 bool isDelete;
00271 bool column;
00272 bool value;
00273 } _Mutation__isset;
00274
00275 class Mutation {
00276 public:
00277
00278 static const char* ascii_fingerprint;
00279 static const uint8_t binary_fingerprint[16];
00280
00281 Mutation() : isDelete(false), column(""), value("") {
00282 }
00283
00284 virtual ~Mutation() throw() {}
00285
00286 bool isDelete;
00287 Text column;
00288 Text value;
00289
00290 _Mutation__isset __isset;
00291
00292 void __set_isDelete(const bool val) {
00293 isDelete = val;
00294 }
00295
00296 void __set_column(const Text& val) {
00297 column = val;
00298 }
00299
00300 void __set_value(const Text& val) {
00301 value = val;
00302 }
00303
00304 bool operator == (const Mutation & rhs) const
00305 {
00306 if (!(isDelete == rhs.isDelete))
00307 return false;
00308 if (!(column == rhs.column))
00309 return false;
00310 if (!(value == rhs.value))
00311 return false;
00312 return true;
00313 }
00314 bool operator != (const Mutation &rhs) const {
00315 return !(*this == rhs);
00316 }
00317
00318 bool operator < (const Mutation & ) const;
00319
00320 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00321 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00322
00323 };
00324
00325 typedef struct _BatchMutation__isset {
00326 _BatchMutation__isset() : row(false), mutations(false) {}
00327 bool row;
00328 bool mutations;
00329 } _BatchMutation__isset;
00330
00331 class BatchMutation {
00332 public:
00333
00334 static const char* ascii_fingerprint;
00335 static const uint8_t binary_fingerprint[16];
00336
00337 BatchMutation() : row("") {
00338 }
00339
00340 virtual ~BatchMutation() throw() {}
00341
00342 Text row;
00343 std::vector<Mutation> mutations;
00344
00345 _BatchMutation__isset __isset;
00346
00347 void __set_row(const Text& val) {
00348 row = val;
00349 }
00350
00351 void __set_mutations(const std::vector<Mutation> & val) {
00352 mutations = val;
00353 }
00354
00355 bool operator == (const BatchMutation & rhs) const
00356 {
00357 if (!(row == rhs.row))
00358 return false;
00359 if (!(mutations == rhs.mutations))
00360 return false;
00361 return true;
00362 }
00363 bool operator != (const BatchMutation &rhs) const {
00364 return !(*this == rhs);
00365 }
00366
00367 bool operator < (const BatchMutation & ) const;
00368
00369 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00370 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00371
00372 };
00373
00374 typedef struct _TRowResult__isset {
00375 _TRowResult__isset() : row(false), columns(false) {}
00376 bool row;
00377 bool columns;
00378 } _TRowResult__isset;
00379
00380 class TRowResult {
00381 public:
00382
00383 static const char* ascii_fingerprint;
00384 static const uint8_t binary_fingerprint[16];
00385
00386 TRowResult() : row("") {
00387 }
00388
00389 virtual ~TRowResult() throw() {}
00390
00391 Text row;
00392 std::map<Text, TCell> columns;
00393
00394 _TRowResult__isset __isset;
00395
00396 void __set_row(const Text& val) {
00397 row = val;
00398 }
00399
00400 void __set_columns(const std::map<Text, TCell> & val) {
00401 columns = val;
00402 }
00403
00404 bool operator == (const TRowResult & rhs) const
00405 {
00406 if (!(row == rhs.row))
00407 return false;
00408 if (!(columns == rhs.columns))
00409 return false;
00410 return true;
00411 }
00412 bool operator != (const TRowResult &rhs) const {
00413 return !(*this == rhs);
00414 }
00415
00416 bool operator < (const TRowResult & ) const;
00417
00418 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00419 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00420
00421 };
00422
00423 typedef struct _TScan__isset {
00424 _TScan__isset() : startRow(false), stopRow(false), timestamp(false), columns(false), caching(false), filterString(false) {}
00425 bool startRow;
00426 bool stopRow;
00427 bool timestamp;
00428 bool columns;
00429 bool caching;
00430 bool filterString;
00431 } _TScan__isset;
00432
00433 class TScan {
00434 public:
00435
00436 static const char* ascii_fingerprint;
00437 static const uint8_t binary_fingerprint[16];
00438
00439 TScan() : startRow(""), stopRow(""), timestamp(0), caching(0), filterString("") {
00440 }
00441
00442 virtual ~TScan() throw() {}
00443
00444 Text startRow;
00445 Text stopRow;
00446 int64_t timestamp;
00447 std::vector<Text> columns;
00448 int32_t caching;
00449 Text filterString;
00450
00451 _TScan__isset __isset;
00452
00453 void __set_startRow(const Text& val) {
00454 startRow = val;
00455 __isset.startRow = true;
00456 }
00457
00458 void __set_stopRow(const Text& val) {
00459 stopRow = val;
00460 __isset.stopRow = true;
00461 }
00462
00463 void __set_timestamp(const int64_t val) {
00464 timestamp = val;
00465 __isset.timestamp = true;
00466 }
00467
00468 void __set_columns(const std::vector<Text> & val) {
00469 columns = val;
00470 __isset.columns = true;
00471 }
00472
00473 void __set_caching(const int32_t val) {
00474 caching = val;
00475 __isset.caching = true;
00476 }
00477
00478 void __set_filterString(const Text& val) {
00479 filterString = val;
00480 __isset.filterString = true;
00481 }
00482
00483 bool operator == (const TScan & rhs) const
00484 {
00485 if (__isset.startRow != rhs.__isset.startRow)
00486 return false;
00487 else if (__isset.startRow && !(startRow == rhs.startRow))
00488 return false;
00489 if (__isset.stopRow != rhs.__isset.stopRow)
00490 return false;
00491 else if (__isset.stopRow && !(stopRow == rhs.stopRow))
00492 return false;
00493 if (__isset.timestamp != rhs.__isset.timestamp)
00494 return false;
00495 else if (__isset.timestamp && !(timestamp == rhs.timestamp))
00496 return false;
00497 if (__isset.columns != rhs.__isset.columns)
00498 return false;
00499 else if (__isset.columns && !(columns == rhs.columns))
00500 return false;
00501 if (__isset.caching != rhs.__isset.caching)
00502 return false;
00503 else if (__isset.caching && !(caching == rhs.caching))
00504 return false;
00505 if (__isset.filterString != rhs.__isset.filterString)
00506 return false;
00507 else if (__isset.filterString && !(filterString == rhs.filterString))
00508 return false;
00509 return true;
00510 }
00511 bool operator != (const TScan &rhs) const {
00512 return !(*this == rhs);
00513 }
00514
00515 bool operator < (const TScan & ) const;
00516
00517 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00518 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00519
00520 };
00521
00522 typedef struct _IOError__isset {
00523 _IOError__isset() : message(false) {}
00524 bool message;
00525 } _IOError__isset;
00526
00527 class IOError : public ::apache::thrift::TException {
00528 public:
00529
00530 static const char* ascii_fingerprint;
00531 static const uint8_t binary_fingerprint[16];
00532
00533 IOError() : message("") {
00534 }
00535
00536 virtual ~IOError() throw() {}
00537
00538 std::string message;
00539
00540 _IOError__isset __isset;
00541
00542 void __set_message(const std::string& val) {
00543 message = val;
00544 }
00545
00546 bool operator == (const IOError & rhs) const
00547 {
00548 if (!(message == rhs.message))
00549 return false;
00550 return true;
00551 }
00552 bool operator != (const IOError &rhs) const {
00553 return !(*this == rhs);
00554 }
00555
00556 bool operator < (const IOError & ) const;
00557
00558 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00559 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00560
00561 };
00562
00563 typedef struct _IllegalArgument__isset {
00564 _IllegalArgument__isset() : message(false) {}
00565 bool message;
00566 } _IllegalArgument__isset;
00567
00568 class IllegalArgument : public ::apache::thrift::TException {
00569 public:
00570
00571 static const char* ascii_fingerprint;
00572 static const uint8_t binary_fingerprint[16];
00573
00574 IllegalArgument() : message("") {
00575 }
00576
00577 virtual ~IllegalArgument() throw() {}
00578
00579 std::string message;
00580
00581 _IllegalArgument__isset __isset;
00582
00583 void __set_message(const std::string& val) {
00584 message = val;
00585 }
00586
00587 bool operator == (const IllegalArgument & rhs) const
00588 {
00589 if (!(message == rhs.message))
00590 return false;
00591 return true;
00592 }
00593 bool operator != (const IllegalArgument &rhs) const {
00594 return !(*this == rhs);
00595 }
00596
00597 bool operator < (const IllegalArgument & ) const;
00598
00599 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00600 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00601
00602 };
00603
00604 typedef struct _AlreadyExists__isset {
00605 _AlreadyExists__isset() : message(false) {}
00606 bool message;
00607 } _AlreadyExists__isset;
00608
00609 class AlreadyExists : public ::apache::thrift::TException {
00610 public:
00611
00612 static const char* ascii_fingerprint;
00613 static const uint8_t binary_fingerprint[16];
00614
00615 AlreadyExists() : message("") {
00616 }
00617
00618 virtual ~AlreadyExists() throw() {}
00619
00620 std::string message;
00621
00622 _AlreadyExists__isset __isset;
00623
00624 void __set_message(const std::string& val) {
00625 message = val;
00626 }
00627
00628 bool operator == (const AlreadyExists & rhs) const
00629 {
00630 if (!(message == rhs.message))
00631 return false;
00632 return true;
00633 }
00634 bool operator != (const AlreadyExists &rhs) const {
00635 return !(*this == rhs);
00636 }
00637
00638 bool operator < (const AlreadyExists & ) const;
00639
00640 uint32_t read(::apache::thrift::protocol::TProtocol* iprot);
00641 uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
00642
00643 };
00644
00645 }}}}
00646
00647 #endif