PageRenderTime 66ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 1ms

/tags/release-0.0.0-rc0/hive/external/metastore/src/gen/thrift/gen-py/hive_metastore/ttypes.py

#
Python | 2625 lines | 2196 code | 254 blank | 175 comment | 725 complexity | 4deaee89168db6706450dbd402da15cf MD5 | raw file
Possible License(s): Apache-2.0, BSD-3-Clause, JSON, CPL-1.0
  1. #
  2. # Autogenerated by Thrift
  3. #
  4. # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  5. #
  6. from thrift.Thrift import *
  7. import fb303.ttypes
  8. from thrift.transport import TTransport
  9. from thrift.protocol import TBinaryProtocol, TProtocol
  10. try:
  11. from thrift.protocol import fastbinary
  12. except:
  13. fastbinary = None
  14. class HiveObjectType:
  15. GLOBAL = 1
  16. DATABASE = 2
  17. TABLE = 3
  18. PARTITION = 4
  19. COLUMN = 5
  20. _VALUES_TO_NAMES = {
  21. 1: "GLOBAL",
  22. 2: "DATABASE",
  23. 3: "TABLE",
  24. 4: "PARTITION",
  25. 5: "COLUMN",
  26. }
  27. _NAMES_TO_VALUES = {
  28. "GLOBAL": 1,
  29. "DATABASE": 2,
  30. "TABLE": 3,
  31. "PARTITION": 4,
  32. "COLUMN": 5,
  33. }
  34. class PrincipalType:
  35. USER = 1
  36. ROLE = 2
  37. GROUP = 3
  38. _VALUES_TO_NAMES = {
  39. 1: "USER",
  40. 2: "ROLE",
  41. 3: "GROUP",
  42. }
  43. _NAMES_TO_VALUES = {
  44. "USER": 1,
  45. "ROLE": 2,
  46. "GROUP": 3,
  47. }
  48. class Version:
  49. """
  50. Attributes:
  51. - version
  52. - comments
  53. """
  54. thrift_spec = (
  55. None, # 0
  56. (1, TType.STRING, 'version', None, None, ), # 1
  57. (2, TType.STRING, 'comments', None, None, ), # 2
  58. )
  59. def __init__(self, version=None, comments=None,):
  60. self.version = version
  61. self.comments = comments
  62. def read(self, iprot):
  63. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  64. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  65. return
  66. iprot.readStructBegin()
  67. while True:
  68. (fname, ftype, fid) = iprot.readFieldBegin()
  69. if ftype == TType.STOP:
  70. break
  71. if fid == 1:
  72. if ftype == TType.STRING:
  73. self.version = iprot.readString();
  74. else:
  75. iprot.skip(ftype)
  76. elif fid == 2:
  77. if ftype == TType.STRING:
  78. self.comments = iprot.readString();
  79. else:
  80. iprot.skip(ftype)
  81. else:
  82. iprot.skip(ftype)
  83. iprot.readFieldEnd()
  84. iprot.readStructEnd()
  85. def write(self, oprot):
  86. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  87. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  88. return
  89. oprot.writeStructBegin('Version')
  90. if self.version != None:
  91. oprot.writeFieldBegin('version', TType.STRING, 1)
  92. oprot.writeString(self.version)
  93. oprot.writeFieldEnd()
  94. if self.comments != None:
  95. oprot.writeFieldBegin('comments', TType.STRING, 2)
  96. oprot.writeString(self.comments)
  97. oprot.writeFieldEnd()
  98. oprot.writeFieldStop()
  99. oprot.writeStructEnd()
  100. def validate(self):
  101. return
  102. def __repr__(self):
  103. L = ['%s=%r' % (key, value)
  104. for key, value in self.__dict__.iteritems()]
  105. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  106. def __eq__(self, other):
  107. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  108. def __ne__(self, other):
  109. return not (self == other)
  110. class FieldSchema:
  111. """
  112. Attributes:
  113. - name
  114. - type
  115. - comment
  116. """
  117. thrift_spec = (
  118. None, # 0
  119. (1, TType.STRING, 'name', None, None, ), # 1
  120. (2, TType.STRING, 'type', None, None, ), # 2
  121. (3, TType.STRING, 'comment', None, None, ), # 3
  122. )
  123. def __init__(self, name=None, type=None, comment=None,):
  124. self.name = name
  125. self.type = type
  126. self.comment = comment
  127. def read(self, iprot):
  128. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  129. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  130. return
  131. iprot.readStructBegin()
  132. while True:
  133. (fname, ftype, fid) = iprot.readFieldBegin()
  134. if ftype == TType.STOP:
  135. break
  136. if fid == 1:
  137. if ftype == TType.STRING:
  138. self.name = iprot.readString();
  139. else:
  140. iprot.skip(ftype)
  141. elif fid == 2:
  142. if ftype == TType.STRING:
  143. self.type = iprot.readString();
  144. else:
  145. iprot.skip(ftype)
  146. elif fid == 3:
  147. if ftype == TType.STRING:
  148. self.comment = iprot.readString();
  149. else:
  150. iprot.skip(ftype)
  151. else:
  152. iprot.skip(ftype)
  153. iprot.readFieldEnd()
  154. iprot.readStructEnd()
  155. def write(self, oprot):
  156. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  157. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  158. return
  159. oprot.writeStructBegin('FieldSchema')
  160. if self.name != None:
  161. oprot.writeFieldBegin('name', TType.STRING, 1)
  162. oprot.writeString(self.name)
  163. oprot.writeFieldEnd()
  164. if self.type != None:
  165. oprot.writeFieldBegin('type', TType.STRING, 2)
  166. oprot.writeString(self.type)
  167. oprot.writeFieldEnd()
  168. if self.comment != None:
  169. oprot.writeFieldBegin('comment', TType.STRING, 3)
  170. oprot.writeString(self.comment)
  171. oprot.writeFieldEnd()
  172. oprot.writeFieldStop()
  173. oprot.writeStructEnd()
  174. def validate(self):
  175. return
  176. def __repr__(self):
  177. L = ['%s=%r' % (key, value)
  178. for key, value in self.__dict__.iteritems()]
  179. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  180. def __eq__(self, other):
  181. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  182. def __ne__(self, other):
  183. return not (self == other)
  184. class Type:
  185. """
  186. Attributes:
  187. - name
  188. - type1
  189. - type2
  190. - fields
  191. """
  192. thrift_spec = (
  193. None, # 0
  194. (1, TType.STRING, 'name', None, None, ), # 1
  195. (2, TType.STRING, 'type1', None, None, ), # 2
  196. (3, TType.STRING, 'type2', None, None, ), # 3
  197. (4, TType.LIST, 'fields', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 4
  198. )
  199. def __init__(self, name=None, type1=None, type2=None, fields=None,):
  200. self.name = name
  201. self.type1 = type1
  202. self.type2 = type2
  203. self.fields = fields
  204. def read(self, iprot):
  205. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  206. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  207. return
  208. iprot.readStructBegin()
  209. while True:
  210. (fname, ftype, fid) = iprot.readFieldBegin()
  211. if ftype == TType.STOP:
  212. break
  213. if fid == 1:
  214. if ftype == TType.STRING:
  215. self.name = iprot.readString();
  216. else:
  217. iprot.skip(ftype)
  218. elif fid == 2:
  219. if ftype == TType.STRING:
  220. self.type1 = iprot.readString();
  221. else:
  222. iprot.skip(ftype)
  223. elif fid == 3:
  224. if ftype == TType.STRING:
  225. self.type2 = iprot.readString();
  226. else:
  227. iprot.skip(ftype)
  228. elif fid == 4:
  229. if ftype == TType.LIST:
  230. self.fields = []
  231. (_etype3, _size0) = iprot.readListBegin()
  232. for _i4 in xrange(_size0):
  233. _elem5 = FieldSchema()
  234. _elem5.read(iprot)
  235. self.fields.append(_elem5)
  236. iprot.readListEnd()
  237. else:
  238. iprot.skip(ftype)
  239. else:
  240. iprot.skip(ftype)
  241. iprot.readFieldEnd()
  242. iprot.readStructEnd()
  243. def write(self, oprot):
  244. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  245. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  246. return
  247. oprot.writeStructBegin('Type')
  248. if self.name != None:
  249. oprot.writeFieldBegin('name', TType.STRING, 1)
  250. oprot.writeString(self.name)
  251. oprot.writeFieldEnd()
  252. if self.type1 != None:
  253. oprot.writeFieldBegin('type1', TType.STRING, 2)
  254. oprot.writeString(self.type1)
  255. oprot.writeFieldEnd()
  256. if self.type2 != None:
  257. oprot.writeFieldBegin('type2', TType.STRING, 3)
  258. oprot.writeString(self.type2)
  259. oprot.writeFieldEnd()
  260. if self.fields != None:
  261. oprot.writeFieldBegin('fields', TType.LIST, 4)
  262. oprot.writeListBegin(TType.STRUCT, len(self.fields))
  263. for iter6 in self.fields:
  264. iter6.write(oprot)
  265. oprot.writeListEnd()
  266. oprot.writeFieldEnd()
  267. oprot.writeFieldStop()
  268. oprot.writeStructEnd()
  269. def validate(self):
  270. return
  271. def __repr__(self):
  272. L = ['%s=%r' % (key, value)
  273. for key, value in self.__dict__.iteritems()]
  274. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  275. def __eq__(self, other):
  276. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  277. def __ne__(self, other):
  278. return not (self == other)
  279. class HiveObjectRef:
  280. """
  281. Attributes:
  282. - objectType
  283. - dbName
  284. - objectName
  285. - partValues
  286. - columnName
  287. """
  288. thrift_spec = (
  289. None, # 0
  290. (1, TType.I32, 'objectType', None, None, ), # 1
  291. (2, TType.STRING, 'dbName', None, None, ), # 2
  292. (3, TType.STRING, 'objectName', None, None, ), # 3
  293. (4, TType.LIST, 'partValues', (TType.STRING,None), None, ), # 4
  294. (5, TType.STRING, 'columnName', None, None, ), # 5
  295. )
  296. def __init__(self, objectType=None, dbName=None, objectName=None, partValues=None, columnName=None,):
  297. self.objectType = objectType
  298. self.dbName = dbName
  299. self.objectName = objectName
  300. self.partValues = partValues
  301. self.columnName = columnName
  302. def read(self, iprot):
  303. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  304. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  305. return
  306. iprot.readStructBegin()
  307. while True:
  308. (fname, ftype, fid) = iprot.readFieldBegin()
  309. if ftype == TType.STOP:
  310. break
  311. if fid == 1:
  312. if ftype == TType.I32:
  313. self.objectType = iprot.readI32();
  314. else:
  315. iprot.skip(ftype)
  316. elif fid == 2:
  317. if ftype == TType.STRING:
  318. self.dbName = iprot.readString();
  319. else:
  320. iprot.skip(ftype)
  321. elif fid == 3:
  322. if ftype == TType.STRING:
  323. self.objectName = iprot.readString();
  324. else:
  325. iprot.skip(ftype)
  326. elif fid == 4:
  327. if ftype == TType.LIST:
  328. self.partValues = []
  329. (_etype10, _size7) = iprot.readListBegin()
  330. for _i11 in xrange(_size7):
  331. _elem12 = iprot.readString();
  332. self.partValues.append(_elem12)
  333. iprot.readListEnd()
  334. else:
  335. iprot.skip(ftype)
  336. elif fid == 5:
  337. if ftype == TType.STRING:
  338. self.columnName = iprot.readString();
  339. else:
  340. iprot.skip(ftype)
  341. else:
  342. iprot.skip(ftype)
  343. iprot.readFieldEnd()
  344. iprot.readStructEnd()
  345. def write(self, oprot):
  346. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  347. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  348. return
  349. oprot.writeStructBegin('HiveObjectRef')
  350. if self.objectType != None:
  351. oprot.writeFieldBegin('objectType', TType.I32, 1)
  352. oprot.writeI32(self.objectType)
  353. oprot.writeFieldEnd()
  354. if self.dbName != None:
  355. oprot.writeFieldBegin('dbName', TType.STRING, 2)
  356. oprot.writeString(self.dbName)
  357. oprot.writeFieldEnd()
  358. if self.objectName != None:
  359. oprot.writeFieldBegin('objectName', TType.STRING, 3)
  360. oprot.writeString(self.objectName)
  361. oprot.writeFieldEnd()
  362. if self.partValues != None:
  363. oprot.writeFieldBegin('partValues', TType.LIST, 4)
  364. oprot.writeListBegin(TType.STRING, len(self.partValues))
  365. for iter13 in self.partValues:
  366. oprot.writeString(iter13)
  367. oprot.writeListEnd()
  368. oprot.writeFieldEnd()
  369. if self.columnName != None:
  370. oprot.writeFieldBegin('columnName', TType.STRING, 5)
  371. oprot.writeString(self.columnName)
  372. oprot.writeFieldEnd()
  373. oprot.writeFieldStop()
  374. oprot.writeStructEnd()
  375. def validate(self):
  376. return
  377. def __repr__(self):
  378. L = ['%s=%r' % (key, value)
  379. for key, value in self.__dict__.iteritems()]
  380. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  381. def __eq__(self, other):
  382. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  383. def __ne__(self, other):
  384. return not (self == other)
  385. class PrivilegeGrantInfo:
  386. """
  387. Attributes:
  388. - privilege
  389. - createTime
  390. - grantor
  391. - grantorType
  392. - grantOption
  393. """
  394. thrift_spec = (
  395. None, # 0
  396. (1, TType.STRING, 'privilege', None, None, ), # 1
  397. (2, TType.I32, 'createTime', None, None, ), # 2
  398. (3, TType.STRING, 'grantor', None, None, ), # 3
  399. (4, TType.I32, 'grantorType', None, None, ), # 4
  400. (5, TType.BOOL, 'grantOption', None, None, ), # 5
  401. )
  402. def __init__(self, privilege=None, createTime=None, grantor=None, grantorType=None, grantOption=None,):
  403. self.privilege = privilege
  404. self.createTime = createTime
  405. self.grantor = grantor
  406. self.grantorType = grantorType
  407. self.grantOption = grantOption
  408. def read(self, iprot):
  409. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  410. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  411. return
  412. iprot.readStructBegin()
  413. while True:
  414. (fname, ftype, fid) = iprot.readFieldBegin()
  415. if ftype == TType.STOP:
  416. break
  417. if fid == 1:
  418. if ftype == TType.STRING:
  419. self.privilege = iprot.readString();
  420. else:
  421. iprot.skip(ftype)
  422. elif fid == 2:
  423. if ftype == TType.I32:
  424. self.createTime = iprot.readI32();
  425. else:
  426. iprot.skip(ftype)
  427. elif fid == 3:
  428. if ftype == TType.STRING:
  429. self.grantor = iprot.readString();
  430. else:
  431. iprot.skip(ftype)
  432. elif fid == 4:
  433. if ftype == TType.I32:
  434. self.grantorType = iprot.readI32();
  435. else:
  436. iprot.skip(ftype)
  437. elif fid == 5:
  438. if ftype == TType.BOOL:
  439. self.grantOption = iprot.readBool();
  440. else:
  441. iprot.skip(ftype)
  442. else:
  443. iprot.skip(ftype)
  444. iprot.readFieldEnd()
  445. iprot.readStructEnd()
  446. def write(self, oprot):
  447. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  448. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  449. return
  450. oprot.writeStructBegin('PrivilegeGrantInfo')
  451. if self.privilege != None:
  452. oprot.writeFieldBegin('privilege', TType.STRING, 1)
  453. oprot.writeString(self.privilege)
  454. oprot.writeFieldEnd()
  455. if self.createTime != None:
  456. oprot.writeFieldBegin('createTime', TType.I32, 2)
  457. oprot.writeI32(self.createTime)
  458. oprot.writeFieldEnd()
  459. if self.grantor != None:
  460. oprot.writeFieldBegin('grantor', TType.STRING, 3)
  461. oprot.writeString(self.grantor)
  462. oprot.writeFieldEnd()
  463. if self.grantorType != None:
  464. oprot.writeFieldBegin('grantorType', TType.I32, 4)
  465. oprot.writeI32(self.grantorType)
  466. oprot.writeFieldEnd()
  467. if self.grantOption != None:
  468. oprot.writeFieldBegin('grantOption', TType.BOOL, 5)
  469. oprot.writeBool(self.grantOption)
  470. oprot.writeFieldEnd()
  471. oprot.writeFieldStop()
  472. oprot.writeStructEnd()
  473. def validate(self):
  474. return
  475. def __repr__(self):
  476. L = ['%s=%r' % (key, value)
  477. for key, value in self.__dict__.iteritems()]
  478. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  479. def __eq__(self, other):
  480. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  481. def __ne__(self, other):
  482. return not (self == other)
  483. class HiveObjectPrivilege:
  484. """
  485. Attributes:
  486. - hiveObject
  487. - principalName
  488. - principalType
  489. - grantInfo
  490. """
  491. thrift_spec = (
  492. None, # 0
  493. (1, TType.STRUCT, 'hiveObject', (HiveObjectRef, HiveObjectRef.thrift_spec), None, ), # 1
  494. (2, TType.STRING, 'principalName', None, None, ), # 2
  495. (3, TType.I32, 'principalType', None, None, ), # 3
  496. (4, TType.STRUCT, 'grantInfo', (PrivilegeGrantInfo, PrivilegeGrantInfo.thrift_spec), None, ), # 4
  497. )
  498. def __init__(self, hiveObject=None, principalName=None, principalType=None, grantInfo=None,):
  499. self.hiveObject = hiveObject
  500. self.principalName = principalName
  501. self.principalType = principalType
  502. self.grantInfo = grantInfo
  503. def read(self, iprot):
  504. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  505. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  506. return
  507. iprot.readStructBegin()
  508. while True:
  509. (fname, ftype, fid) = iprot.readFieldBegin()
  510. if ftype == TType.STOP:
  511. break
  512. if fid == 1:
  513. if ftype == TType.STRUCT:
  514. self.hiveObject = HiveObjectRef()
  515. self.hiveObject.read(iprot)
  516. else:
  517. iprot.skip(ftype)
  518. elif fid == 2:
  519. if ftype == TType.STRING:
  520. self.principalName = iprot.readString();
  521. else:
  522. iprot.skip(ftype)
  523. elif fid == 3:
  524. if ftype == TType.I32:
  525. self.principalType = iprot.readI32();
  526. else:
  527. iprot.skip(ftype)
  528. elif fid == 4:
  529. if ftype == TType.STRUCT:
  530. self.grantInfo = PrivilegeGrantInfo()
  531. self.grantInfo.read(iprot)
  532. else:
  533. iprot.skip(ftype)
  534. else:
  535. iprot.skip(ftype)
  536. iprot.readFieldEnd()
  537. iprot.readStructEnd()
  538. def write(self, oprot):
  539. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  540. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  541. return
  542. oprot.writeStructBegin('HiveObjectPrivilege')
  543. if self.hiveObject != None:
  544. oprot.writeFieldBegin('hiveObject', TType.STRUCT, 1)
  545. self.hiveObject.write(oprot)
  546. oprot.writeFieldEnd()
  547. if self.principalName != None:
  548. oprot.writeFieldBegin('principalName', TType.STRING, 2)
  549. oprot.writeString(self.principalName)
  550. oprot.writeFieldEnd()
  551. if self.principalType != None:
  552. oprot.writeFieldBegin('principalType', TType.I32, 3)
  553. oprot.writeI32(self.principalType)
  554. oprot.writeFieldEnd()
  555. if self.grantInfo != None:
  556. oprot.writeFieldBegin('grantInfo', TType.STRUCT, 4)
  557. self.grantInfo.write(oprot)
  558. oprot.writeFieldEnd()
  559. oprot.writeFieldStop()
  560. oprot.writeStructEnd()
  561. def validate(self):
  562. return
  563. def __repr__(self):
  564. L = ['%s=%r' % (key, value)
  565. for key, value in self.__dict__.iteritems()]
  566. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  567. def __eq__(self, other):
  568. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  569. def __ne__(self, other):
  570. return not (self == other)
  571. class PrivilegeBag:
  572. """
  573. Attributes:
  574. - privileges
  575. """
  576. thrift_spec = (
  577. None, # 0
  578. (1, TType.LIST, 'privileges', (TType.STRUCT,(HiveObjectPrivilege, HiveObjectPrivilege.thrift_spec)), None, ), # 1
  579. )
  580. def __init__(self, privileges=None,):
  581. self.privileges = privileges
  582. def read(self, iprot):
  583. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  584. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  585. return
  586. iprot.readStructBegin()
  587. while True:
  588. (fname, ftype, fid) = iprot.readFieldBegin()
  589. if ftype == TType.STOP:
  590. break
  591. if fid == 1:
  592. if ftype == TType.LIST:
  593. self.privileges = []
  594. (_etype17, _size14) = iprot.readListBegin()
  595. for _i18 in xrange(_size14):
  596. _elem19 = HiveObjectPrivilege()
  597. _elem19.read(iprot)
  598. self.privileges.append(_elem19)
  599. iprot.readListEnd()
  600. else:
  601. iprot.skip(ftype)
  602. else:
  603. iprot.skip(ftype)
  604. iprot.readFieldEnd()
  605. iprot.readStructEnd()
  606. def write(self, oprot):
  607. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  608. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  609. return
  610. oprot.writeStructBegin('PrivilegeBag')
  611. if self.privileges != None:
  612. oprot.writeFieldBegin('privileges', TType.LIST, 1)
  613. oprot.writeListBegin(TType.STRUCT, len(self.privileges))
  614. for iter20 in self.privileges:
  615. iter20.write(oprot)
  616. oprot.writeListEnd()
  617. oprot.writeFieldEnd()
  618. oprot.writeFieldStop()
  619. oprot.writeStructEnd()
  620. def validate(self):
  621. return
  622. def __repr__(self):
  623. L = ['%s=%r' % (key, value)
  624. for key, value in self.__dict__.iteritems()]
  625. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  626. def __eq__(self, other):
  627. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  628. def __ne__(self, other):
  629. return not (self == other)
  630. class PrincipalPrivilegeSet:
  631. """
  632. Attributes:
  633. - userPrivileges
  634. - groupPrivileges
  635. - rolePrivileges
  636. """
  637. thrift_spec = (
  638. None, # 0
  639. (1, TType.MAP, 'userPrivileges', (TType.STRING,None,TType.LIST,(TType.STRUCT,(PrivilegeGrantInfo, PrivilegeGrantInfo.thrift_spec))), None, ), # 1
  640. (2, TType.MAP, 'groupPrivileges', (TType.STRING,None,TType.LIST,(TType.STRUCT,(PrivilegeGrantInfo, PrivilegeGrantInfo.thrift_spec))), None, ), # 2
  641. (3, TType.MAP, 'rolePrivileges', (TType.STRING,None,TType.LIST,(TType.STRUCT,(PrivilegeGrantInfo, PrivilegeGrantInfo.thrift_spec))), None, ), # 3
  642. )
  643. def __init__(self, userPrivileges=None, groupPrivileges=None, rolePrivileges=None,):
  644. self.userPrivileges = userPrivileges
  645. self.groupPrivileges = groupPrivileges
  646. self.rolePrivileges = rolePrivileges
  647. def read(self, iprot):
  648. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  649. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  650. return
  651. iprot.readStructBegin()
  652. while True:
  653. (fname, ftype, fid) = iprot.readFieldBegin()
  654. if ftype == TType.STOP:
  655. break
  656. if fid == 1:
  657. if ftype == TType.MAP:
  658. self.userPrivileges = {}
  659. (_ktype22, _vtype23, _size21 ) = iprot.readMapBegin()
  660. for _i25 in xrange(_size21):
  661. _key26 = iprot.readString();
  662. _val27 = []
  663. (_etype31, _size28) = iprot.readListBegin()
  664. for _i32 in xrange(_size28):
  665. _elem33 = PrivilegeGrantInfo()
  666. _elem33.read(iprot)
  667. _val27.append(_elem33)
  668. iprot.readListEnd()
  669. self.userPrivileges[_key26] = _val27
  670. iprot.readMapEnd()
  671. else:
  672. iprot.skip(ftype)
  673. elif fid == 2:
  674. if ftype == TType.MAP:
  675. self.groupPrivileges = {}
  676. (_ktype35, _vtype36, _size34 ) = iprot.readMapBegin()
  677. for _i38 in xrange(_size34):
  678. _key39 = iprot.readString();
  679. _val40 = []
  680. (_etype44, _size41) = iprot.readListBegin()
  681. for _i45 in xrange(_size41):
  682. _elem46 = PrivilegeGrantInfo()
  683. _elem46.read(iprot)
  684. _val40.append(_elem46)
  685. iprot.readListEnd()
  686. self.groupPrivileges[_key39] = _val40
  687. iprot.readMapEnd()
  688. else:
  689. iprot.skip(ftype)
  690. elif fid == 3:
  691. if ftype == TType.MAP:
  692. self.rolePrivileges = {}
  693. (_ktype48, _vtype49, _size47 ) = iprot.readMapBegin()
  694. for _i51 in xrange(_size47):
  695. _key52 = iprot.readString();
  696. _val53 = []
  697. (_etype57, _size54) = iprot.readListBegin()
  698. for _i58 in xrange(_size54):
  699. _elem59 = PrivilegeGrantInfo()
  700. _elem59.read(iprot)
  701. _val53.append(_elem59)
  702. iprot.readListEnd()
  703. self.rolePrivileges[_key52] = _val53
  704. iprot.readMapEnd()
  705. else:
  706. iprot.skip(ftype)
  707. else:
  708. iprot.skip(ftype)
  709. iprot.readFieldEnd()
  710. iprot.readStructEnd()
  711. def write(self, oprot):
  712. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  713. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  714. return
  715. oprot.writeStructBegin('PrincipalPrivilegeSet')
  716. if self.userPrivileges != None:
  717. oprot.writeFieldBegin('userPrivileges', TType.MAP, 1)
  718. oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.userPrivileges))
  719. for kiter60,viter61 in self.userPrivileges.items():
  720. oprot.writeString(kiter60)
  721. oprot.writeListBegin(TType.STRUCT, len(viter61))
  722. for iter62 in viter61:
  723. iter62.write(oprot)
  724. oprot.writeListEnd()
  725. oprot.writeMapEnd()
  726. oprot.writeFieldEnd()
  727. if self.groupPrivileges != None:
  728. oprot.writeFieldBegin('groupPrivileges', TType.MAP, 2)
  729. oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.groupPrivileges))
  730. for kiter63,viter64 in self.groupPrivileges.items():
  731. oprot.writeString(kiter63)
  732. oprot.writeListBegin(TType.STRUCT, len(viter64))
  733. for iter65 in viter64:
  734. iter65.write(oprot)
  735. oprot.writeListEnd()
  736. oprot.writeMapEnd()
  737. oprot.writeFieldEnd()
  738. if self.rolePrivileges != None:
  739. oprot.writeFieldBegin('rolePrivileges', TType.MAP, 3)
  740. oprot.writeMapBegin(TType.STRING, TType.LIST, len(self.rolePrivileges))
  741. for kiter66,viter67 in self.rolePrivileges.items():
  742. oprot.writeString(kiter66)
  743. oprot.writeListBegin(TType.STRUCT, len(viter67))
  744. for iter68 in viter67:
  745. iter68.write(oprot)
  746. oprot.writeListEnd()
  747. oprot.writeMapEnd()
  748. oprot.writeFieldEnd()
  749. oprot.writeFieldStop()
  750. oprot.writeStructEnd()
  751. def validate(self):
  752. return
  753. def __repr__(self):
  754. L = ['%s=%r' % (key, value)
  755. for key, value in self.__dict__.iteritems()]
  756. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  757. def __eq__(self, other):
  758. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  759. def __ne__(self, other):
  760. return not (self == other)
  761. class Role:
  762. """
  763. Attributes:
  764. - roleName
  765. - createTime
  766. - ownerName
  767. """
  768. thrift_spec = (
  769. None, # 0
  770. (1, TType.STRING, 'roleName', None, None, ), # 1
  771. (2, TType.I32, 'createTime', None, None, ), # 2
  772. (3, TType.STRING, 'ownerName', None, None, ), # 3
  773. )
  774. def __init__(self, roleName=None, createTime=None, ownerName=None,):
  775. self.roleName = roleName
  776. self.createTime = createTime
  777. self.ownerName = ownerName
  778. def read(self, iprot):
  779. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  780. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  781. return
  782. iprot.readStructBegin()
  783. while True:
  784. (fname, ftype, fid) = iprot.readFieldBegin()
  785. if ftype == TType.STOP:
  786. break
  787. if fid == 1:
  788. if ftype == TType.STRING:
  789. self.roleName = iprot.readString();
  790. else:
  791. iprot.skip(ftype)
  792. elif fid == 2:
  793. if ftype == TType.I32:
  794. self.createTime = iprot.readI32();
  795. else:
  796. iprot.skip(ftype)
  797. elif fid == 3:
  798. if ftype == TType.STRING:
  799. self.ownerName = iprot.readString();
  800. else:
  801. iprot.skip(ftype)
  802. else:
  803. iprot.skip(ftype)
  804. iprot.readFieldEnd()
  805. iprot.readStructEnd()
  806. def write(self, oprot):
  807. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  808. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  809. return
  810. oprot.writeStructBegin('Role')
  811. if self.roleName != None:
  812. oprot.writeFieldBegin('roleName', TType.STRING, 1)
  813. oprot.writeString(self.roleName)
  814. oprot.writeFieldEnd()
  815. if self.createTime != None:
  816. oprot.writeFieldBegin('createTime', TType.I32, 2)
  817. oprot.writeI32(self.createTime)
  818. oprot.writeFieldEnd()
  819. if self.ownerName != None:
  820. oprot.writeFieldBegin('ownerName', TType.STRING, 3)
  821. oprot.writeString(self.ownerName)
  822. oprot.writeFieldEnd()
  823. oprot.writeFieldStop()
  824. oprot.writeStructEnd()
  825. def validate(self):
  826. return
  827. def __repr__(self):
  828. L = ['%s=%r' % (key, value)
  829. for key, value in self.__dict__.iteritems()]
  830. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  831. def __eq__(self, other):
  832. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  833. def __ne__(self, other):
  834. return not (self == other)
  835. class Database:
  836. """
  837. Attributes:
  838. - name
  839. - description
  840. - locationUri
  841. - parameters
  842. - privileges
  843. """
  844. thrift_spec = (
  845. None, # 0
  846. (1, TType.STRING, 'name', None, None, ), # 1
  847. (2, TType.STRING, 'description', None, None, ), # 2
  848. (3, TType.STRING, 'locationUri', None, None, ), # 3
  849. (4, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 4
  850. (5, TType.STRUCT, 'privileges', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 5
  851. )
  852. def __init__(self, name=None, description=None, locationUri=None, parameters=None, privileges=None,):
  853. self.name = name
  854. self.description = description
  855. self.locationUri = locationUri
  856. self.parameters = parameters
  857. self.privileges = privileges
  858. def read(self, iprot):
  859. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  860. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  861. return
  862. iprot.readStructBegin()
  863. while True:
  864. (fname, ftype, fid) = iprot.readFieldBegin()
  865. if ftype == TType.STOP:
  866. break
  867. if fid == 1:
  868. if ftype == TType.STRING:
  869. self.name = iprot.readString();
  870. else:
  871. iprot.skip(ftype)
  872. elif fid == 2:
  873. if ftype == TType.STRING:
  874. self.description = iprot.readString();
  875. else:
  876. iprot.skip(ftype)
  877. elif fid == 3:
  878. if ftype == TType.STRING:
  879. self.locationUri = iprot.readString();
  880. else:
  881. iprot.skip(ftype)
  882. elif fid == 4:
  883. if ftype == TType.MAP:
  884. self.parameters = {}
  885. (_ktype70, _vtype71, _size69 ) = iprot.readMapBegin()
  886. for _i73 in xrange(_size69):
  887. _key74 = iprot.readString();
  888. _val75 = iprot.readString();
  889. self.parameters[_key74] = _val75
  890. iprot.readMapEnd()
  891. else:
  892. iprot.skip(ftype)
  893. elif fid == 5:
  894. if ftype == TType.STRUCT:
  895. self.privileges = PrincipalPrivilegeSet()
  896. self.privileges.read(iprot)
  897. else:
  898. iprot.skip(ftype)
  899. else:
  900. iprot.skip(ftype)
  901. iprot.readFieldEnd()
  902. iprot.readStructEnd()
  903. def write(self, oprot):
  904. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  905. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  906. return
  907. oprot.writeStructBegin('Database')
  908. if self.name != None:
  909. oprot.writeFieldBegin('name', TType.STRING, 1)
  910. oprot.writeString(self.name)
  911. oprot.writeFieldEnd()
  912. if self.description != None:
  913. oprot.writeFieldBegin('description', TType.STRING, 2)
  914. oprot.writeString(self.description)
  915. oprot.writeFieldEnd()
  916. if self.locationUri != None:
  917. oprot.writeFieldBegin('locationUri', TType.STRING, 3)
  918. oprot.writeString(self.locationUri)
  919. oprot.writeFieldEnd()
  920. if self.parameters != None:
  921. oprot.writeFieldBegin('parameters', TType.MAP, 4)
  922. oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
  923. for kiter76,viter77 in self.parameters.items():
  924. oprot.writeString(kiter76)
  925. oprot.writeString(viter77)
  926. oprot.writeMapEnd()
  927. oprot.writeFieldEnd()
  928. if self.privileges != None:
  929. oprot.writeFieldBegin('privileges', TType.STRUCT, 5)
  930. self.privileges.write(oprot)
  931. oprot.writeFieldEnd()
  932. oprot.writeFieldStop()
  933. oprot.writeStructEnd()
  934. def validate(self):
  935. return
  936. def __repr__(self):
  937. L = ['%s=%r' % (key, value)
  938. for key, value in self.__dict__.iteritems()]
  939. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  940. def __eq__(self, other):
  941. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  942. def __ne__(self, other):
  943. return not (self == other)
  944. class SerDeInfo:
  945. """
  946. Attributes:
  947. - name
  948. - serializationLib
  949. - parameters
  950. """
  951. thrift_spec = (
  952. None, # 0
  953. (1, TType.STRING, 'name', None, None, ), # 1
  954. (2, TType.STRING, 'serializationLib', None, None, ), # 2
  955. (3, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 3
  956. )
  957. def __init__(self, name=None, serializationLib=None, parameters=None,):
  958. self.name = name
  959. self.serializationLib = serializationLib
  960. self.parameters = parameters
  961. def read(self, iprot):
  962. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  963. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  964. return
  965. iprot.readStructBegin()
  966. while True:
  967. (fname, ftype, fid) = iprot.readFieldBegin()
  968. if ftype == TType.STOP:
  969. break
  970. if fid == 1:
  971. if ftype == TType.STRING:
  972. self.name = iprot.readString();
  973. else:
  974. iprot.skip(ftype)
  975. elif fid == 2:
  976. if ftype == TType.STRING:
  977. self.serializationLib = iprot.readString();
  978. else:
  979. iprot.skip(ftype)
  980. elif fid == 3:
  981. if ftype == TType.MAP:
  982. self.parameters = {}
  983. (_ktype79, _vtype80, _size78 ) = iprot.readMapBegin()
  984. for _i82 in xrange(_size78):
  985. _key83 = iprot.readString();
  986. _val84 = iprot.readString();
  987. self.parameters[_key83] = _val84
  988. iprot.readMapEnd()
  989. else:
  990. iprot.skip(ftype)
  991. else:
  992. iprot.skip(ftype)
  993. iprot.readFieldEnd()
  994. iprot.readStructEnd()
  995. def write(self, oprot):
  996. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  997. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  998. return
  999. oprot.writeStructBegin('SerDeInfo')
  1000. if self.name != None:
  1001. oprot.writeFieldBegin('name', TType.STRING, 1)
  1002. oprot.writeString(self.name)
  1003. oprot.writeFieldEnd()
  1004. if self.serializationLib != None:
  1005. oprot.writeFieldBegin('serializationLib', TType.STRING, 2)
  1006. oprot.writeString(self.serializationLib)
  1007. oprot.writeFieldEnd()
  1008. if self.parameters != None:
  1009. oprot.writeFieldBegin('parameters', TType.MAP, 3)
  1010. oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
  1011. for kiter85,viter86 in self.parameters.items():
  1012. oprot.writeString(kiter85)
  1013. oprot.writeString(viter86)
  1014. oprot.writeMapEnd()
  1015. oprot.writeFieldEnd()
  1016. oprot.writeFieldStop()
  1017. oprot.writeStructEnd()
  1018. def validate(self):
  1019. return
  1020. def __repr__(self):
  1021. L = ['%s=%r' % (key, value)
  1022. for key, value in self.__dict__.iteritems()]
  1023. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1024. def __eq__(self, other):
  1025. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1026. def __ne__(self, other):
  1027. return not (self == other)
  1028. class Order:
  1029. """
  1030. Attributes:
  1031. - col
  1032. - order
  1033. """
  1034. thrift_spec = (
  1035. None, # 0
  1036. (1, TType.STRING, 'col', None, None, ), # 1
  1037. (2, TType.I32, 'order', None, None, ), # 2
  1038. )
  1039. def __init__(self, col=None, order=None,):
  1040. self.col = col
  1041. self.order = order
  1042. def read(self, iprot):
  1043. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1044. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1045. return
  1046. iprot.readStructBegin()
  1047. while True:
  1048. (fname, ftype, fid) = iprot.readFieldBegin()
  1049. if ftype == TType.STOP:
  1050. break
  1051. if fid == 1:
  1052. if ftype == TType.STRING:
  1053. self.col = iprot.readString();
  1054. else:
  1055. iprot.skip(ftype)
  1056. elif fid == 2:
  1057. if ftype == TType.I32:
  1058. self.order = iprot.readI32();
  1059. else:
  1060. iprot.skip(ftype)
  1061. else:
  1062. iprot.skip(ftype)
  1063. iprot.readFieldEnd()
  1064. iprot.readStructEnd()
  1065. def write(self, oprot):
  1066. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1067. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1068. return
  1069. oprot.writeStructBegin('Order')
  1070. if self.col != None:
  1071. oprot.writeFieldBegin('col', TType.STRING, 1)
  1072. oprot.writeString(self.col)
  1073. oprot.writeFieldEnd()
  1074. if self.order != None:
  1075. oprot.writeFieldBegin('order', TType.I32, 2)
  1076. oprot.writeI32(self.order)
  1077. oprot.writeFieldEnd()
  1078. oprot.writeFieldStop()
  1079. oprot.writeStructEnd()
  1080. def validate(self):
  1081. return
  1082. def __repr__(self):
  1083. L = ['%s=%r' % (key, value)
  1084. for key, value in self.__dict__.iteritems()]
  1085. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1086. def __eq__(self, other):
  1087. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1088. def __ne__(self, other):
  1089. return not (self == other)
  1090. class StorageDescriptor:
  1091. """
  1092. Attributes:
  1093. - cols
  1094. - location
  1095. - inputFormat
  1096. - outputFormat
  1097. - compressed
  1098. - numBuckets
  1099. - serdeInfo
  1100. - bucketCols
  1101. - sortCols
  1102. - parameters
  1103. """
  1104. thrift_spec = (
  1105. None, # 0
  1106. (1, TType.LIST, 'cols', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 1
  1107. (2, TType.STRING, 'location', None, None, ), # 2
  1108. (3, TType.STRING, 'inputFormat', None, None, ), # 3
  1109. (4, TType.STRING, 'outputFormat', None, None, ), # 4
  1110. (5, TType.BOOL, 'compressed', None, None, ), # 5
  1111. (6, TType.I32, 'numBuckets', None, None, ), # 6
  1112. (7, TType.STRUCT, 'serdeInfo', (SerDeInfo, SerDeInfo.thrift_spec), None, ), # 7
  1113. (8, TType.LIST, 'bucketCols', (TType.STRING,None), None, ), # 8
  1114. (9, TType.LIST, 'sortCols', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 9
  1115. (10, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 10
  1116. )
  1117. def __init__(self, cols=None, location=None, inputFormat=None, outputFormat=None, compressed=None, numBuckets=None, serdeInfo=None, bucketCols=None, sortCols=None, parameters=None,):
  1118. self.cols = cols
  1119. self.location = location
  1120. self.inputFormat = inputFormat
  1121. self.outputFormat = outputFormat
  1122. self.compressed = compressed
  1123. self.numBuckets = numBuckets
  1124. self.serdeInfo = serdeInfo
  1125. self.bucketCols = bucketCols
  1126. self.sortCols = sortCols
  1127. self.parameters = parameters
  1128. def read(self, iprot):
  1129. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1130. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1131. return
  1132. iprot.readStructBegin()
  1133. while True:
  1134. (fname, ftype, fid) = iprot.readFieldBegin()
  1135. if ftype == TType.STOP:
  1136. break
  1137. if fid == 1:
  1138. if ftype == TType.LIST:
  1139. self.cols = []
  1140. (_etype90, _size87) = iprot.readListBegin()
  1141. for _i91 in xrange(_size87):
  1142. _elem92 = FieldSchema()
  1143. _elem92.read(iprot)
  1144. self.cols.append(_elem92)
  1145. iprot.readListEnd()
  1146. else:
  1147. iprot.skip(ftype)
  1148. elif fid == 2:
  1149. if ftype == TType.STRING:
  1150. self.location = iprot.readString();
  1151. else:
  1152. iprot.skip(ftype)
  1153. elif fid == 3:
  1154. if ftype == TType.STRING:
  1155. self.inputFormat = iprot.readString();
  1156. else:
  1157. iprot.skip(ftype)
  1158. elif fid == 4:
  1159. if ftype == TType.STRING:
  1160. self.outputFormat = iprot.readString();
  1161. else:
  1162. iprot.skip(ftype)
  1163. elif fid == 5:
  1164. if ftype == TType.BOOL:
  1165. self.compressed = iprot.readBool();
  1166. else:
  1167. iprot.skip(ftype)
  1168. elif fid == 6:
  1169. if ftype == TType.I32:
  1170. self.numBuckets = iprot.readI32();
  1171. else:
  1172. iprot.skip(ftype)
  1173. elif fid == 7:
  1174. if ftype == TType.STRUCT:
  1175. self.serdeInfo = SerDeInfo()
  1176. self.serdeInfo.read(iprot)
  1177. else:
  1178. iprot.skip(ftype)
  1179. elif fid == 8:
  1180. if ftype == TType.LIST:
  1181. self.bucketCols = []
  1182. (_etype96, _size93) = iprot.readListBegin()
  1183. for _i97 in xrange(_size93):
  1184. _elem98 = iprot.readString();
  1185. self.bucketCols.append(_elem98)
  1186. iprot.readListEnd()
  1187. else:
  1188. iprot.skip(ftype)
  1189. elif fid == 9:
  1190. if ftype == TType.LIST:
  1191. self.sortCols = []
  1192. (_etype102, _size99) = iprot.readListBegin()
  1193. for _i103 in xrange(_size99):
  1194. _elem104 = Order()
  1195. _elem104.read(iprot)
  1196. self.sortCols.append(_elem104)
  1197. iprot.readListEnd()
  1198. else:
  1199. iprot.skip(ftype)
  1200. elif fid == 10:
  1201. if ftype == TType.MAP:
  1202. self.parameters = {}
  1203. (_ktype106, _vtype107, _size105 ) = iprot.readMapBegin()
  1204. for _i109 in xrange(_size105):
  1205. _key110 = iprot.readString();
  1206. _val111 = iprot.readString();
  1207. self.parameters[_key110] = _val111
  1208. iprot.readMapEnd()
  1209. else:
  1210. iprot.skip(ftype)
  1211. else:
  1212. iprot.skip(ftype)
  1213. iprot.readFieldEnd()
  1214. iprot.readStructEnd()
  1215. def write(self, oprot):
  1216. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1217. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1218. return
  1219. oprot.writeStructBegin('StorageDescriptor')
  1220. if self.cols != None:
  1221. oprot.writeFieldBegin('cols', TType.LIST, 1)
  1222. oprot.writeListBegin(TType.STRUCT, len(self.cols))
  1223. for iter112 in self.cols:
  1224. iter112.write(oprot)
  1225. oprot.writeListEnd()
  1226. oprot.writeFieldEnd()
  1227. if self.location != None:
  1228. oprot.writeFieldBegin('location', TType.STRING, 2)
  1229. oprot.writeString(self.location)
  1230. oprot.writeFieldEnd()
  1231. if self.inputFormat != None:
  1232. oprot.writeFieldBegin('inputFormat', TType.STRING, 3)
  1233. oprot.writeString(self.inputFormat)
  1234. oprot.writeFieldEnd()
  1235. if self.outputFormat != None:
  1236. oprot.writeFieldBegin('outputFormat', TType.STRING, 4)
  1237. oprot.writeString(self.outputFormat)
  1238. oprot.writeFieldEnd()
  1239. if self.compressed != None:
  1240. oprot.writeFieldBegin('compressed', TType.BOOL, 5)
  1241. oprot.writeBool(self.compressed)
  1242. oprot.writeFieldEnd()
  1243. if self.numBuckets != None:
  1244. oprot.writeFieldBegin('numBuckets', TType.I32, 6)
  1245. oprot.writeI32(self.numBuckets)
  1246. oprot.writeFieldEnd()
  1247. if self.serdeInfo != None:
  1248. oprot.writeFieldBegin('serdeInfo', TType.STRUCT, 7)
  1249. self.serdeInfo.write(oprot)
  1250. oprot.writeFieldEnd()
  1251. if self.bucketCols != None:
  1252. oprot.writeFieldBegin('bucketCols', TType.LIST, 8)
  1253. oprot.writeListBegin(TType.STRING, len(self.bucketCols))
  1254. for iter113 in self.bucketCols:
  1255. oprot.writeString(iter113)
  1256. oprot.writeListEnd()
  1257. oprot.writeFieldEnd()
  1258. if self.sortCols != None:
  1259. oprot.writeFieldBegin('sortCols', TType.LIST, 9)
  1260. oprot.writeListBegin(TType.STRUCT, len(self.sortCols))
  1261. for iter114 in self.sortCols:
  1262. iter114.write(oprot)
  1263. oprot.writeListEnd()
  1264. oprot.writeFieldEnd()
  1265. if self.parameters != None:
  1266. oprot.writeFieldBegin('parameters', TType.MAP, 10)
  1267. oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
  1268. for kiter115,viter116 in self.parameters.items():
  1269. oprot.writeString(kiter115)
  1270. oprot.writeString(viter116)
  1271. oprot.writeMapEnd()
  1272. oprot.writeFieldEnd()
  1273. oprot.writeFieldStop()
  1274. oprot.writeStructEnd()
  1275. def validate(self):
  1276. return
  1277. def __repr__(self):
  1278. L = ['%s=%r' % (key, value)
  1279. for key, value in self.__dict__.iteritems()]
  1280. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1281. def __eq__(self, other):
  1282. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1283. def __ne__(self, other):
  1284. return not (self == other)
  1285. class Table:
  1286. """
  1287. Attributes:
  1288. - tableName
  1289. - dbName
  1290. - owner
  1291. - createTime
  1292. - lastAccessTime
  1293. - retention
  1294. - sd
  1295. - partitionKeys
  1296. - parameters
  1297. - viewOriginalText
  1298. - viewExpandedText
  1299. - tableType
  1300. - privileges
  1301. """
  1302. thrift_spec = (
  1303. None, # 0
  1304. (1, TType.STRING, 'tableName', None, None, ), # 1
  1305. (2, TType.STRING, 'dbName', None, None, ), # 2
  1306. (3, TType.STRING, 'owner', None, None, ), # 3
  1307. (4, TType.I32, 'createTime', None, None, ), # 4
  1308. (5, TType.I32, 'lastAccessTime', None, None, ), # 5
  1309. (6, TType.I32, 'retention', None, None, ), # 6
  1310. (7, TType.STRUCT, 'sd', (StorageDescriptor, StorageDescriptor.thrift_spec), None, ), # 7
  1311. (8, TType.LIST, 'partitionKeys', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 8
  1312. (9, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 9
  1313. (10, TType.STRING, 'viewOriginalText', None, None, ), # 10
  1314. (11, TType.STRING, 'viewExpandedText', None, None, ), # 11
  1315. (12, TType.STRING, 'tableType', None, None, ), # 12
  1316. (13, TType.STRUCT, 'privileges', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 13
  1317. )
  1318. def __init__(self, tableName=None, dbName=None, owner=None, createTime=None, lastAccessTime=None, retention=None, sd=None, partitionKeys=None, parameters=None, viewOriginalText=None, viewExpandedText=None, tableType=None, privileges=None,):
  1319. self.tableName = tableName
  1320. self.dbName = dbName
  1321. self.owner = owner
  1322. self.createTime = createTime
  1323. self.lastAccessTime = lastAccessTime
  1324. self.retention = retention
  1325. self.sd = sd
  1326. self.partitionKeys = partitionKeys
  1327. self.parameters = parameters
  1328. self.viewOriginalText = viewOriginalText
  1329. self.viewExpandedText = viewExpandedText
  1330. self.tableType = tableType
  1331. self.privileges = privileges
  1332. def read(self, iprot):
  1333. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1334. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1335. return
  1336. iprot.readStructBegin()
  1337. while True:
  1338. (fname, ftype, fid) = iprot.readFieldBegin()
  1339. if ftype == TType.STOP:
  1340. break
  1341. if fid == 1:
  1342. if ftype == TType.STRING:
  1343. self.tableName = iprot.readString();
  1344. else:
  1345. iprot.skip(ftype)
  1346. elif fid == 2:
  1347. if ftype == TType.STRING:
  1348. self.dbName = iprot.readString();
  1349. else:
  1350. iprot.skip(ftype)
  1351. elif fid == 3:
  1352. if ftype == TType.STRING:
  1353. self.owner = iprot.readString();
  1354. else:
  1355. iprot.skip(ftype)
  1356. elif fid == 4:
  1357. if ftype == TType.I32:
  1358. self.createTime = iprot.readI32();
  1359. else:
  1360. iprot.skip(ftype)
  1361. elif fid == 5:
  1362. if ftype == TType.I32:
  1363. self.lastAccessTime = iprot.readI32();
  1364. else:
  1365. iprot.skip(ftype)
  1366. elif fid == 6:
  1367. if ftype == TType.I32:
  1368. self.retention = iprot.readI32();
  1369. else:
  1370. iprot.skip(ftype)
  1371. elif fid == 7:
  1372. if ftype == TType.STRUCT:
  1373. self.sd = StorageDescriptor()
  1374. self.sd.read(iprot)
  1375. else:
  1376. iprot.skip(ftype)
  1377. elif fid == 8:
  1378. if ftype == TType.LIST:
  1379. self.partitionKeys = []
  1380. (_etype120, _size117) = iprot.readListBegin()
  1381. for _i121 in xrange(_size117):
  1382. _elem122 = FieldSchema()
  1383. _elem122.read(iprot)
  1384. self.partitionKeys.append(_elem122)
  1385. iprot.readListEnd()
  1386. else:
  1387. iprot.skip(ftype)
  1388. elif fid == 9:
  1389. if ftype == TType.MAP:
  1390. self.parameters = {}
  1391. (_ktype124, _vtype125, _size123 ) = iprot.readMapBegin()
  1392. for _i127 in xrange(_size123):
  1393. _key128 = iprot.readString();
  1394. _val129 = iprot.readString();
  1395. self.parameters[_key128] = _val129
  1396. iprot.readMapEnd()
  1397. else:
  1398. iprot.skip(ftype)
  1399. elif fid == 10:
  1400. if ftype == TType.STRING:
  1401. self.viewOriginalText = iprot.readString();
  1402. else:
  1403. iprot.skip(ftype)
  1404. elif fid == 11:
  1405. if ftype == TType.STRING:
  1406. self.viewExpandedText = iprot.readString();
  1407. else:
  1408. iprot.skip(ftype)
  1409. elif fid == 12:
  1410. if ftype == TType.STRING:
  1411. self.tableType = iprot.readString();
  1412. else:
  1413. iprot.skip(ftype)
  1414. elif fid == 13:
  1415. if ftype == TType.STRUCT:
  1416. self.privileges = PrincipalPrivilegeSet()
  1417. self.privileges.read(iprot)
  1418. else:
  1419. iprot.skip(ftype)
  1420. else:
  1421. iprot.skip(ftype)
  1422. iprot.readFieldEnd()
  1423. iprot.readStructEnd()
  1424. def write(self, oprot):
  1425. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1426. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1427. return
  1428. oprot.writeStructBegin('Table')
  1429. if self.tableName != None:
  1430. oprot.writeFieldBegin('tableName', TType.STRING, 1)
  1431. oprot.writeString(self.tableName)
  1432. oprot.writeFieldEnd()
  1433. if self.dbName != None:
  1434. oprot.writeFieldBegin('dbName', TType.STRING, 2)
  1435. oprot.writeString(self.dbName)
  1436. oprot.writeFieldEnd()
  1437. if self.owner != None:
  1438. oprot.writeFieldBegin('owner', TType.STRING, 3)
  1439. oprot.writeString(self.owner)
  1440. oprot.writeFieldEnd()
  1441. if self.createTime != None:
  1442. oprot.writeFieldBegin('createTime', TType.I32, 4)
  1443. oprot.writeI32(self.createTime)
  1444. oprot.writeFieldEnd()
  1445. if self.lastAccessTime != None:
  1446. oprot.writeFieldBegin('lastAccessTime', TType.I32, 5)
  1447. oprot.writeI32(self.lastAccessTime)
  1448. oprot.writeFieldEnd()
  1449. if self.retention != None:
  1450. oprot.writeFieldBegin('retention', TType.I32, 6)
  1451. oprot.writeI32(self.retention)
  1452. oprot.writeFieldEnd()
  1453. if self.sd != None:
  1454. oprot.writeFieldBegin('sd', TType.STRUCT, 7)
  1455. self.sd.write(oprot)
  1456. oprot.writeFieldEnd()
  1457. if self.partitionKeys != None:
  1458. oprot.writeFieldBegin('partitionKeys', TType.LIST, 8)
  1459. oprot.writeListBegin(TType.STRUCT, len(self.partitionKeys))
  1460. for iter130 in self.partitionKeys:
  1461. iter130.write(oprot)
  1462. oprot.writeListEnd()
  1463. oprot.writeFieldEnd()
  1464. if self.parameters != None:
  1465. oprot.writeFieldBegin('parameters', TType.MAP, 9)
  1466. oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
  1467. for kiter131,viter132 in self.parameters.items():
  1468. oprot.writeString(kiter131)
  1469. oprot.writeString(viter132)
  1470. oprot.writeMapEnd()
  1471. oprot.writeFieldEnd()
  1472. if self.viewOriginalText != None:
  1473. oprot.writeFieldBegin('viewOriginalText', TType.STRING, 10)
  1474. oprot.writeString(self.viewOriginalText)
  1475. oprot.writeFieldEnd()
  1476. if self.viewExpandedText != None:
  1477. oprot.writeFieldBegin('viewExpandedText', TType.STRING, 11)
  1478. oprot.writeString(self.viewExpandedText)
  1479. oprot.writeFieldEnd()
  1480. if self.tableType != None:
  1481. oprot.writeFieldBegin('tableType', TType.STRING, 12)
  1482. oprot.writeString(self.tableType)
  1483. oprot.writeFieldEnd()
  1484. if self.privileges != None:
  1485. oprot.writeFieldBegin('privileges', TType.STRUCT, 13)
  1486. self.privileges.write(oprot)
  1487. oprot.writeFieldEnd()
  1488. oprot.writeFieldStop()
  1489. oprot.writeStructEnd()
  1490. def validate(self):
  1491. return
  1492. def __repr__(self):
  1493. L = ['%s=%r' % (key, value)
  1494. for key, value in self.__dict__.iteritems()]
  1495. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1496. def __eq__(self, other):
  1497. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1498. def __ne__(self, other):
  1499. return not (self == other)
  1500. class Partition:
  1501. """
  1502. Attributes:
  1503. - values
  1504. - dbName
  1505. - tableName
  1506. - createTime
  1507. - lastAccessTime
  1508. - sd
  1509. - parameters
  1510. - privileges
  1511. """
  1512. thrift_spec = (
  1513. None, # 0
  1514. (1, TType.LIST, 'values', (TType.STRING,None), None, ), # 1
  1515. (2, TType.STRING, 'dbName', None, None, ), # 2
  1516. (3, TType.STRING, 'tableName', None, None, ), # 3
  1517. (4, TType.I32, 'createTime', None, None, ), # 4
  1518. (5, TType.I32, 'lastAccessTime', None, None, ), # 5
  1519. (6, TType.STRUCT, 'sd', (StorageDescriptor, StorageDescriptor.thrift_spec), None, ), # 6
  1520. (7, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 7
  1521. (8, TType.STRUCT, 'privileges', (PrincipalPrivilegeSet, PrincipalPrivilegeSet.thrift_spec), None, ), # 8
  1522. )
  1523. def __init__(self, values=None, dbName=None, tableName=None, createTime=None, lastAccessTime=None, sd=None, parameters=None, privileges=None,):
  1524. self.values = values
  1525. self.dbName = dbName
  1526. self.tableName = tableName
  1527. self.createTime = createTime
  1528. self.lastAccessTime = lastAccessTime
  1529. self.sd = sd
  1530. self.parameters = parameters
  1531. self.privileges = privileges
  1532. def read(self, iprot):
  1533. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1534. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1535. return
  1536. iprot.readStructBegin()
  1537. while True:
  1538. (fname, ftype, fid) = iprot.readFieldBegin()
  1539. if ftype == TType.STOP:
  1540. break
  1541. if fid == 1:
  1542. if ftype == TType.LIST:
  1543. self.values = []
  1544. (_etype136, _size133) = iprot.readListBegin()
  1545. for _i137 in xrange(_size133):
  1546. _elem138 = iprot.readString();
  1547. self.values.append(_elem138)
  1548. iprot.readListEnd()
  1549. else:
  1550. iprot.skip(ftype)
  1551. elif fid == 2:
  1552. if ftype == TType.STRING:
  1553. self.dbName = iprot.readString();
  1554. else:
  1555. iprot.skip(ftype)
  1556. elif fid == 3:
  1557. if ftype == TType.STRING:
  1558. self.tableName = iprot.readString();
  1559. else:
  1560. iprot.skip(ftype)
  1561. elif fid == 4:
  1562. if ftype == TType.I32:
  1563. self.createTime = iprot.readI32();
  1564. else:
  1565. iprot.skip(ftype)
  1566. elif fid == 5:
  1567. if ftype == TType.I32:
  1568. self.lastAccessTime = iprot.readI32();
  1569. else:
  1570. iprot.skip(ftype)
  1571. elif fid == 6:
  1572. if ftype == TType.STRUCT:
  1573. self.sd = StorageDescriptor()
  1574. self.sd.read(iprot)
  1575. else:
  1576. iprot.skip(ftype)
  1577. elif fid == 7:
  1578. if ftype == TType.MAP:
  1579. self.parameters = {}
  1580. (_ktype140, _vtype141, _size139 ) = iprot.readMapBegin()
  1581. for _i143 in xrange(_size139):
  1582. _key144 = iprot.readString();
  1583. _val145 = iprot.readString();
  1584. self.parameters[_key144] = _val145
  1585. iprot.readMapEnd()
  1586. else:
  1587. iprot.skip(ftype)
  1588. elif fid == 8:
  1589. if ftype == TType.STRUCT:
  1590. self.privileges = PrincipalPrivilegeSet()
  1591. self.privileges.read(iprot)
  1592. else:
  1593. iprot.skip(ftype)
  1594. else:
  1595. iprot.skip(ftype)
  1596. iprot.readFieldEnd()
  1597. iprot.readStructEnd()
  1598. def write(self, oprot):
  1599. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1600. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1601. return
  1602. oprot.writeStructBegin('Partition')
  1603. if self.values != None:
  1604. oprot.writeFieldBegin('values', TType.LIST, 1)
  1605. oprot.writeListBegin(TType.STRING, len(self.values))
  1606. for iter146 in self.values:
  1607. oprot.writeString(iter146)
  1608. oprot.writeListEnd()
  1609. oprot.writeFieldEnd()
  1610. if self.dbName != None:
  1611. oprot.writeFieldBegin('dbName', TType.STRING, 2)
  1612. oprot.writeString(self.dbName)
  1613. oprot.writeFieldEnd()
  1614. if self.tableName != None:
  1615. oprot.writeFieldBegin('tableName', TType.STRING, 3)
  1616. oprot.writeString(self.tableName)
  1617. oprot.writeFieldEnd()
  1618. if self.createTime != None:
  1619. oprot.writeFieldBegin('createTime', TType.I32, 4)
  1620. oprot.writeI32(self.createTime)
  1621. oprot.writeFieldEnd()
  1622. if self.lastAccessTime != None:
  1623. oprot.writeFieldBegin('lastAccessTime', TType.I32, 5)
  1624. oprot.writeI32(self.lastAccessTime)
  1625. oprot.writeFieldEnd()
  1626. if self.sd != None:
  1627. oprot.writeFieldBegin('sd', TType.STRUCT, 6)
  1628. self.sd.write(oprot)
  1629. oprot.writeFieldEnd()
  1630. if self.parameters != None:
  1631. oprot.writeFieldBegin('parameters', TType.MAP, 7)
  1632. oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
  1633. for kiter147,viter148 in self.parameters.items():
  1634. oprot.writeString(kiter147)
  1635. oprot.writeString(viter148)
  1636. oprot.writeMapEnd()
  1637. oprot.writeFieldEnd()
  1638. if self.privileges != None:
  1639. oprot.writeFieldBegin('privileges', TType.STRUCT, 8)
  1640. self.privileges.write(oprot)
  1641. oprot.writeFieldEnd()
  1642. oprot.writeFieldStop()
  1643. oprot.writeStructEnd()
  1644. def validate(self):
  1645. return
  1646. def __repr__(self):
  1647. L = ['%s=%r' % (key, value)
  1648. for key, value in self.__dict__.iteritems()]
  1649. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1650. def __eq__(self, other):
  1651. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1652. def __ne__(self, other):
  1653. return not (self == other)
  1654. class Index:
  1655. """
  1656. Attributes:
  1657. - indexName
  1658. - indexHandlerClass
  1659. - dbName
  1660. - origTableName
  1661. - createTime
  1662. - lastAccessTime
  1663. - indexTableName
  1664. - sd
  1665. - parameters
  1666. - deferredRebuild
  1667. """
  1668. thrift_spec = (
  1669. None, # 0
  1670. (1, TType.STRING, 'indexName', None, None, ), # 1
  1671. (2, TType.STRING, 'indexHandlerClass', None, None, ), # 2
  1672. (3, TType.STRING, 'dbName', None, None, ), # 3
  1673. (4, TType.STRING, 'origTableName', None, None, ), # 4
  1674. (5, TType.I32, 'createTime', None, None, ), # 5
  1675. (6, TType.I32, 'lastAccessTime', None, None, ), # 6
  1676. (7, TType.STRING, 'indexTableName', None, None, ), # 7
  1677. (8, TType.STRUCT, 'sd', (StorageDescriptor, StorageDescriptor.thrift_spec), None, ), # 8
  1678. (9, TType.MAP, 'parameters', (TType.STRING,None,TType.STRING,None), None, ), # 9
  1679. (10, TType.BOOL, 'deferredRebuild', None, None, ), # 10
  1680. )
  1681. def __init__(self, indexName=None, indexHandlerClass=None, dbName=None, origTableName=None, createTime=None, lastAccessTime=None, indexTableName=None, sd=None, parameters=None, deferredRebuild=None,):
  1682. self.indexName = indexName
  1683. self.indexHandlerClass = indexHandlerClass
  1684. self.dbName = dbName
  1685. self.origTableName = origTableName
  1686. self.createTime = createTime
  1687. self.lastAccessTime = lastAccessTime
  1688. self.indexTableName = indexTableName
  1689. self.sd = sd
  1690. self.parameters = parameters
  1691. self.deferredRebuild = deferredRebuild
  1692. def read(self, iprot):
  1693. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1694. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1695. return
  1696. iprot.readStructBegin()
  1697. while True:
  1698. (fname, ftype, fid) = iprot.readFieldBegin()
  1699. if ftype == TType.STOP:
  1700. break
  1701. if fid == 1:
  1702. if ftype == TType.STRING:
  1703. self.indexName = iprot.readString();
  1704. else:
  1705. iprot.skip(ftype)
  1706. elif fid == 2:
  1707. if ftype == TType.STRING:
  1708. self.indexHandlerClass = iprot.readString();
  1709. else:
  1710. iprot.skip(ftype)
  1711. elif fid == 3:
  1712. if ftype == TType.STRING:
  1713. self.dbName = iprot.readString();
  1714. else:
  1715. iprot.skip(ftype)
  1716. elif fid == 4:
  1717. if ftype == TType.STRING:
  1718. self.origTableName = iprot.readString();
  1719. else:
  1720. iprot.skip(ftype)
  1721. elif fid == 5:
  1722. if ftype == TType.I32:
  1723. self.createTime = iprot.readI32();
  1724. else:
  1725. iprot.skip(ftype)
  1726. elif fid == 6:
  1727. if ftype == TType.I32:
  1728. self.lastAccessTime = iprot.readI32();
  1729. else:
  1730. iprot.skip(ftype)
  1731. elif fid == 7:
  1732. if ftype == TType.STRING:
  1733. self.indexTableName = iprot.readString();
  1734. else:
  1735. iprot.skip(ftype)
  1736. elif fid == 8:
  1737. if ftype == TType.STRUCT:
  1738. self.sd = StorageDescriptor()
  1739. self.sd.read(iprot)
  1740. else:
  1741. iprot.skip(ftype)
  1742. elif fid == 9:
  1743. if ftype == TType.MAP:
  1744. self.parameters = {}
  1745. (_ktype150, _vtype151, _size149 ) = iprot.readMapBegin()
  1746. for _i153 in xrange(_size149):
  1747. _key154 = iprot.readString();
  1748. _val155 = iprot.readString();
  1749. self.parameters[_key154] = _val155
  1750. iprot.readMapEnd()
  1751. else:
  1752. iprot.skip(ftype)
  1753. elif fid == 10:
  1754. if ftype == TType.BOOL:
  1755. self.deferredRebuild = iprot.readBool();
  1756. else:
  1757. iprot.skip(ftype)
  1758. else:
  1759. iprot.skip(ftype)
  1760. iprot.readFieldEnd()
  1761. iprot.readStructEnd()
  1762. def write(self, oprot):
  1763. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1764. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1765. return
  1766. oprot.writeStructBegin('Index')
  1767. if self.indexName != None:
  1768. oprot.writeFieldBegin('indexName', TType.STRING, 1)
  1769. oprot.writeString(self.indexName)
  1770. oprot.writeFieldEnd()
  1771. if self.indexHandlerClass != None:
  1772. oprot.writeFieldBegin('indexHandlerClass', TType.STRING, 2)
  1773. oprot.writeString(self.indexHandlerClass)
  1774. oprot.writeFieldEnd()
  1775. if self.dbName != None:
  1776. oprot.writeFieldBegin('dbName', TType.STRING, 3)
  1777. oprot.writeString(self.dbName)
  1778. oprot.writeFieldEnd()
  1779. if self.origTableName != None:
  1780. oprot.writeFieldBegin('origTableName', TType.STRING, 4)
  1781. oprot.writeString(self.origTableName)
  1782. oprot.writeFieldEnd()
  1783. if self.createTime != None:
  1784. oprot.writeFieldBegin('createTime', TType.I32, 5)
  1785. oprot.writeI32(self.createTime)
  1786. oprot.writeFieldEnd()
  1787. if self.lastAccessTime != None:
  1788. oprot.writeFieldBegin('lastAccessTime', TType.I32, 6)
  1789. oprot.writeI32(self.lastAccessTime)
  1790. oprot.writeFieldEnd()
  1791. if self.indexTableName != None:
  1792. oprot.writeFieldBegin('indexTableName', TType.STRING, 7)
  1793. oprot.writeString(self.indexTableName)
  1794. oprot.writeFieldEnd()
  1795. if self.sd != None:
  1796. oprot.writeFieldBegin('sd', TType.STRUCT, 8)
  1797. self.sd.write(oprot)
  1798. oprot.writeFieldEnd()
  1799. if self.parameters != None:
  1800. oprot.writeFieldBegin('parameters', TType.MAP, 9)
  1801. oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.parameters))
  1802. for kiter156,viter157 in self.parameters.items():
  1803. oprot.writeString(kiter156)
  1804. oprot.writeString(viter157)
  1805. oprot.writeMapEnd()
  1806. oprot.writeFieldEnd()
  1807. if self.deferredRebuild != None:
  1808. oprot.writeFieldBegin('deferredRebuild', TType.BOOL, 10)
  1809. oprot.writeBool(self.deferredRebuild)
  1810. oprot.writeFieldEnd()
  1811. oprot.writeFieldStop()
  1812. oprot.writeStructEnd()
  1813. def validate(self):
  1814. return
  1815. def __repr__(self):
  1816. L = ['%s=%r' % (key, value)
  1817. for key, value in self.__dict__.iteritems()]
  1818. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1819. def __eq__(self, other):
  1820. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1821. def __ne__(self, other):
  1822. return not (self == other)
  1823. class Schema:
  1824. """
  1825. Attributes:
  1826. - fieldSchemas
  1827. - properties
  1828. """
  1829. thrift_spec = (
  1830. None, # 0
  1831. (1, TType.LIST, 'fieldSchemas', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 1
  1832. (2, TType.MAP, 'properties', (TType.STRING,None,TType.STRING,None), None, ), # 2
  1833. )
  1834. def __init__(self, fieldSchemas=None, properties=None,):
  1835. self.fieldSchemas = fieldSchemas
  1836. self.properties = properties
  1837. def read(self, iprot):
  1838. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1839. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1840. return
  1841. iprot.readStructBegin()
  1842. while True:
  1843. (fname, ftype, fid) = iprot.readFieldBegin()
  1844. if ftype == TType.STOP:
  1845. break
  1846. if fid == 1:
  1847. if ftype == TType.LIST:
  1848. self.fieldSchemas = []
  1849. (_etype161, _size158) = iprot.readListBegin()
  1850. for _i162 in xrange(_size158):
  1851. _elem163 = FieldSchema()
  1852. _elem163.read(iprot)
  1853. self.fieldSchemas.append(_elem163)
  1854. iprot.readListEnd()
  1855. else:
  1856. iprot.skip(ftype)
  1857. elif fid == 2:
  1858. if ftype == TType.MAP:
  1859. self.properties = {}
  1860. (_ktype165, _vtype166, _size164 ) = iprot.readMapBegin()
  1861. for _i168 in xrange(_size164):
  1862. _key169 = iprot.readString();
  1863. _val170 = iprot.readString();
  1864. self.properties[_key169] = _val170
  1865. iprot.readMapEnd()
  1866. else:
  1867. iprot.skip(ftype)
  1868. else:
  1869. iprot.skip(ftype)
  1870. iprot.readFieldEnd()
  1871. iprot.readStructEnd()
  1872. def write(self, oprot):
  1873. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1874. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1875. return
  1876. oprot.writeStructBegin('Schema')
  1877. if self.fieldSchemas != None:
  1878. oprot.writeFieldBegin('fieldSchemas', TType.LIST, 1)
  1879. oprot.writeListBegin(TType.STRUCT, len(self.fieldSchemas))
  1880. for iter171 in self.fieldSchemas:
  1881. iter171.write(oprot)
  1882. oprot.writeListEnd()
  1883. oprot.writeFieldEnd()
  1884. if self.properties != None:
  1885. oprot.writeFieldBegin('properties', TType.MAP, 2)
  1886. oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.properties))
  1887. for kiter172,viter173 in self.properties.items():
  1888. oprot.writeString(kiter172)
  1889. oprot.writeString(viter173)
  1890. oprot.writeMapEnd()
  1891. oprot.writeFieldEnd()
  1892. oprot.writeFieldStop()
  1893. oprot.writeStructEnd()
  1894. def validate(self):
  1895. return
  1896. def __repr__(self):
  1897. L = ['%s=%r' % (key, value)
  1898. for key, value in self.__dict__.iteritems()]
  1899. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1900. def __eq__(self, other):
  1901. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1902. def __ne__(self, other):
  1903. return not (self == other)
  1904. class MetaException(Exception):
  1905. """
  1906. Attributes:
  1907. - message
  1908. """
  1909. thrift_spec = (
  1910. None, # 0
  1911. (1, TType.STRING, 'message', None, None, ), # 1
  1912. )
  1913. def __init__(self, message=None,):
  1914. self.message = message
  1915. def read(self, iprot):
  1916. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1917. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1918. return
  1919. iprot.readStructBegin()
  1920. while True:
  1921. (fname, ftype, fid) = iprot.readFieldBegin()
  1922. if ftype == TType.STOP:
  1923. break
  1924. if fid == 1:
  1925. if ftype == TType.STRING:
  1926. self.message = iprot.readString();
  1927. else:
  1928. iprot.skip(ftype)
  1929. else:
  1930. iprot.skip(ftype)
  1931. iprot.readFieldEnd()
  1932. iprot.readStructEnd()
  1933. def write(self, oprot):
  1934. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1935. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1936. return
  1937. oprot.writeStructBegin('MetaException')
  1938. if self.message != None:
  1939. oprot.writeFieldBegin('message', TType.STRING, 1)
  1940. oprot.writeString(self.message)
  1941. oprot.writeFieldEnd()
  1942. oprot.writeFieldStop()
  1943. oprot.writeStructEnd()
  1944. def validate(self):
  1945. return
  1946. def __str__(self):
  1947. return repr(self)
  1948. def __repr__(self):
  1949. L = ['%s=%r' % (key, value)
  1950. for key, value in self.__dict__.iteritems()]
  1951. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1952. def __eq__(self, other):
  1953. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1954. def __ne__(self, other):
  1955. return not (self == other)
  1956. class UnknownTableException(Exception):
  1957. """
  1958. Attributes:
  1959. - message
  1960. """
  1961. thrift_spec = (
  1962. None, # 0
  1963. (1, TType.STRING, 'message', None, None, ), # 1
  1964. )
  1965. def __init__(self, message=None,):
  1966. self.message = message
  1967. def read(self, iprot):
  1968. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1969. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1970. return
  1971. iprot.readStructBegin()
  1972. while True:
  1973. (fname, ftype, fid) = iprot.readFieldBegin()
  1974. if ftype == TType.STOP:
  1975. break
  1976. if fid == 1:
  1977. if ftype == TType.STRING:
  1978. self.message = iprot.readString();
  1979. else:
  1980. iprot.skip(ftype)
  1981. else:
  1982. iprot.skip(ftype)
  1983. iprot.readFieldEnd()
  1984. iprot.readStructEnd()
  1985. def write(self, oprot):
  1986. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1987. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1988. return
  1989. oprot.writeStructBegin('UnknownTableException')
  1990. if self.message != None:
  1991. oprot.writeFieldBegin('message', TType.STRING, 1)
  1992. oprot.writeString(self.message)
  1993. oprot.writeFieldEnd()
  1994. oprot.writeFieldStop()
  1995. oprot.writeStructEnd()
  1996. def validate(self):
  1997. return
  1998. def __str__(self):
  1999. return repr(self)
  2000. def __repr__(self):
  2001. L = ['%s=%r' % (key, value)
  2002. for key, value in self.__dict__.iteritems()]
  2003. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2004. def __eq__(self, other):
  2005. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2006. def __ne__(self, other):
  2007. return not (self == other)
  2008. class UnknownDBException(Exception):
  2009. """
  2010. Attributes:
  2011. - message
  2012. """
  2013. thrift_spec = (
  2014. None, # 0
  2015. (1, TType.STRING, 'message', None, None, ), # 1
  2016. )
  2017. def __init__(self, message=None,):
  2018. self.message = message
  2019. def read(self, iprot):
  2020. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2021. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2022. return
  2023. iprot.readStructBegin()
  2024. while True:
  2025. (fname, ftype, fid) = iprot.readFieldBegin()
  2026. if ftype == TType.STOP:
  2027. break
  2028. if fid == 1:
  2029. if ftype == TType.STRING:
  2030. self.message = iprot.readString();
  2031. else:
  2032. iprot.skip(ftype)
  2033. else:
  2034. iprot.skip(ftype)
  2035. iprot.readFieldEnd()
  2036. iprot.readStructEnd()
  2037. def write(self, oprot):
  2038. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2039. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2040. return
  2041. oprot.writeStructBegin('UnknownDBException')
  2042. if self.message != None:
  2043. oprot.writeFieldBegin('message', TType.STRING, 1)
  2044. oprot.writeString(self.message)
  2045. oprot.writeFieldEnd()
  2046. oprot.writeFieldStop()
  2047. oprot.writeStructEnd()
  2048. def validate(self):
  2049. return
  2050. def __str__(self):
  2051. return repr(self)
  2052. def __repr__(self):
  2053. L = ['%s=%r' % (key, value)
  2054. for key, value in self.__dict__.iteritems()]
  2055. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2056. def __eq__(self, other):
  2057. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2058. def __ne__(self, other):
  2059. return not (self == other)
  2060. class AlreadyExistsException(Exception):
  2061. """
  2062. Attributes:
  2063. - message
  2064. """
  2065. thrift_spec = (
  2066. None, # 0
  2067. (1, TType.STRING, 'message', None, None, ), # 1
  2068. )
  2069. def __init__(self, message=None,):
  2070. self.message = message
  2071. def read(self, iprot):
  2072. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2073. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2074. return
  2075. iprot.readStructBegin()
  2076. while True:
  2077. (fname, ftype, fid) = iprot.readFieldBegin()
  2078. if ftype == TType.STOP:
  2079. break
  2080. if fid == 1:
  2081. if ftype == TType.STRING:
  2082. self.message = iprot.readString();
  2083. else:
  2084. iprot.skip(ftype)
  2085. else:
  2086. iprot.skip(ftype)
  2087. iprot.readFieldEnd()
  2088. iprot.readStructEnd()
  2089. def write(self, oprot):
  2090. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2091. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2092. return
  2093. oprot.writeStructBegin('AlreadyExistsException')
  2094. if self.message != None:
  2095. oprot.writeFieldBegin('message', TType.STRING, 1)
  2096. oprot.writeString(self.message)
  2097. oprot.writeFieldEnd()
  2098. oprot.writeFieldStop()
  2099. oprot.writeStructEnd()
  2100. def validate(self):
  2101. return
  2102. def __str__(self):
  2103. return repr(self)
  2104. def __repr__(self):
  2105. L = ['%s=%r' % (key, value)
  2106. for key, value in self.__dict__.iteritems()]
  2107. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2108. def __eq__(self, other):
  2109. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2110. def __ne__(self, other):
  2111. return not (self == other)
  2112. class InvalidObjectException(Exception):
  2113. """
  2114. Attributes:
  2115. - message
  2116. """
  2117. thrift_spec = (
  2118. None, # 0
  2119. (1, TType.STRING, 'message', None, None, ), # 1
  2120. )
  2121. def __init__(self, message=None,):
  2122. self.message = message
  2123. def read(self, iprot):
  2124. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2125. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2126. return
  2127. iprot.readStructBegin()
  2128. while True:
  2129. (fname, ftype, fid) = iprot.readFieldBegin()
  2130. if ftype == TType.STOP:
  2131. break
  2132. if fid == 1:
  2133. if ftype == TType.STRING:
  2134. self.message = iprot.readString();
  2135. else:
  2136. iprot.skip(ftype)
  2137. else:
  2138. iprot.skip(ftype)
  2139. iprot.readFieldEnd()
  2140. iprot.readStructEnd()
  2141. def write(self, oprot):
  2142. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2143. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2144. return
  2145. oprot.writeStructBegin('InvalidObjectException')
  2146. if self.message != None:
  2147. oprot.writeFieldBegin('message', TType.STRING, 1)
  2148. oprot.writeString(self.message)
  2149. oprot.writeFieldEnd()
  2150. oprot.writeFieldStop()
  2151. oprot.writeStructEnd()
  2152. def validate(self):
  2153. return
  2154. def __str__(self):
  2155. return repr(self)
  2156. def __repr__(self):
  2157. L = ['%s=%r' % (key, value)
  2158. for key, value in self.__dict__.iteritems()]
  2159. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2160. def __eq__(self, other):
  2161. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2162. def __ne__(self, other):
  2163. return not (self == other)
  2164. class NoSuchObjectException(Exception):
  2165. """
  2166. Attributes:
  2167. - message
  2168. """
  2169. thrift_spec = (
  2170. None, # 0
  2171. (1, TType.STRING, 'message', None, None, ), # 1
  2172. )
  2173. def __init__(self, message=None,):
  2174. self.message = message
  2175. def read(self, iprot):
  2176. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2177. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2178. return
  2179. iprot.readStructBegin()
  2180. while True:
  2181. (fname, ftype, fid) = iprot.readFieldBegin()
  2182. if ftype == TType.STOP:
  2183. break
  2184. if fid == 1:
  2185. if ftype == TType.STRING:
  2186. self.message = iprot.readString();
  2187. else:
  2188. iprot.skip(ftype)
  2189. else:
  2190. iprot.skip(ftype)
  2191. iprot.readFieldEnd()
  2192. iprot.readStructEnd()
  2193. def write(self, oprot):
  2194. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2195. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2196. return
  2197. oprot.writeStructBegin('NoSuchObjectException')
  2198. if self.message != None:
  2199. oprot.writeFieldBegin('message', TType.STRING, 1)
  2200. oprot.writeString(self.message)
  2201. oprot.writeFieldEnd()
  2202. oprot.writeFieldStop()
  2203. oprot.writeStructEnd()
  2204. def validate(self):
  2205. return
  2206. def __str__(self):
  2207. return repr(self)
  2208. def __repr__(self):
  2209. L = ['%s=%r' % (key, value)
  2210. for key, value in self.__dict__.iteritems()]
  2211. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2212. def __eq__(self, other):
  2213. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2214. def __ne__(self, other):
  2215. return not (self == other)
  2216. class IndexAlreadyExistsException(Exception):
  2217. """
  2218. Attributes:
  2219. - message
  2220. """
  2221. thrift_spec = (
  2222. None, # 0
  2223. (1, TType.STRING, 'message', None, None, ), # 1
  2224. )
  2225. def __init__(self, message=None,):
  2226. self.message = message
  2227. def read(self, iprot):
  2228. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2229. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2230. return
  2231. iprot.readStructBegin()
  2232. while True:
  2233. (fname, ftype, fid) = iprot.readFieldBegin()
  2234. if ftype == TType.STOP:
  2235. break
  2236. if fid == 1:
  2237. if ftype == TType.STRING:
  2238. self.message = iprot.readString();
  2239. else:
  2240. iprot.skip(ftype)
  2241. else:
  2242. iprot.skip(ftype)
  2243. iprot.readFieldEnd()
  2244. iprot.readStructEnd()
  2245. def write(self, oprot):
  2246. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2247. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2248. return
  2249. oprot.writeStructBegin('IndexAlreadyExistsException')
  2250. if self.message != None:
  2251. oprot.writeFieldBegin('message', TType.STRING, 1)
  2252. oprot.writeString(self.message)
  2253. oprot.writeFieldEnd()
  2254. oprot.writeFieldStop()
  2255. oprot.writeStructEnd()
  2256. def validate(self):
  2257. return
  2258. def __str__(self):
  2259. return repr(self)
  2260. def __repr__(self):
  2261. L = ['%s=%r' % (key, value)
  2262. for key, value in self.__dict__.iteritems()]
  2263. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2264. def __eq__(self, other):
  2265. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2266. def __ne__(self, other):
  2267. return not (self == other)
  2268. class InvalidOperationException(Exception):
  2269. """
  2270. Attributes:
  2271. - message
  2272. """
  2273. thrift_spec = (
  2274. None, # 0
  2275. (1, TType.STRING, 'message', None, None, ), # 1
  2276. )
  2277. def __init__(self, message=None,):
  2278. self.message = message
  2279. def read(self, iprot):
  2280. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2281. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2282. return
  2283. iprot.readStructBegin()
  2284. while True:
  2285. (fname, ftype, fid) = iprot.readFieldBegin()
  2286. if ftype == TType.STOP:
  2287. break
  2288. if fid == 1:
  2289. if ftype == TType.STRING:
  2290. self.message = iprot.readString();
  2291. else:
  2292. iprot.skip(ftype)
  2293. else:
  2294. iprot.skip(ftype)
  2295. iprot.readFieldEnd()
  2296. iprot.readStructEnd()
  2297. def write(self, oprot):
  2298. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2299. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2300. return
  2301. oprot.writeStructBegin('InvalidOperationException')
  2302. if self.message != None:
  2303. oprot.writeFieldBegin('message', TType.STRING, 1)
  2304. oprot.writeString(self.message)
  2305. oprot.writeFieldEnd()
  2306. oprot.writeFieldStop()
  2307. oprot.writeStructEnd()
  2308. def validate(self):
  2309. return
  2310. def __str__(self):
  2311. return repr(self)
  2312. def __repr__(self):
  2313. L = ['%s=%r' % (key, value)
  2314. for key, value in self.__dict__.iteritems()]
  2315. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2316. def __eq__(self, other):
  2317. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2318. def __ne__(self, other):
  2319. return not (self == other)
  2320. class ConfigValSecurityException(Exception):
  2321. """
  2322. Attributes:
  2323. - message
  2324. """
  2325. thrift_spec = (
  2326. None, # 0
  2327. (1, TType.STRING, 'message', None, None, ), # 1
  2328. )
  2329. def __init__(self, message=None,):
  2330. self.message = message
  2331. def read(self, iprot):
  2332. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  2333. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  2334. return
  2335. iprot.readStructBegin()
  2336. while True:
  2337. (fname, ftype, fid) = iprot.readFieldBegin()
  2338. if ftype == TType.STOP:
  2339. break
  2340. if fid == 1:
  2341. if ftype == TType.STRING:
  2342. self.message = iprot.readString();
  2343. else:
  2344. iprot.skip(ftype)
  2345. else:
  2346. iprot.skip(ftype)
  2347. iprot.readFieldEnd()
  2348. iprot.readStructEnd()
  2349. def write(self, oprot):
  2350. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  2351. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  2352. return
  2353. oprot.writeStructBegin('ConfigValSecurityException')
  2354. if self.message != None:
  2355. oprot.writeFieldBegin('message', TType.STRING, 1)
  2356. oprot.writeString(self.message)
  2357. oprot.writeFieldEnd()
  2358. oprot.writeFieldStop()
  2359. oprot.writeStructEnd()
  2360. def validate(self):
  2361. return
  2362. def __str__(self):
  2363. return repr(self)
  2364. def __repr__(self):
  2365. L = ['%s=%r' % (key, value)
  2366. for key, value in self.__dict__.iteritems()]
  2367. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  2368. def __eq__(self, other):
  2369. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  2370. def __ne__(self, other):
  2371. return not (self == other)