PageRenderTime 95ms CodeModel.GetById 29ms RepoModel.GetById 0ms app.codeStats 1ms

/tags/release-0.1-rc2/hive/external/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py

#
Python | 7978 lines | 6267 code | 792 blank | 919 comment | 1624 complexity | 4f8890f7730bf0fcf880328481265676 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.FacebookService
  8. from ttypes import *
  9. from thrift.Thrift import TProcessor
  10. from thrift.transport import TTransport
  11. from thrift.protocol import TBinaryProtocol, TProtocol
  12. try:
  13. from thrift.protocol import fastbinary
  14. except:
  15. fastbinary = None
  16. class Iface(fb303.FacebookService.Iface):
  17. """
  18. This interface is live.
  19. """
  20. def create_database(self, database):
  21. """
  22. Parameters:
  23. - database
  24. """
  25. pass
  26. def get_database(self, name):
  27. """
  28. Parameters:
  29. - name
  30. """
  31. pass
  32. def drop_database(self, name, deleteData):
  33. """
  34. Parameters:
  35. - name
  36. - deleteData
  37. """
  38. pass
  39. def get_databases(self, pattern):
  40. """
  41. Parameters:
  42. - pattern
  43. """
  44. pass
  45. def get_all_databases(self, ):
  46. pass
  47. def alter_database(self, dbname, db):
  48. """
  49. Parameters:
  50. - dbname
  51. - db
  52. """
  53. pass
  54. def get_type(self, name):
  55. """
  56. Parameters:
  57. - name
  58. """
  59. pass
  60. def create_type(self, type):
  61. """
  62. Parameters:
  63. - type
  64. """
  65. pass
  66. def drop_type(self, type):
  67. """
  68. Parameters:
  69. - type
  70. """
  71. pass
  72. def get_type_all(self, name):
  73. """
  74. Parameters:
  75. - name
  76. """
  77. pass
  78. def get_fields(self, db_name, table_name):
  79. """
  80. Parameters:
  81. - db_name
  82. - table_name
  83. """
  84. pass
  85. def get_schema(self, db_name, table_name):
  86. """
  87. Parameters:
  88. - db_name
  89. - table_name
  90. """
  91. pass
  92. def create_table(self, tbl):
  93. """
  94. Parameters:
  95. - tbl
  96. """
  97. pass
  98. def drop_table(self, dbname, name, deleteData):
  99. """
  100. Parameters:
  101. - dbname
  102. - name
  103. - deleteData
  104. """
  105. pass
  106. def get_tables(self, db_name, pattern):
  107. """
  108. Parameters:
  109. - db_name
  110. - pattern
  111. """
  112. pass
  113. def get_all_tables(self, db_name):
  114. """
  115. Parameters:
  116. - db_name
  117. """
  118. pass
  119. def get_table(self, dbname, tbl_name):
  120. """
  121. Parameters:
  122. - dbname
  123. - tbl_name
  124. """
  125. pass
  126. def alter_table(self, dbname, tbl_name, new_tbl):
  127. """
  128. Parameters:
  129. - dbname
  130. - tbl_name
  131. - new_tbl
  132. """
  133. pass
  134. def add_partition(self, new_part):
  135. """
  136. Parameters:
  137. - new_part
  138. """
  139. pass
  140. def append_partition(self, db_name, tbl_name, part_vals):
  141. """
  142. Parameters:
  143. - db_name
  144. - tbl_name
  145. - part_vals
  146. """
  147. pass
  148. def append_partition_by_name(self, db_name, tbl_name, part_name):
  149. """
  150. Parameters:
  151. - db_name
  152. - tbl_name
  153. - part_name
  154. """
  155. pass
  156. def drop_partition(self, db_name, tbl_name, part_vals, deleteData):
  157. """
  158. Parameters:
  159. - db_name
  160. - tbl_name
  161. - part_vals
  162. - deleteData
  163. """
  164. pass
  165. def drop_partition_by_name(self, db_name, tbl_name, part_name, deleteData):
  166. """
  167. Parameters:
  168. - db_name
  169. - tbl_name
  170. - part_name
  171. - deleteData
  172. """
  173. pass
  174. def get_partition(self, db_name, tbl_name, part_vals):
  175. """
  176. Parameters:
  177. - db_name
  178. - tbl_name
  179. - part_vals
  180. """
  181. pass
  182. def get_partition_with_auth(self, db_name, tbl_name, part_vals, user_name, group_names):
  183. """
  184. Parameters:
  185. - db_name
  186. - tbl_name
  187. - part_vals
  188. - user_name
  189. - group_names
  190. """
  191. pass
  192. def get_partition_by_name(self, db_name, tbl_name, part_name):
  193. """
  194. Parameters:
  195. - db_name
  196. - tbl_name
  197. - part_name
  198. """
  199. pass
  200. def get_partitions(self, db_name, tbl_name, max_parts):
  201. """
  202. Parameters:
  203. - db_name
  204. - tbl_name
  205. - max_parts
  206. """
  207. pass
  208. def get_partitions_with_auth(self, db_name, tbl_name, max_parts, user_name, group_names):
  209. """
  210. Parameters:
  211. - db_name
  212. - tbl_name
  213. - max_parts
  214. - user_name
  215. - group_names
  216. """
  217. pass
  218. def get_partition_names(self, db_name, tbl_name, max_parts):
  219. """
  220. Parameters:
  221. - db_name
  222. - tbl_name
  223. - max_parts
  224. """
  225. pass
  226. def get_partitions_ps(self, db_name, tbl_name, part_vals, max_parts):
  227. """
  228. Parameters:
  229. - db_name
  230. - tbl_name
  231. - part_vals
  232. - max_parts
  233. """
  234. pass
  235. def get_partitions_ps_with_auth(self, db_name, tbl_name, part_vals, max_parts, user_name, group_names):
  236. """
  237. Parameters:
  238. - db_name
  239. - tbl_name
  240. - part_vals
  241. - max_parts
  242. - user_name
  243. - group_names
  244. """
  245. pass
  246. def get_partition_names_ps(self, db_name, tbl_name, part_vals, max_parts):
  247. """
  248. Parameters:
  249. - db_name
  250. - tbl_name
  251. - part_vals
  252. - max_parts
  253. """
  254. pass
  255. def get_partitions_by_filter(self, db_name, tbl_name, filter, max_parts):
  256. """
  257. Parameters:
  258. - db_name
  259. - tbl_name
  260. - filter
  261. - max_parts
  262. """
  263. pass
  264. def alter_partition(self, db_name, tbl_name, new_part):
  265. """
  266. Parameters:
  267. - db_name
  268. - tbl_name
  269. - new_part
  270. """
  271. pass
  272. def get_config_value(self, name, defaultValue):
  273. """
  274. Parameters:
  275. - name
  276. - defaultValue
  277. """
  278. pass
  279. def partition_name_to_vals(self, part_name):
  280. """
  281. Parameters:
  282. - part_name
  283. """
  284. pass
  285. def partition_name_to_spec(self, part_name):
  286. """
  287. Parameters:
  288. - part_name
  289. """
  290. pass
  291. def add_index(self, new_index, index_table):
  292. """
  293. Parameters:
  294. - new_index
  295. - index_table
  296. """
  297. pass
  298. def alter_index(self, dbname, base_tbl_name, idx_name, new_idx):
  299. """
  300. Parameters:
  301. - dbname
  302. - base_tbl_name
  303. - idx_name
  304. - new_idx
  305. """
  306. pass
  307. def drop_index_by_name(self, db_name, tbl_name, index_name, deleteData):
  308. """
  309. Parameters:
  310. - db_name
  311. - tbl_name
  312. - index_name
  313. - deleteData
  314. """
  315. pass
  316. def get_index_by_name(self, db_name, tbl_name, index_name):
  317. """
  318. Parameters:
  319. - db_name
  320. - tbl_name
  321. - index_name
  322. """
  323. pass
  324. def get_indexes(self, db_name, tbl_name, max_indexes):
  325. """
  326. Parameters:
  327. - db_name
  328. - tbl_name
  329. - max_indexes
  330. """
  331. pass
  332. def get_index_names(self, db_name, tbl_name, max_indexes):
  333. """
  334. Parameters:
  335. - db_name
  336. - tbl_name
  337. - max_indexes
  338. """
  339. pass
  340. def create_role(self, role):
  341. """
  342. Parameters:
  343. - role
  344. """
  345. pass
  346. def drop_role(self, role_name):
  347. """
  348. Parameters:
  349. - role_name
  350. """
  351. pass
  352. def get_role_names(self, ):
  353. pass
  354. def grant_role(self, role_name, principal_name, principal_type, grantor, grantorType, grant_option):
  355. """
  356. Parameters:
  357. - role_name
  358. - principal_name
  359. - principal_type
  360. - grantor
  361. - grantorType
  362. - grant_option
  363. """
  364. pass
  365. def revoke_role(self, role_name, principal_name, principal_type):
  366. """
  367. Parameters:
  368. - role_name
  369. - principal_name
  370. - principal_type
  371. """
  372. pass
  373. def list_roles(self, principal_name, principal_type):
  374. """
  375. Parameters:
  376. - principal_name
  377. - principal_type
  378. """
  379. pass
  380. def get_privilege_set(self, hiveObject, user_name, group_names):
  381. """
  382. Parameters:
  383. - hiveObject
  384. - user_name
  385. - group_names
  386. """
  387. pass
  388. def list_privileges(self, principal_name, principal_type, hiveObject):
  389. """
  390. Parameters:
  391. - principal_name
  392. - principal_type
  393. - hiveObject
  394. """
  395. pass
  396. def grant_privileges(self, privileges):
  397. """
  398. Parameters:
  399. - privileges
  400. """
  401. pass
  402. def revoke_privileges(self, privileges):
  403. """
  404. Parameters:
  405. - privileges
  406. """
  407. pass
  408. def get_delegation_token(self, renewer_kerberos_principal_name):
  409. """
  410. Parameters:
  411. - renewer_kerberos_principal_name
  412. """
  413. pass
  414. def get_delegation_token_with_signature(self, renewer_kerberos_principal_name, token_signature):
  415. """
  416. Parameters:
  417. - renewer_kerberos_principal_name
  418. - token_signature
  419. """
  420. pass
  421. def renew_delegation_token(self, token_str_form):
  422. """
  423. Parameters:
  424. - token_str_form
  425. """
  426. pass
  427. def cancel_delegation_token(self, token_str_form):
  428. """
  429. Parameters:
  430. - token_str_form
  431. """
  432. pass
  433. class Client(fb303.FacebookService.Client, Iface):
  434. """
  435. This interface is live.
  436. """
  437. def __init__(self, iprot, oprot=None):
  438. fb303.FacebookService.Client.__init__(self, iprot, oprot)
  439. def create_database(self, database):
  440. """
  441. Parameters:
  442. - database
  443. """
  444. self.send_create_database(database)
  445. self.recv_create_database()
  446. def send_create_database(self, database):
  447. self._oprot.writeMessageBegin('create_database', TMessageType.CALL, self._seqid)
  448. args = create_database_args()
  449. args.database = database
  450. args.write(self._oprot)
  451. self._oprot.writeMessageEnd()
  452. self._oprot.trans.flush()
  453. def recv_create_database(self, ):
  454. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  455. if mtype == TMessageType.EXCEPTION:
  456. x = TApplicationException()
  457. x.read(self._iprot)
  458. self._iprot.readMessageEnd()
  459. raise x
  460. result = create_database_result()
  461. result.read(self._iprot)
  462. self._iprot.readMessageEnd()
  463. if result.o1 != None:
  464. raise result.o1
  465. if result.o2 != None:
  466. raise result.o2
  467. if result.o3 != None:
  468. raise result.o3
  469. return
  470. def get_database(self, name):
  471. """
  472. Parameters:
  473. - name
  474. """
  475. self.send_get_database(name)
  476. return self.recv_get_database()
  477. def send_get_database(self, name):
  478. self._oprot.writeMessageBegin('get_database', TMessageType.CALL, self._seqid)
  479. args = get_database_args()
  480. args.name = name
  481. args.write(self._oprot)
  482. self._oprot.writeMessageEnd()
  483. self._oprot.trans.flush()
  484. def recv_get_database(self, ):
  485. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  486. if mtype == TMessageType.EXCEPTION:
  487. x = TApplicationException()
  488. x.read(self._iprot)
  489. self._iprot.readMessageEnd()
  490. raise x
  491. result = get_database_result()
  492. result.read(self._iprot)
  493. self._iprot.readMessageEnd()
  494. if result.success != None:
  495. return result.success
  496. if result.o1 != None:
  497. raise result.o1
  498. if result.o2 != None:
  499. raise result.o2
  500. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_database failed: unknown result");
  501. def drop_database(self, name, deleteData):
  502. """
  503. Parameters:
  504. - name
  505. - deleteData
  506. """
  507. self.send_drop_database(name, deleteData)
  508. self.recv_drop_database()
  509. def send_drop_database(self, name, deleteData):
  510. self._oprot.writeMessageBegin('drop_database', TMessageType.CALL, self._seqid)
  511. args = drop_database_args()
  512. args.name = name
  513. args.deleteData = deleteData
  514. args.write(self._oprot)
  515. self._oprot.writeMessageEnd()
  516. self._oprot.trans.flush()
  517. def recv_drop_database(self, ):
  518. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  519. if mtype == TMessageType.EXCEPTION:
  520. x = TApplicationException()
  521. x.read(self._iprot)
  522. self._iprot.readMessageEnd()
  523. raise x
  524. result = drop_database_result()
  525. result.read(self._iprot)
  526. self._iprot.readMessageEnd()
  527. if result.o1 != None:
  528. raise result.o1
  529. if result.o2 != None:
  530. raise result.o2
  531. if result.o3 != None:
  532. raise result.o3
  533. return
  534. def get_databases(self, pattern):
  535. """
  536. Parameters:
  537. - pattern
  538. """
  539. self.send_get_databases(pattern)
  540. return self.recv_get_databases()
  541. def send_get_databases(self, pattern):
  542. self._oprot.writeMessageBegin('get_databases', TMessageType.CALL, self._seqid)
  543. args = get_databases_args()
  544. args.pattern = pattern
  545. args.write(self._oprot)
  546. self._oprot.writeMessageEnd()
  547. self._oprot.trans.flush()
  548. def recv_get_databases(self, ):
  549. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  550. if mtype == TMessageType.EXCEPTION:
  551. x = TApplicationException()
  552. x.read(self._iprot)
  553. self._iprot.readMessageEnd()
  554. raise x
  555. result = get_databases_result()
  556. result.read(self._iprot)
  557. self._iprot.readMessageEnd()
  558. if result.success != None:
  559. return result.success
  560. if result.o1 != None:
  561. raise result.o1
  562. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_databases failed: unknown result");
  563. def get_all_databases(self, ):
  564. self.send_get_all_databases()
  565. return self.recv_get_all_databases()
  566. def send_get_all_databases(self, ):
  567. self._oprot.writeMessageBegin('get_all_databases', TMessageType.CALL, self._seqid)
  568. args = get_all_databases_args()
  569. args.write(self._oprot)
  570. self._oprot.writeMessageEnd()
  571. self._oprot.trans.flush()
  572. def recv_get_all_databases(self, ):
  573. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  574. if mtype == TMessageType.EXCEPTION:
  575. x = TApplicationException()
  576. x.read(self._iprot)
  577. self._iprot.readMessageEnd()
  578. raise x
  579. result = get_all_databases_result()
  580. result.read(self._iprot)
  581. self._iprot.readMessageEnd()
  582. if result.success != None:
  583. return result.success
  584. if result.o1 != None:
  585. raise result.o1
  586. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_databases failed: unknown result");
  587. def alter_database(self, dbname, db):
  588. """
  589. Parameters:
  590. - dbname
  591. - db
  592. """
  593. self.send_alter_database(dbname, db)
  594. self.recv_alter_database()
  595. def send_alter_database(self, dbname, db):
  596. self._oprot.writeMessageBegin('alter_database', TMessageType.CALL, self._seqid)
  597. args = alter_database_args()
  598. args.dbname = dbname
  599. args.db = db
  600. args.write(self._oprot)
  601. self._oprot.writeMessageEnd()
  602. self._oprot.trans.flush()
  603. def recv_alter_database(self, ):
  604. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  605. if mtype == TMessageType.EXCEPTION:
  606. x = TApplicationException()
  607. x.read(self._iprot)
  608. self._iprot.readMessageEnd()
  609. raise x
  610. result = alter_database_result()
  611. result.read(self._iprot)
  612. self._iprot.readMessageEnd()
  613. if result.o1 != None:
  614. raise result.o1
  615. if result.o2 != None:
  616. raise result.o2
  617. return
  618. def get_type(self, name):
  619. """
  620. Parameters:
  621. - name
  622. """
  623. self.send_get_type(name)
  624. return self.recv_get_type()
  625. def send_get_type(self, name):
  626. self._oprot.writeMessageBegin('get_type', TMessageType.CALL, self._seqid)
  627. args = get_type_args()
  628. args.name = name
  629. args.write(self._oprot)
  630. self._oprot.writeMessageEnd()
  631. self._oprot.trans.flush()
  632. def recv_get_type(self, ):
  633. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  634. if mtype == TMessageType.EXCEPTION:
  635. x = TApplicationException()
  636. x.read(self._iprot)
  637. self._iprot.readMessageEnd()
  638. raise x
  639. result = get_type_result()
  640. result.read(self._iprot)
  641. self._iprot.readMessageEnd()
  642. if result.success != None:
  643. return result.success
  644. if result.o1 != None:
  645. raise result.o1
  646. if result.o2 != None:
  647. raise result.o2
  648. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_type failed: unknown result");
  649. def create_type(self, type):
  650. """
  651. Parameters:
  652. - type
  653. """
  654. self.send_create_type(type)
  655. return self.recv_create_type()
  656. def send_create_type(self, type):
  657. self._oprot.writeMessageBegin('create_type', TMessageType.CALL, self._seqid)
  658. args = create_type_args()
  659. args.type = type
  660. args.write(self._oprot)
  661. self._oprot.writeMessageEnd()
  662. self._oprot.trans.flush()
  663. def recv_create_type(self, ):
  664. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  665. if mtype == TMessageType.EXCEPTION:
  666. x = TApplicationException()
  667. x.read(self._iprot)
  668. self._iprot.readMessageEnd()
  669. raise x
  670. result = create_type_result()
  671. result.read(self._iprot)
  672. self._iprot.readMessageEnd()
  673. if result.success != None:
  674. return result.success
  675. if result.o1 != None:
  676. raise result.o1
  677. if result.o2 != None:
  678. raise result.o2
  679. if result.o3 != None:
  680. raise result.o3
  681. raise TApplicationException(TApplicationException.MISSING_RESULT, "create_type failed: unknown result");
  682. def drop_type(self, type):
  683. """
  684. Parameters:
  685. - type
  686. """
  687. self.send_drop_type(type)
  688. return self.recv_drop_type()
  689. def send_drop_type(self, type):
  690. self._oprot.writeMessageBegin('drop_type', TMessageType.CALL, self._seqid)
  691. args = drop_type_args()
  692. args.type = type
  693. args.write(self._oprot)
  694. self._oprot.writeMessageEnd()
  695. self._oprot.trans.flush()
  696. def recv_drop_type(self, ):
  697. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  698. if mtype == TMessageType.EXCEPTION:
  699. x = TApplicationException()
  700. x.read(self._iprot)
  701. self._iprot.readMessageEnd()
  702. raise x
  703. result = drop_type_result()
  704. result.read(self._iprot)
  705. self._iprot.readMessageEnd()
  706. if result.success != None:
  707. return result.success
  708. if result.o1 != None:
  709. raise result.o1
  710. if result.o2 != None:
  711. raise result.o2
  712. raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_type failed: unknown result");
  713. def get_type_all(self, name):
  714. """
  715. Parameters:
  716. - name
  717. """
  718. self.send_get_type_all(name)
  719. return self.recv_get_type_all()
  720. def send_get_type_all(self, name):
  721. self._oprot.writeMessageBegin('get_type_all', TMessageType.CALL, self._seqid)
  722. args = get_type_all_args()
  723. args.name = name
  724. args.write(self._oprot)
  725. self._oprot.writeMessageEnd()
  726. self._oprot.trans.flush()
  727. def recv_get_type_all(self, ):
  728. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  729. if mtype == TMessageType.EXCEPTION:
  730. x = TApplicationException()
  731. x.read(self._iprot)
  732. self._iprot.readMessageEnd()
  733. raise x
  734. result = get_type_all_result()
  735. result.read(self._iprot)
  736. self._iprot.readMessageEnd()
  737. if result.success != None:
  738. return result.success
  739. if result.o2 != None:
  740. raise result.o2
  741. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_type_all failed: unknown result");
  742. def get_fields(self, db_name, table_name):
  743. """
  744. Parameters:
  745. - db_name
  746. - table_name
  747. """
  748. self.send_get_fields(db_name, table_name)
  749. return self.recv_get_fields()
  750. def send_get_fields(self, db_name, table_name):
  751. self._oprot.writeMessageBegin('get_fields', TMessageType.CALL, self._seqid)
  752. args = get_fields_args()
  753. args.db_name = db_name
  754. args.table_name = table_name
  755. args.write(self._oprot)
  756. self._oprot.writeMessageEnd()
  757. self._oprot.trans.flush()
  758. def recv_get_fields(self, ):
  759. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  760. if mtype == TMessageType.EXCEPTION:
  761. x = TApplicationException()
  762. x.read(self._iprot)
  763. self._iprot.readMessageEnd()
  764. raise x
  765. result = get_fields_result()
  766. result.read(self._iprot)
  767. self._iprot.readMessageEnd()
  768. if result.success != None:
  769. return result.success
  770. if result.o1 != None:
  771. raise result.o1
  772. if result.o2 != None:
  773. raise result.o2
  774. if result.o3 != None:
  775. raise result.o3
  776. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_fields failed: unknown result");
  777. def get_schema(self, db_name, table_name):
  778. """
  779. Parameters:
  780. - db_name
  781. - table_name
  782. """
  783. self.send_get_schema(db_name, table_name)
  784. return self.recv_get_schema()
  785. def send_get_schema(self, db_name, table_name):
  786. self._oprot.writeMessageBegin('get_schema', TMessageType.CALL, self._seqid)
  787. args = get_schema_args()
  788. args.db_name = db_name
  789. args.table_name = table_name
  790. args.write(self._oprot)
  791. self._oprot.writeMessageEnd()
  792. self._oprot.trans.flush()
  793. def recv_get_schema(self, ):
  794. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  795. if mtype == TMessageType.EXCEPTION:
  796. x = TApplicationException()
  797. x.read(self._iprot)
  798. self._iprot.readMessageEnd()
  799. raise x
  800. result = get_schema_result()
  801. result.read(self._iprot)
  802. self._iprot.readMessageEnd()
  803. if result.success != None:
  804. return result.success
  805. if result.o1 != None:
  806. raise result.o1
  807. if result.o2 != None:
  808. raise result.o2
  809. if result.o3 != None:
  810. raise result.o3
  811. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_schema failed: unknown result");
  812. def create_table(self, tbl):
  813. """
  814. Parameters:
  815. - tbl
  816. """
  817. self.send_create_table(tbl)
  818. self.recv_create_table()
  819. def send_create_table(self, tbl):
  820. self._oprot.writeMessageBegin('create_table', TMessageType.CALL, self._seqid)
  821. args = create_table_args()
  822. args.tbl = tbl
  823. args.write(self._oprot)
  824. self._oprot.writeMessageEnd()
  825. self._oprot.trans.flush()
  826. def recv_create_table(self, ):
  827. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  828. if mtype == TMessageType.EXCEPTION:
  829. x = TApplicationException()
  830. x.read(self._iprot)
  831. self._iprot.readMessageEnd()
  832. raise x
  833. result = create_table_result()
  834. result.read(self._iprot)
  835. self._iprot.readMessageEnd()
  836. if result.o1 != None:
  837. raise result.o1
  838. if result.o2 != None:
  839. raise result.o2
  840. if result.o3 != None:
  841. raise result.o3
  842. if result.o4 != None:
  843. raise result.o4
  844. return
  845. def drop_table(self, dbname, name, deleteData):
  846. """
  847. Parameters:
  848. - dbname
  849. - name
  850. - deleteData
  851. """
  852. self.send_drop_table(dbname, name, deleteData)
  853. self.recv_drop_table()
  854. def send_drop_table(self, dbname, name, deleteData):
  855. self._oprot.writeMessageBegin('drop_table', TMessageType.CALL, self._seqid)
  856. args = drop_table_args()
  857. args.dbname = dbname
  858. args.name = name
  859. args.deleteData = deleteData
  860. args.write(self._oprot)
  861. self._oprot.writeMessageEnd()
  862. self._oprot.trans.flush()
  863. def recv_drop_table(self, ):
  864. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  865. if mtype == TMessageType.EXCEPTION:
  866. x = TApplicationException()
  867. x.read(self._iprot)
  868. self._iprot.readMessageEnd()
  869. raise x
  870. result = drop_table_result()
  871. result.read(self._iprot)
  872. self._iprot.readMessageEnd()
  873. if result.o1 != None:
  874. raise result.o1
  875. if result.o3 != None:
  876. raise result.o3
  877. return
  878. def get_tables(self, db_name, pattern):
  879. """
  880. Parameters:
  881. - db_name
  882. - pattern
  883. """
  884. self.send_get_tables(db_name, pattern)
  885. return self.recv_get_tables()
  886. def send_get_tables(self, db_name, pattern):
  887. self._oprot.writeMessageBegin('get_tables', TMessageType.CALL, self._seqid)
  888. args = get_tables_args()
  889. args.db_name = db_name
  890. args.pattern = pattern
  891. args.write(self._oprot)
  892. self._oprot.writeMessageEnd()
  893. self._oprot.trans.flush()
  894. def recv_get_tables(self, ):
  895. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  896. if mtype == TMessageType.EXCEPTION:
  897. x = TApplicationException()
  898. x.read(self._iprot)
  899. self._iprot.readMessageEnd()
  900. raise x
  901. result = get_tables_result()
  902. result.read(self._iprot)
  903. self._iprot.readMessageEnd()
  904. if result.success != None:
  905. return result.success
  906. if result.o1 != None:
  907. raise result.o1
  908. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_tables failed: unknown result");
  909. def get_all_tables(self, db_name):
  910. """
  911. Parameters:
  912. - db_name
  913. """
  914. self.send_get_all_tables(db_name)
  915. return self.recv_get_all_tables()
  916. def send_get_all_tables(self, db_name):
  917. self._oprot.writeMessageBegin('get_all_tables', TMessageType.CALL, self._seqid)
  918. args = get_all_tables_args()
  919. args.db_name = db_name
  920. args.write(self._oprot)
  921. self._oprot.writeMessageEnd()
  922. self._oprot.trans.flush()
  923. def recv_get_all_tables(self, ):
  924. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  925. if mtype == TMessageType.EXCEPTION:
  926. x = TApplicationException()
  927. x.read(self._iprot)
  928. self._iprot.readMessageEnd()
  929. raise x
  930. result = get_all_tables_result()
  931. result.read(self._iprot)
  932. self._iprot.readMessageEnd()
  933. if result.success != None:
  934. return result.success
  935. if result.o1 != None:
  936. raise result.o1
  937. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_all_tables failed: unknown result");
  938. def get_table(self, dbname, tbl_name):
  939. """
  940. Parameters:
  941. - dbname
  942. - tbl_name
  943. """
  944. self.send_get_table(dbname, tbl_name)
  945. return self.recv_get_table()
  946. def send_get_table(self, dbname, tbl_name):
  947. self._oprot.writeMessageBegin('get_table', TMessageType.CALL, self._seqid)
  948. args = get_table_args()
  949. args.dbname = dbname
  950. args.tbl_name = tbl_name
  951. args.write(self._oprot)
  952. self._oprot.writeMessageEnd()
  953. self._oprot.trans.flush()
  954. def recv_get_table(self, ):
  955. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  956. if mtype == TMessageType.EXCEPTION:
  957. x = TApplicationException()
  958. x.read(self._iprot)
  959. self._iprot.readMessageEnd()
  960. raise x
  961. result = get_table_result()
  962. result.read(self._iprot)
  963. self._iprot.readMessageEnd()
  964. if result.success != None:
  965. return result.success
  966. if result.o1 != None:
  967. raise result.o1
  968. if result.o2 != None:
  969. raise result.o2
  970. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_table failed: unknown result");
  971. def alter_table(self, dbname, tbl_name, new_tbl):
  972. """
  973. Parameters:
  974. - dbname
  975. - tbl_name
  976. - new_tbl
  977. """
  978. self.send_alter_table(dbname, tbl_name, new_tbl)
  979. self.recv_alter_table()
  980. def send_alter_table(self, dbname, tbl_name, new_tbl):
  981. self._oprot.writeMessageBegin('alter_table', TMessageType.CALL, self._seqid)
  982. args = alter_table_args()
  983. args.dbname = dbname
  984. args.tbl_name = tbl_name
  985. args.new_tbl = new_tbl
  986. args.write(self._oprot)
  987. self._oprot.writeMessageEnd()
  988. self._oprot.trans.flush()
  989. def recv_alter_table(self, ):
  990. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  991. if mtype == TMessageType.EXCEPTION:
  992. x = TApplicationException()
  993. x.read(self._iprot)
  994. self._iprot.readMessageEnd()
  995. raise x
  996. result = alter_table_result()
  997. result.read(self._iprot)
  998. self._iprot.readMessageEnd()
  999. if result.o1 != None:
  1000. raise result.o1
  1001. if result.o2 != None:
  1002. raise result.o2
  1003. return
  1004. def add_partition(self, new_part):
  1005. """
  1006. Parameters:
  1007. - new_part
  1008. """
  1009. self.send_add_partition(new_part)
  1010. return self.recv_add_partition()
  1011. def send_add_partition(self, new_part):
  1012. self._oprot.writeMessageBegin('add_partition', TMessageType.CALL, self._seqid)
  1013. args = add_partition_args()
  1014. args.new_part = new_part
  1015. args.write(self._oprot)
  1016. self._oprot.writeMessageEnd()
  1017. self._oprot.trans.flush()
  1018. def recv_add_partition(self, ):
  1019. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1020. if mtype == TMessageType.EXCEPTION:
  1021. x = TApplicationException()
  1022. x.read(self._iprot)
  1023. self._iprot.readMessageEnd()
  1024. raise x
  1025. result = add_partition_result()
  1026. result.read(self._iprot)
  1027. self._iprot.readMessageEnd()
  1028. if result.success != None:
  1029. return result.success
  1030. if result.o1 != None:
  1031. raise result.o1
  1032. if result.o2 != None:
  1033. raise result.o2
  1034. if result.o3 != None:
  1035. raise result.o3
  1036. raise TApplicationException(TApplicationException.MISSING_RESULT, "add_partition failed: unknown result");
  1037. def append_partition(self, db_name, tbl_name, part_vals):
  1038. """
  1039. Parameters:
  1040. - db_name
  1041. - tbl_name
  1042. - part_vals
  1043. """
  1044. self.send_append_partition(db_name, tbl_name, part_vals)
  1045. return self.recv_append_partition()
  1046. def send_append_partition(self, db_name, tbl_name, part_vals):
  1047. self._oprot.writeMessageBegin('append_partition', TMessageType.CALL, self._seqid)
  1048. args = append_partition_args()
  1049. args.db_name = db_name
  1050. args.tbl_name = tbl_name
  1051. args.part_vals = part_vals
  1052. args.write(self._oprot)
  1053. self._oprot.writeMessageEnd()
  1054. self._oprot.trans.flush()
  1055. def recv_append_partition(self, ):
  1056. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1057. if mtype == TMessageType.EXCEPTION:
  1058. x = TApplicationException()
  1059. x.read(self._iprot)
  1060. self._iprot.readMessageEnd()
  1061. raise x
  1062. result = append_partition_result()
  1063. result.read(self._iprot)
  1064. self._iprot.readMessageEnd()
  1065. if result.success != None:
  1066. return result.success
  1067. if result.o1 != None:
  1068. raise result.o1
  1069. if result.o2 != None:
  1070. raise result.o2
  1071. if result.o3 != None:
  1072. raise result.o3
  1073. raise TApplicationException(TApplicationException.MISSING_RESULT, "append_partition failed: unknown result");
  1074. def append_partition_by_name(self, db_name, tbl_name, part_name):
  1075. """
  1076. Parameters:
  1077. - db_name
  1078. - tbl_name
  1079. - part_name
  1080. """
  1081. self.send_append_partition_by_name(db_name, tbl_name, part_name)
  1082. return self.recv_append_partition_by_name()
  1083. def send_append_partition_by_name(self, db_name, tbl_name, part_name):
  1084. self._oprot.writeMessageBegin('append_partition_by_name', TMessageType.CALL, self._seqid)
  1085. args = append_partition_by_name_args()
  1086. args.db_name = db_name
  1087. args.tbl_name = tbl_name
  1088. args.part_name = part_name
  1089. args.write(self._oprot)
  1090. self._oprot.writeMessageEnd()
  1091. self._oprot.trans.flush()
  1092. def recv_append_partition_by_name(self, ):
  1093. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1094. if mtype == TMessageType.EXCEPTION:
  1095. x = TApplicationException()
  1096. x.read(self._iprot)
  1097. self._iprot.readMessageEnd()
  1098. raise x
  1099. result = append_partition_by_name_result()
  1100. result.read(self._iprot)
  1101. self._iprot.readMessageEnd()
  1102. if result.success != None:
  1103. return result.success
  1104. if result.o1 != None:
  1105. raise result.o1
  1106. if result.o2 != None:
  1107. raise result.o2
  1108. if result.o3 != None:
  1109. raise result.o3
  1110. raise TApplicationException(TApplicationException.MISSING_RESULT, "append_partition_by_name failed: unknown result");
  1111. def drop_partition(self, db_name, tbl_name, part_vals, deleteData):
  1112. """
  1113. Parameters:
  1114. - db_name
  1115. - tbl_name
  1116. - part_vals
  1117. - deleteData
  1118. """
  1119. self.send_drop_partition(db_name, tbl_name, part_vals, deleteData)
  1120. return self.recv_drop_partition()
  1121. def send_drop_partition(self, db_name, tbl_name, part_vals, deleteData):
  1122. self._oprot.writeMessageBegin('drop_partition', TMessageType.CALL, self._seqid)
  1123. args = drop_partition_args()
  1124. args.db_name = db_name
  1125. args.tbl_name = tbl_name
  1126. args.part_vals = part_vals
  1127. args.deleteData = deleteData
  1128. args.write(self._oprot)
  1129. self._oprot.writeMessageEnd()
  1130. self._oprot.trans.flush()
  1131. def recv_drop_partition(self, ):
  1132. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1133. if mtype == TMessageType.EXCEPTION:
  1134. x = TApplicationException()
  1135. x.read(self._iprot)
  1136. self._iprot.readMessageEnd()
  1137. raise x
  1138. result = drop_partition_result()
  1139. result.read(self._iprot)
  1140. self._iprot.readMessageEnd()
  1141. if result.success != None:
  1142. return result.success
  1143. if result.o1 != None:
  1144. raise result.o1
  1145. if result.o2 != None:
  1146. raise result.o2
  1147. raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_partition failed: unknown result");
  1148. def drop_partition_by_name(self, db_name, tbl_name, part_name, deleteData):
  1149. """
  1150. Parameters:
  1151. - db_name
  1152. - tbl_name
  1153. - part_name
  1154. - deleteData
  1155. """
  1156. self.send_drop_partition_by_name(db_name, tbl_name, part_name, deleteData)
  1157. return self.recv_drop_partition_by_name()
  1158. def send_drop_partition_by_name(self, db_name, tbl_name, part_name, deleteData):
  1159. self._oprot.writeMessageBegin('drop_partition_by_name', TMessageType.CALL, self._seqid)
  1160. args = drop_partition_by_name_args()
  1161. args.db_name = db_name
  1162. args.tbl_name = tbl_name
  1163. args.part_name = part_name
  1164. args.deleteData = deleteData
  1165. args.write(self._oprot)
  1166. self._oprot.writeMessageEnd()
  1167. self._oprot.trans.flush()
  1168. def recv_drop_partition_by_name(self, ):
  1169. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1170. if mtype == TMessageType.EXCEPTION:
  1171. x = TApplicationException()
  1172. x.read(self._iprot)
  1173. self._iprot.readMessageEnd()
  1174. raise x
  1175. result = drop_partition_by_name_result()
  1176. result.read(self._iprot)
  1177. self._iprot.readMessageEnd()
  1178. if result.success != None:
  1179. return result.success
  1180. if result.o1 != None:
  1181. raise result.o1
  1182. if result.o2 != None:
  1183. raise result.o2
  1184. raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_partition_by_name failed: unknown result");
  1185. def get_partition(self, db_name, tbl_name, part_vals):
  1186. """
  1187. Parameters:
  1188. - db_name
  1189. - tbl_name
  1190. - part_vals
  1191. """
  1192. self.send_get_partition(db_name, tbl_name, part_vals)
  1193. return self.recv_get_partition()
  1194. def send_get_partition(self, db_name, tbl_name, part_vals):
  1195. self._oprot.writeMessageBegin('get_partition', TMessageType.CALL, self._seqid)
  1196. args = get_partition_args()
  1197. args.db_name = db_name
  1198. args.tbl_name = tbl_name
  1199. args.part_vals = part_vals
  1200. args.write(self._oprot)
  1201. self._oprot.writeMessageEnd()
  1202. self._oprot.trans.flush()
  1203. def recv_get_partition(self, ):
  1204. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1205. if mtype == TMessageType.EXCEPTION:
  1206. x = TApplicationException()
  1207. x.read(self._iprot)
  1208. self._iprot.readMessageEnd()
  1209. raise x
  1210. result = get_partition_result()
  1211. result.read(self._iprot)
  1212. self._iprot.readMessageEnd()
  1213. if result.success != None:
  1214. return result.success
  1215. if result.o1 != None:
  1216. raise result.o1
  1217. if result.o2 != None:
  1218. raise result.o2
  1219. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition failed: unknown result");
  1220. def get_partition_with_auth(self, db_name, tbl_name, part_vals, user_name, group_names):
  1221. """
  1222. Parameters:
  1223. - db_name
  1224. - tbl_name
  1225. - part_vals
  1226. - user_name
  1227. - group_names
  1228. """
  1229. self.send_get_partition_with_auth(db_name, tbl_name, part_vals, user_name, group_names)
  1230. return self.recv_get_partition_with_auth()
  1231. def send_get_partition_with_auth(self, db_name, tbl_name, part_vals, user_name, group_names):
  1232. self._oprot.writeMessageBegin('get_partition_with_auth', TMessageType.CALL, self._seqid)
  1233. args = get_partition_with_auth_args()
  1234. args.db_name = db_name
  1235. args.tbl_name = tbl_name
  1236. args.part_vals = part_vals
  1237. args.user_name = user_name
  1238. args.group_names = group_names
  1239. args.write(self._oprot)
  1240. self._oprot.writeMessageEnd()
  1241. self._oprot.trans.flush()
  1242. def recv_get_partition_with_auth(self, ):
  1243. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1244. if mtype == TMessageType.EXCEPTION:
  1245. x = TApplicationException()
  1246. x.read(self._iprot)
  1247. self._iprot.readMessageEnd()
  1248. raise x
  1249. result = get_partition_with_auth_result()
  1250. result.read(self._iprot)
  1251. self._iprot.readMessageEnd()
  1252. if result.success != None:
  1253. return result.success
  1254. if result.o1 != None:
  1255. raise result.o1
  1256. if result.o2 != None:
  1257. raise result.o2
  1258. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_with_auth failed: unknown result");
  1259. def get_partition_by_name(self, db_name, tbl_name, part_name):
  1260. """
  1261. Parameters:
  1262. - db_name
  1263. - tbl_name
  1264. - part_name
  1265. """
  1266. self.send_get_partition_by_name(db_name, tbl_name, part_name)
  1267. return self.recv_get_partition_by_name()
  1268. def send_get_partition_by_name(self, db_name, tbl_name, part_name):
  1269. self._oprot.writeMessageBegin('get_partition_by_name', TMessageType.CALL, self._seqid)
  1270. args = get_partition_by_name_args()
  1271. args.db_name = db_name
  1272. args.tbl_name = tbl_name
  1273. args.part_name = part_name
  1274. args.write(self._oprot)
  1275. self._oprot.writeMessageEnd()
  1276. self._oprot.trans.flush()
  1277. def recv_get_partition_by_name(self, ):
  1278. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1279. if mtype == TMessageType.EXCEPTION:
  1280. x = TApplicationException()
  1281. x.read(self._iprot)
  1282. self._iprot.readMessageEnd()
  1283. raise x
  1284. result = get_partition_by_name_result()
  1285. result.read(self._iprot)
  1286. self._iprot.readMessageEnd()
  1287. if result.success != None:
  1288. return result.success
  1289. if result.o1 != None:
  1290. raise result.o1
  1291. if result.o2 != None:
  1292. raise result.o2
  1293. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_by_name failed: unknown result");
  1294. def get_partitions(self, db_name, tbl_name, max_parts):
  1295. """
  1296. Parameters:
  1297. - db_name
  1298. - tbl_name
  1299. - max_parts
  1300. """
  1301. self.send_get_partitions(db_name, tbl_name, max_parts)
  1302. return self.recv_get_partitions()
  1303. def send_get_partitions(self, db_name, tbl_name, max_parts):
  1304. self._oprot.writeMessageBegin('get_partitions', TMessageType.CALL, self._seqid)
  1305. args = get_partitions_args()
  1306. args.db_name = db_name
  1307. args.tbl_name = tbl_name
  1308. args.max_parts = max_parts
  1309. args.write(self._oprot)
  1310. self._oprot.writeMessageEnd()
  1311. self._oprot.trans.flush()
  1312. def recv_get_partitions(self, ):
  1313. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1314. if mtype == TMessageType.EXCEPTION:
  1315. x = TApplicationException()
  1316. x.read(self._iprot)
  1317. self._iprot.readMessageEnd()
  1318. raise x
  1319. result = get_partitions_result()
  1320. result.read(self._iprot)
  1321. self._iprot.readMessageEnd()
  1322. if result.success != None:
  1323. return result.success
  1324. if result.o1 != None:
  1325. raise result.o1
  1326. if result.o2 != None:
  1327. raise result.o2
  1328. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions failed: unknown result");
  1329. def get_partitions_with_auth(self, db_name, tbl_name, max_parts, user_name, group_names):
  1330. """
  1331. Parameters:
  1332. - db_name
  1333. - tbl_name
  1334. - max_parts
  1335. - user_name
  1336. - group_names
  1337. """
  1338. self.send_get_partitions_with_auth(db_name, tbl_name, max_parts, user_name, group_names)
  1339. return self.recv_get_partitions_with_auth()
  1340. def send_get_partitions_with_auth(self, db_name, tbl_name, max_parts, user_name, group_names):
  1341. self._oprot.writeMessageBegin('get_partitions_with_auth', TMessageType.CALL, self._seqid)
  1342. args = get_partitions_with_auth_args()
  1343. args.db_name = db_name
  1344. args.tbl_name = tbl_name
  1345. args.max_parts = max_parts
  1346. args.user_name = user_name
  1347. args.group_names = group_names
  1348. args.write(self._oprot)
  1349. self._oprot.writeMessageEnd()
  1350. self._oprot.trans.flush()
  1351. def recv_get_partitions_with_auth(self, ):
  1352. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1353. if mtype == TMessageType.EXCEPTION:
  1354. x = TApplicationException()
  1355. x.read(self._iprot)
  1356. self._iprot.readMessageEnd()
  1357. raise x
  1358. result = get_partitions_with_auth_result()
  1359. result.read(self._iprot)
  1360. self._iprot.readMessageEnd()
  1361. if result.success != None:
  1362. return result.success
  1363. if result.o1 != None:
  1364. raise result.o1
  1365. if result.o2 != None:
  1366. raise result.o2
  1367. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_with_auth failed: unknown result");
  1368. def get_partition_names(self, db_name, tbl_name, max_parts):
  1369. """
  1370. Parameters:
  1371. - db_name
  1372. - tbl_name
  1373. - max_parts
  1374. """
  1375. self.send_get_partition_names(db_name, tbl_name, max_parts)
  1376. return self.recv_get_partition_names()
  1377. def send_get_partition_names(self, db_name, tbl_name, max_parts):
  1378. self._oprot.writeMessageBegin('get_partition_names', TMessageType.CALL, self._seqid)
  1379. args = get_partition_names_args()
  1380. args.db_name = db_name
  1381. args.tbl_name = tbl_name
  1382. args.max_parts = max_parts
  1383. args.write(self._oprot)
  1384. self._oprot.writeMessageEnd()
  1385. self._oprot.trans.flush()
  1386. def recv_get_partition_names(self, ):
  1387. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1388. if mtype == TMessageType.EXCEPTION:
  1389. x = TApplicationException()
  1390. x.read(self._iprot)
  1391. self._iprot.readMessageEnd()
  1392. raise x
  1393. result = get_partition_names_result()
  1394. result.read(self._iprot)
  1395. self._iprot.readMessageEnd()
  1396. if result.success != None:
  1397. return result.success
  1398. if result.o2 != None:
  1399. raise result.o2
  1400. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_names failed: unknown result");
  1401. def get_partitions_ps(self, db_name, tbl_name, part_vals, max_parts):
  1402. """
  1403. Parameters:
  1404. - db_name
  1405. - tbl_name
  1406. - part_vals
  1407. - max_parts
  1408. """
  1409. self.send_get_partitions_ps(db_name, tbl_name, part_vals, max_parts)
  1410. return self.recv_get_partitions_ps()
  1411. def send_get_partitions_ps(self, db_name, tbl_name, part_vals, max_parts):
  1412. self._oprot.writeMessageBegin('get_partitions_ps', TMessageType.CALL, self._seqid)
  1413. args = get_partitions_ps_args()
  1414. args.db_name = db_name
  1415. args.tbl_name = tbl_name
  1416. args.part_vals = part_vals
  1417. args.max_parts = max_parts
  1418. args.write(self._oprot)
  1419. self._oprot.writeMessageEnd()
  1420. self._oprot.trans.flush()
  1421. def recv_get_partitions_ps(self, ):
  1422. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1423. if mtype == TMessageType.EXCEPTION:
  1424. x = TApplicationException()
  1425. x.read(self._iprot)
  1426. self._iprot.readMessageEnd()
  1427. raise x
  1428. result = get_partitions_ps_result()
  1429. result.read(self._iprot)
  1430. self._iprot.readMessageEnd()
  1431. if result.success != None:
  1432. return result.success
  1433. if result.o1 != None:
  1434. raise result.o1
  1435. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_ps failed: unknown result");
  1436. def get_partitions_ps_with_auth(self, db_name, tbl_name, part_vals, max_parts, user_name, group_names):
  1437. """
  1438. Parameters:
  1439. - db_name
  1440. - tbl_name
  1441. - part_vals
  1442. - max_parts
  1443. - user_name
  1444. - group_names
  1445. """
  1446. self.send_get_partitions_ps_with_auth(db_name, tbl_name, part_vals, max_parts, user_name, group_names)
  1447. return self.recv_get_partitions_ps_with_auth()
  1448. def send_get_partitions_ps_with_auth(self, db_name, tbl_name, part_vals, max_parts, user_name, group_names):
  1449. self._oprot.writeMessageBegin('get_partitions_ps_with_auth', TMessageType.CALL, self._seqid)
  1450. args = get_partitions_ps_with_auth_args()
  1451. args.db_name = db_name
  1452. args.tbl_name = tbl_name
  1453. args.part_vals = part_vals
  1454. args.max_parts = max_parts
  1455. args.user_name = user_name
  1456. args.group_names = group_names
  1457. args.write(self._oprot)
  1458. self._oprot.writeMessageEnd()
  1459. self._oprot.trans.flush()
  1460. def recv_get_partitions_ps_with_auth(self, ):
  1461. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1462. if mtype == TMessageType.EXCEPTION:
  1463. x = TApplicationException()
  1464. x.read(self._iprot)
  1465. self._iprot.readMessageEnd()
  1466. raise x
  1467. result = get_partitions_ps_with_auth_result()
  1468. result.read(self._iprot)
  1469. self._iprot.readMessageEnd()
  1470. if result.success != None:
  1471. return result.success
  1472. if result.o1 != None:
  1473. raise result.o1
  1474. if result.o2 != None:
  1475. raise result.o2
  1476. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_ps_with_auth failed: unknown result");
  1477. def get_partition_names_ps(self, db_name, tbl_name, part_vals, max_parts):
  1478. """
  1479. Parameters:
  1480. - db_name
  1481. - tbl_name
  1482. - part_vals
  1483. - max_parts
  1484. """
  1485. self.send_get_partition_names_ps(db_name, tbl_name, part_vals, max_parts)
  1486. return self.recv_get_partition_names_ps()
  1487. def send_get_partition_names_ps(self, db_name, tbl_name, part_vals, max_parts):
  1488. self._oprot.writeMessageBegin('get_partition_names_ps', TMessageType.CALL, self._seqid)
  1489. args = get_partition_names_ps_args()
  1490. args.db_name = db_name
  1491. args.tbl_name = tbl_name
  1492. args.part_vals = part_vals
  1493. args.max_parts = max_parts
  1494. args.write(self._oprot)
  1495. self._oprot.writeMessageEnd()
  1496. self._oprot.trans.flush()
  1497. def recv_get_partition_names_ps(self, ):
  1498. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1499. if mtype == TMessageType.EXCEPTION:
  1500. x = TApplicationException()
  1501. x.read(self._iprot)
  1502. self._iprot.readMessageEnd()
  1503. raise x
  1504. result = get_partition_names_ps_result()
  1505. result.read(self._iprot)
  1506. self._iprot.readMessageEnd()
  1507. if result.success != None:
  1508. return result.success
  1509. if result.o1 != None:
  1510. raise result.o1
  1511. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partition_names_ps failed: unknown result");
  1512. def get_partitions_by_filter(self, db_name, tbl_name, filter, max_parts):
  1513. """
  1514. Parameters:
  1515. - db_name
  1516. - tbl_name
  1517. - filter
  1518. - max_parts
  1519. """
  1520. self.send_get_partitions_by_filter(db_name, tbl_name, filter, max_parts)
  1521. return self.recv_get_partitions_by_filter()
  1522. def send_get_partitions_by_filter(self, db_name, tbl_name, filter, max_parts):
  1523. self._oprot.writeMessageBegin('get_partitions_by_filter', TMessageType.CALL, self._seqid)
  1524. args = get_partitions_by_filter_args()
  1525. args.db_name = db_name
  1526. args.tbl_name = tbl_name
  1527. args.filter = filter
  1528. args.max_parts = max_parts
  1529. args.write(self._oprot)
  1530. self._oprot.writeMessageEnd()
  1531. self._oprot.trans.flush()
  1532. def recv_get_partitions_by_filter(self, ):
  1533. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1534. if mtype == TMessageType.EXCEPTION:
  1535. x = TApplicationException()
  1536. x.read(self._iprot)
  1537. self._iprot.readMessageEnd()
  1538. raise x
  1539. result = get_partitions_by_filter_result()
  1540. result.read(self._iprot)
  1541. self._iprot.readMessageEnd()
  1542. if result.success != None:
  1543. return result.success
  1544. if result.o1 != None:
  1545. raise result.o1
  1546. if result.o2 != None:
  1547. raise result.o2
  1548. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_partitions_by_filter failed: unknown result");
  1549. def alter_partition(self, db_name, tbl_name, new_part):
  1550. """
  1551. Parameters:
  1552. - db_name
  1553. - tbl_name
  1554. - new_part
  1555. """
  1556. self.send_alter_partition(db_name, tbl_name, new_part)
  1557. self.recv_alter_partition()
  1558. def send_alter_partition(self, db_name, tbl_name, new_part):
  1559. self._oprot.writeMessageBegin('alter_partition', TMessageType.CALL, self._seqid)
  1560. args = alter_partition_args()
  1561. args.db_name = db_name
  1562. args.tbl_name = tbl_name
  1563. args.new_part = new_part
  1564. args.write(self._oprot)
  1565. self._oprot.writeMessageEnd()
  1566. self._oprot.trans.flush()
  1567. def recv_alter_partition(self, ):
  1568. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1569. if mtype == TMessageType.EXCEPTION:
  1570. x = TApplicationException()
  1571. x.read(self._iprot)
  1572. self._iprot.readMessageEnd()
  1573. raise x
  1574. result = alter_partition_result()
  1575. result.read(self._iprot)
  1576. self._iprot.readMessageEnd()
  1577. if result.o1 != None:
  1578. raise result.o1
  1579. if result.o2 != None:
  1580. raise result.o2
  1581. return
  1582. def get_config_value(self, name, defaultValue):
  1583. """
  1584. Parameters:
  1585. - name
  1586. - defaultValue
  1587. """
  1588. self.send_get_config_value(name, defaultValue)
  1589. return self.recv_get_config_value()
  1590. def send_get_config_value(self, name, defaultValue):
  1591. self._oprot.writeMessageBegin('get_config_value', TMessageType.CALL, self._seqid)
  1592. args = get_config_value_args()
  1593. args.name = name
  1594. args.defaultValue = defaultValue
  1595. args.write(self._oprot)
  1596. self._oprot.writeMessageEnd()
  1597. self._oprot.trans.flush()
  1598. def recv_get_config_value(self, ):
  1599. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1600. if mtype == TMessageType.EXCEPTION:
  1601. x = TApplicationException()
  1602. x.read(self._iprot)
  1603. self._iprot.readMessageEnd()
  1604. raise x
  1605. result = get_config_value_result()
  1606. result.read(self._iprot)
  1607. self._iprot.readMessageEnd()
  1608. if result.success != None:
  1609. return result.success
  1610. if result.o1 != None:
  1611. raise result.o1
  1612. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_config_value failed: unknown result");
  1613. def partition_name_to_vals(self, part_name):
  1614. """
  1615. Parameters:
  1616. - part_name
  1617. """
  1618. self.send_partition_name_to_vals(part_name)
  1619. return self.recv_partition_name_to_vals()
  1620. def send_partition_name_to_vals(self, part_name):
  1621. self._oprot.writeMessageBegin('partition_name_to_vals', TMessageType.CALL, self._seqid)
  1622. args = partition_name_to_vals_args()
  1623. args.part_name = part_name
  1624. args.write(self._oprot)
  1625. self._oprot.writeMessageEnd()
  1626. self._oprot.trans.flush()
  1627. def recv_partition_name_to_vals(self, ):
  1628. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1629. if mtype == TMessageType.EXCEPTION:
  1630. x = TApplicationException()
  1631. x.read(self._iprot)
  1632. self._iprot.readMessageEnd()
  1633. raise x
  1634. result = partition_name_to_vals_result()
  1635. result.read(self._iprot)
  1636. self._iprot.readMessageEnd()
  1637. if result.success != None:
  1638. return result.success
  1639. if result.o1 != None:
  1640. raise result.o1
  1641. raise TApplicationException(TApplicationException.MISSING_RESULT, "partition_name_to_vals failed: unknown result");
  1642. def partition_name_to_spec(self, part_name):
  1643. """
  1644. Parameters:
  1645. - part_name
  1646. """
  1647. self.send_partition_name_to_spec(part_name)
  1648. return self.recv_partition_name_to_spec()
  1649. def send_partition_name_to_spec(self, part_name):
  1650. self._oprot.writeMessageBegin('partition_name_to_spec', TMessageType.CALL, self._seqid)
  1651. args = partition_name_to_spec_args()
  1652. args.part_name = part_name
  1653. args.write(self._oprot)
  1654. self._oprot.writeMessageEnd()
  1655. self._oprot.trans.flush()
  1656. def recv_partition_name_to_spec(self, ):
  1657. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1658. if mtype == TMessageType.EXCEPTION:
  1659. x = TApplicationException()
  1660. x.read(self._iprot)
  1661. self._iprot.readMessageEnd()
  1662. raise x
  1663. result = partition_name_to_spec_result()
  1664. result.read(self._iprot)
  1665. self._iprot.readMessageEnd()
  1666. if result.success != None:
  1667. return result.success
  1668. if result.o1 != None:
  1669. raise result.o1
  1670. raise TApplicationException(TApplicationException.MISSING_RESULT, "partition_name_to_spec failed: unknown result");
  1671. def add_index(self, new_index, index_table):
  1672. """
  1673. Parameters:
  1674. - new_index
  1675. - index_table
  1676. """
  1677. self.send_add_index(new_index, index_table)
  1678. return self.recv_add_index()
  1679. def send_add_index(self, new_index, index_table):
  1680. self._oprot.writeMessageBegin('add_index', TMessageType.CALL, self._seqid)
  1681. args = add_index_args()
  1682. args.new_index = new_index
  1683. args.index_table = index_table
  1684. args.write(self._oprot)
  1685. self._oprot.writeMessageEnd()
  1686. self._oprot.trans.flush()
  1687. def recv_add_index(self, ):
  1688. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1689. if mtype == TMessageType.EXCEPTION:
  1690. x = TApplicationException()
  1691. x.read(self._iprot)
  1692. self._iprot.readMessageEnd()
  1693. raise x
  1694. result = add_index_result()
  1695. result.read(self._iprot)
  1696. self._iprot.readMessageEnd()
  1697. if result.success != None:
  1698. return result.success
  1699. if result.o1 != None:
  1700. raise result.o1
  1701. if result.o2 != None:
  1702. raise result.o2
  1703. if result.o3 != None:
  1704. raise result.o3
  1705. raise TApplicationException(TApplicationException.MISSING_RESULT, "add_index failed: unknown result");
  1706. def alter_index(self, dbname, base_tbl_name, idx_name, new_idx):
  1707. """
  1708. Parameters:
  1709. - dbname
  1710. - base_tbl_name
  1711. - idx_name
  1712. - new_idx
  1713. """
  1714. self.send_alter_index(dbname, base_tbl_name, idx_name, new_idx)
  1715. self.recv_alter_index()
  1716. def send_alter_index(self, dbname, base_tbl_name, idx_name, new_idx):
  1717. self._oprot.writeMessageBegin('alter_index', TMessageType.CALL, self._seqid)
  1718. args = alter_index_args()
  1719. args.dbname = dbname
  1720. args.base_tbl_name = base_tbl_name
  1721. args.idx_name = idx_name
  1722. args.new_idx = new_idx
  1723. args.write(self._oprot)
  1724. self._oprot.writeMessageEnd()
  1725. self._oprot.trans.flush()
  1726. def recv_alter_index(self, ):
  1727. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1728. if mtype == TMessageType.EXCEPTION:
  1729. x = TApplicationException()
  1730. x.read(self._iprot)
  1731. self._iprot.readMessageEnd()
  1732. raise x
  1733. result = alter_index_result()
  1734. result.read(self._iprot)
  1735. self._iprot.readMessageEnd()
  1736. if result.o1 != None:
  1737. raise result.o1
  1738. if result.o2 != None:
  1739. raise result.o2
  1740. return
  1741. def drop_index_by_name(self, db_name, tbl_name, index_name, deleteData):
  1742. """
  1743. Parameters:
  1744. - db_name
  1745. - tbl_name
  1746. - index_name
  1747. - deleteData
  1748. """
  1749. self.send_drop_index_by_name(db_name, tbl_name, index_name, deleteData)
  1750. return self.recv_drop_index_by_name()
  1751. def send_drop_index_by_name(self, db_name, tbl_name, index_name, deleteData):
  1752. self._oprot.writeMessageBegin('drop_index_by_name', TMessageType.CALL, self._seqid)
  1753. args = drop_index_by_name_args()
  1754. args.db_name = db_name
  1755. args.tbl_name = tbl_name
  1756. args.index_name = index_name
  1757. args.deleteData = deleteData
  1758. args.write(self._oprot)
  1759. self._oprot.writeMessageEnd()
  1760. self._oprot.trans.flush()
  1761. def recv_drop_index_by_name(self, ):
  1762. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1763. if mtype == TMessageType.EXCEPTION:
  1764. x = TApplicationException()
  1765. x.read(self._iprot)
  1766. self._iprot.readMessageEnd()
  1767. raise x
  1768. result = drop_index_by_name_result()
  1769. result.read(self._iprot)
  1770. self._iprot.readMessageEnd()
  1771. if result.success != None:
  1772. return result.success
  1773. if result.o1 != None:
  1774. raise result.o1
  1775. if result.o2 != None:
  1776. raise result.o2
  1777. raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_index_by_name failed: unknown result");
  1778. def get_index_by_name(self, db_name, tbl_name, index_name):
  1779. """
  1780. Parameters:
  1781. - db_name
  1782. - tbl_name
  1783. - index_name
  1784. """
  1785. self.send_get_index_by_name(db_name, tbl_name, index_name)
  1786. return self.recv_get_index_by_name()
  1787. def send_get_index_by_name(self, db_name, tbl_name, index_name):
  1788. self._oprot.writeMessageBegin('get_index_by_name', TMessageType.CALL, self._seqid)
  1789. args = get_index_by_name_args()
  1790. args.db_name = db_name
  1791. args.tbl_name = tbl_name
  1792. args.index_name = index_name
  1793. args.write(self._oprot)
  1794. self._oprot.writeMessageEnd()
  1795. self._oprot.trans.flush()
  1796. def recv_get_index_by_name(self, ):
  1797. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1798. if mtype == TMessageType.EXCEPTION:
  1799. x = TApplicationException()
  1800. x.read(self._iprot)
  1801. self._iprot.readMessageEnd()
  1802. raise x
  1803. result = get_index_by_name_result()
  1804. result.read(self._iprot)
  1805. self._iprot.readMessageEnd()
  1806. if result.success != None:
  1807. return result.success
  1808. if result.o1 != None:
  1809. raise result.o1
  1810. if result.o2 != None:
  1811. raise result.o2
  1812. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_index_by_name failed: unknown result");
  1813. def get_indexes(self, db_name, tbl_name, max_indexes):
  1814. """
  1815. Parameters:
  1816. - db_name
  1817. - tbl_name
  1818. - max_indexes
  1819. """
  1820. self.send_get_indexes(db_name, tbl_name, max_indexes)
  1821. return self.recv_get_indexes()
  1822. def send_get_indexes(self, db_name, tbl_name, max_indexes):
  1823. self._oprot.writeMessageBegin('get_indexes', TMessageType.CALL, self._seqid)
  1824. args = get_indexes_args()
  1825. args.db_name = db_name
  1826. args.tbl_name = tbl_name
  1827. args.max_indexes = max_indexes
  1828. args.write(self._oprot)
  1829. self._oprot.writeMessageEnd()
  1830. self._oprot.trans.flush()
  1831. def recv_get_indexes(self, ):
  1832. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1833. if mtype == TMessageType.EXCEPTION:
  1834. x = TApplicationException()
  1835. x.read(self._iprot)
  1836. self._iprot.readMessageEnd()
  1837. raise x
  1838. result = get_indexes_result()
  1839. result.read(self._iprot)
  1840. self._iprot.readMessageEnd()
  1841. if result.success != None:
  1842. return result.success
  1843. if result.o1 != None:
  1844. raise result.o1
  1845. if result.o2 != None:
  1846. raise result.o2
  1847. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_indexes failed: unknown result");
  1848. def get_index_names(self, db_name, tbl_name, max_indexes):
  1849. """
  1850. Parameters:
  1851. - db_name
  1852. - tbl_name
  1853. - max_indexes
  1854. """
  1855. self.send_get_index_names(db_name, tbl_name, max_indexes)
  1856. return self.recv_get_index_names()
  1857. def send_get_index_names(self, db_name, tbl_name, max_indexes):
  1858. self._oprot.writeMessageBegin('get_index_names', TMessageType.CALL, self._seqid)
  1859. args = get_index_names_args()
  1860. args.db_name = db_name
  1861. args.tbl_name = tbl_name
  1862. args.max_indexes = max_indexes
  1863. args.write(self._oprot)
  1864. self._oprot.writeMessageEnd()
  1865. self._oprot.trans.flush()
  1866. def recv_get_index_names(self, ):
  1867. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1868. if mtype == TMessageType.EXCEPTION:
  1869. x = TApplicationException()
  1870. x.read(self._iprot)
  1871. self._iprot.readMessageEnd()
  1872. raise x
  1873. result = get_index_names_result()
  1874. result.read(self._iprot)
  1875. self._iprot.readMessageEnd()
  1876. if result.success != None:
  1877. return result.success
  1878. if result.o2 != None:
  1879. raise result.o2
  1880. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_index_names failed: unknown result");
  1881. def create_role(self, role):
  1882. """
  1883. Parameters:
  1884. - role
  1885. """
  1886. self.send_create_role(role)
  1887. return self.recv_create_role()
  1888. def send_create_role(self, role):
  1889. self._oprot.writeMessageBegin('create_role', TMessageType.CALL, self._seqid)
  1890. args = create_role_args()
  1891. args.role = role
  1892. args.write(self._oprot)
  1893. self._oprot.writeMessageEnd()
  1894. self._oprot.trans.flush()
  1895. def recv_create_role(self, ):
  1896. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1897. if mtype == TMessageType.EXCEPTION:
  1898. x = TApplicationException()
  1899. x.read(self._iprot)
  1900. self._iprot.readMessageEnd()
  1901. raise x
  1902. result = create_role_result()
  1903. result.read(self._iprot)
  1904. self._iprot.readMessageEnd()
  1905. if result.success != None:
  1906. return result.success
  1907. if result.o1 != None:
  1908. raise result.o1
  1909. raise TApplicationException(TApplicationException.MISSING_RESULT, "create_role failed: unknown result");
  1910. def drop_role(self, role_name):
  1911. """
  1912. Parameters:
  1913. - role_name
  1914. """
  1915. self.send_drop_role(role_name)
  1916. return self.recv_drop_role()
  1917. def send_drop_role(self, role_name):
  1918. self._oprot.writeMessageBegin('drop_role', TMessageType.CALL, self._seqid)
  1919. args = drop_role_args()
  1920. args.role_name = role_name
  1921. args.write(self._oprot)
  1922. self._oprot.writeMessageEnd()
  1923. self._oprot.trans.flush()
  1924. def recv_drop_role(self, ):
  1925. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1926. if mtype == TMessageType.EXCEPTION:
  1927. x = TApplicationException()
  1928. x.read(self._iprot)
  1929. self._iprot.readMessageEnd()
  1930. raise x
  1931. result = drop_role_result()
  1932. result.read(self._iprot)
  1933. self._iprot.readMessageEnd()
  1934. if result.success != None:
  1935. return result.success
  1936. if result.o1 != None:
  1937. raise result.o1
  1938. raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_role failed: unknown result");
  1939. def get_role_names(self, ):
  1940. self.send_get_role_names()
  1941. return self.recv_get_role_names()
  1942. def send_get_role_names(self, ):
  1943. self._oprot.writeMessageBegin('get_role_names', TMessageType.CALL, self._seqid)
  1944. args = get_role_names_args()
  1945. args.write(self._oprot)
  1946. self._oprot.writeMessageEnd()
  1947. self._oprot.trans.flush()
  1948. def recv_get_role_names(self, ):
  1949. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1950. if mtype == TMessageType.EXCEPTION:
  1951. x = TApplicationException()
  1952. x.read(self._iprot)
  1953. self._iprot.readMessageEnd()
  1954. raise x
  1955. result = get_role_names_result()
  1956. result.read(self._iprot)
  1957. self._iprot.readMessageEnd()
  1958. if result.success != None:
  1959. return result.success
  1960. if result.o1 != None:
  1961. raise result.o1
  1962. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_role_names failed: unknown result");
  1963. def grant_role(self, role_name, principal_name, principal_type, grantor, grantorType, grant_option):
  1964. """
  1965. Parameters:
  1966. - role_name
  1967. - principal_name
  1968. - principal_type
  1969. - grantor
  1970. - grantorType
  1971. - grant_option
  1972. """
  1973. self.send_grant_role(role_name, principal_name, principal_type, grantor, grantorType, grant_option)
  1974. return self.recv_grant_role()
  1975. def send_grant_role(self, role_name, principal_name, principal_type, grantor, grantorType, grant_option):
  1976. self._oprot.writeMessageBegin('grant_role', TMessageType.CALL, self._seqid)
  1977. args = grant_role_args()
  1978. args.role_name = role_name
  1979. args.principal_name = principal_name
  1980. args.principal_type = principal_type
  1981. args.grantor = grantor
  1982. args.grantorType = grantorType
  1983. args.grant_option = grant_option
  1984. args.write(self._oprot)
  1985. self._oprot.writeMessageEnd()
  1986. self._oprot.trans.flush()
  1987. def recv_grant_role(self, ):
  1988. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  1989. if mtype == TMessageType.EXCEPTION:
  1990. x = TApplicationException()
  1991. x.read(self._iprot)
  1992. self._iprot.readMessageEnd()
  1993. raise x
  1994. result = grant_role_result()
  1995. result.read(self._iprot)
  1996. self._iprot.readMessageEnd()
  1997. if result.success != None:
  1998. return result.success
  1999. if result.o1 != None:
  2000. raise result.o1
  2001. raise TApplicationException(TApplicationException.MISSING_RESULT, "grant_role failed: unknown result");
  2002. def revoke_role(self, role_name, principal_name, principal_type):
  2003. """
  2004. Parameters:
  2005. - role_name
  2006. - principal_name
  2007. - principal_type
  2008. """
  2009. self.send_revoke_role(role_name, principal_name, principal_type)
  2010. return self.recv_revoke_role()
  2011. def send_revoke_role(self, role_name, principal_name, principal_type):
  2012. self._oprot.writeMessageBegin('revoke_role', TMessageType.CALL, self._seqid)
  2013. args = revoke_role_args()
  2014. args.role_name = role_name
  2015. args.principal_name = principal_name
  2016. args.principal_type = principal_type
  2017. args.write(self._oprot)
  2018. self._oprot.writeMessageEnd()
  2019. self._oprot.trans.flush()
  2020. def recv_revoke_role(self, ):
  2021. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  2022. if mtype == TMessageType.EXCEPTION:
  2023. x = TApplicationException()
  2024. x.read(self._iprot)
  2025. self._iprot.readMessageEnd()
  2026. raise x
  2027. result = revoke_role_result()
  2028. result.read(self._iprot)
  2029. self._iprot.readMessageEnd()
  2030. if result.success != None:
  2031. return result.success
  2032. if result.o1 != None:
  2033. raise result.o1
  2034. raise TApplicationException(TApplicationException.MISSING_RESULT, "revoke_role failed: unknown result");
  2035. def list_roles(self, principal_name, principal_type):
  2036. """
  2037. Parameters:
  2038. - principal_name
  2039. - principal_type
  2040. """
  2041. self.send_list_roles(principal_name, principal_type)
  2042. return self.recv_list_roles()
  2043. def send_list_roles(self, principal_name, principal_type):
  2044. self._oprot.writeMessageBegin('list_roles', TMessageType.CALL, self._seqid)
  2045. args = list_roles_args()
  2046. args.principal_name = principal_name
  2047. args.principal_type = principal_type
  2048. args.write(self._oprot)
  2049. self._oprot.writeMessageEnd()
  2050. self._oprot.trans.flush()
  2051. def recv_list_roles(self, ):
  2052. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  2053. if mtype == TMessageType.EXCEPTION:
  2054. x = TApplicationException()
  2055. x.read(self._iprot)
  2056. self._iprot.readMessageEnd()
  2057. raise x
  2058. result = list_roles_result()
  2059. result.read(self._iprot)
  2060. self._iprot.readMessageEnd()
  2061. if result.success != None:
  2062. return result.success
  2063. if result.o1 != None:
  2064. raise result.o1
  2065. raise TApplicationException(TApplicationException.MISSING_RESULT, "list_roles failed: unknown result");
  2066. def get_privilege_set(self, hiveObject, user_name, group_names):
  2067. """
  2068. Parameters:
  2069. - hiveObject
  2070. - user_name
  2071. - group_names
  2072. """
  2073. self.send_get_privilege_set(hiveObject, user_name, group_names)
  2074. return self.recv_get_privilege_set()
  2075. def send_get_privilege_set(self, hiveObject, user_name, group_names):
  2076. self._oprot.writeMessageBegin('get_privilege_set', TMessageType.CALL, self._seqid)
  2077. args = get_privilege_set_args()
  2078. args.hiveObject = hiveObject
  2079. args.user_name = user_name
  2080. args.group_names = group_names
  2081. args.write(self._oprot)
  2082. self._oprot.writeMessageEnd()
  2083. self._oprot.trans.flush()
  2084. def recv_get_privilege_set(self, ):
  2085. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  2086. if mtype == TMessageType.EXCEPTION:
  2087. x = TApplicationException()
  2088. x.read(self._iprot)
  2089. self._iprot.readMessageEnd()
  2090. raise x
  2091. result = get_privilege_set_result()
  2092. result.read(self._iprot)
  2093. self._iprot.readMessageEnd()
  2094. if result.success != None:
  2095. return result.success
  2096. if result.o1 != None:
  2097. raise result.o1
  2098. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_privilege_set failed: unknown result");
  2099. def list_privileges(self, principal_name, principal_type, hiveObject):
  2100. """
  2101. Parameters:
  2102. - principal_name
  2103. - principal_type
  2104. - hiveObject
  2105. """
  2106. self.send_list_privileges(principal_name, principal_type, hiveObject)
  2107. return self.recv_list_privileges()
  2108. def send_list_privileges(self, principal_name, principal_type, hiveObject):
  2109. self._oprot.writeMessageBegin('list_privileges', TMessageType.CALL, self._seqid)
  2110. args = list_privileges_args()
  2111. args.principal_name = principal_name
  2112. args.principal_type = principal_type
  2113. args.hiveObject = hiveObject
  2114. args.write(self._oprot)
  2115. self._oprot.writeMessageEnd()
  2116. self._oprot.trans.flush()
  2117. def recv_list_privileges(self, ):
  2118. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  2119. if mtype == TMessageType.EXCEPTION:
  2120. x = TApplicationException()
  2121. x.read(self._iprot)
  2122. self._iprot.readMessageEnd()
  2123. raise x
  2124. result = list_privileges_result()
  2125. result.read(self._iprot)
  2126. self._iprot.readMessageEnd()
  2127. if result.success != None:
  2128. return result.success
  2129. if result.o1 != None:
  2130. raise result.o1
  2131. raise TApplicationException(TApplicationException.MISSING_RESULT, "list_privileges failed: unknown result");
  2132. def grant_privileges(self, privileges):
  2133. """
  2134. Parameters:
  2135. - privileges
  2136. """
  2137. self.send_grant_privileges(privileges)
  2138. return self.recv_grant_privileges()
  2139. def send_grant_privileges(self, privileges):
  2140. self._oprot.writeMessageBegin('grant_privileges', TMessageType.CALL, self._seqid)
  2141. args = grant_privileges_args()
  2142. args.privileges = privileges
  2143. args.write(self._oprot)
  2144. self._oprot.writeMessageEnd()
  2145. self._oprot.trans.flush()
  2146. def recv_grant_privileges(self, ):
  2147. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  2148. if mtype == TMessageType.EXCEPTION:
  2149. x = TApplicationException()
  2150. x.read(self._iprot)
  2151. self._iprot.readMessageEnd()
  2152. raise x
  2153. result = grant_privileges_result()
  2154. result.read(self._iprot)
  2155. self._iprot.readMessageEnd()
  2156. if result.success != None:
  2157. return result.success
  2158. if result.o1 != None:
  2159. raise result.o1
  2160. raise TApplicationException(TApplicationException.MISSING_RESULT, "grant_privileges failed: unknown result");
  2161. def revoke_privileges(self, privileges):
  2162. """
  2163. Parameters:
  2164. - privileges
  2165. """
  2166. self.send_revoke_privileges(privileges)
  2167. return self.recv_revoke_privileges()
  2168. def send_revoke_privileges(self, privileges):
  2169. self._oprot.writeMessageBegin('revoke_privileges', TMessageType.CALL, self._seqid)
  2170. args = revoke_privileges_args()
  2171. args.privileges = privileges
  2172. args.write(self._oprot)
  2173. self._oprot.writeMessageEnd()
  2174. self._oprot.trans.flush()
  2175. def recv_revoke_privileges(self, ):
  2176. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  2177. if mtype == TMessageType.EXCEPTION:
  2178. x = TApplicationException()
  2179. x.read(self._iprot)
  2180. self._iprot.readMessageEnd()
  2181. raise x
  2182. result = revoke_privileges_result()
  2183. result.read(self._iprot)
  2184. self._iprot.readMessageEnd()
  2185. if result.success != None:
  2186. return result.success
  2187. if result.o1 != None:
  2188. raise result.o1
  2189. raise TApplicationException(TApplicationException.MISSING_RESULT, "revoke_privileges failed: unknown result");
  2190. def get_delegation_token(self, renewer_kerberos_principal_name):
  2191. """
  2192. Parameters:
  2193. - renewer_kerberos_principal_name
  2194. """
  2195. self.send_get_delegation_token(renewer_kerberos_principal_name)
  2196. return self.recv_get_delegation_token()
  2197. def send_get_delegation_token(self, renewer_kerberos_principal_name):
  2198. self._oprot.writeMessageBegin('get_delegation_token', TMessageType.CALL, self._seqid)
  2199. args = get_delegation_token_args()
  2200. args.renewer_kerberos_principal_name = renewer_kerberos_principal_name
  2201. args.write(self._oprot)
  2202. self._oprot.writeMessageEnd()
  2203. self._oprot.trans.flush()
  2204. def recv_get_delegation_token(self, ):
  2205. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  2206. if mtype == TMessageType.EXCEPTION:
  2207. x = TApplicationException()
  2208. x.read(self._iprot)
  2209. self._iprot.readMessageEnd()
  2210. raise x
  2211. result = get_delegation_token_result()
  2212. result.read(self._iprot)
  2213. self._iprot.readMessageEnd()
  2214. if result.success != None:
  2215. return result.success
  2216. if result.o1 != None:
  2217. raise result.o1
  2218. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_delegation_token failed: unknown result");
  2219. def get_delegation_token_with_signature(self, renewer_kerberos_principal_name, token_signature):
  2220. """
  2221. Parameters:
  2222. - renewer_kerberos_principal_name
  2223. - token_signature
  2224. """
  2225. self.send_get_delegation_token_with_signature(renewer_kerberos_principal_name, token_signature)
  2226. return self.recv_get_delegation_token_with_signature()
  2227. def send_get_delegation_token_with_signature(self, renewer_kerberos_principal_name, token_signature):
  2228. self._oprot.writeMessageBegin('get_delegation_token_with_signature', TMessageType.CALL, self._seqid)
  2229. args = get_delegation_token_with_signature_args()
  2230. args.renewer_kerberos_principal_name = renewer_kerberos_principal_name
  2231. args.token_signature = token_signature
  2232. args.write(self._oprot)
  2233. self._oprot.writeMessageEnd()
  2234. self._oprot.trans.flush()
  2235. def recv_get_delegation_token_with_signature(self, ):
  2236. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  2237. if mtype == TMessageType.EXCEPTION:
  2238. x = TApplicationException()
  2239. x.read(self._iprot)
  2240. self._iprot.readMessageEnd()
  2241. raise x
  2242. result = get_delegation_token_with_signature_result()
  2243. result.read(self._iprot)
  2244. self._iprot.readMessageEnd()
  2245. if result.success != None:
  2246. return result.success
  2247. if result.o1 != None:
  2248. raise result.o1
  2249. raise TApplicationException(TApplicationException.MISSING_RESULT, "get_delegation_token_with_signature failed: unknown result");
  2250. def renew_delegation_token(self, token_str_form):
  2251. """
  2252. Parameters:
  2253. - token_str_form
  2254. """
  2255. self.send_renew_delegation_token(token_str_form)
  2256. return self.recv_renew_delegation_token()
  2257. def send_renew_delegation_token(self, token_str_form):
  2258. self._oprot.writeMessageBegin('renew_delegation_token', TMessageType.CALL, self._seqid)
  2259. args = renew_delegation_token_args()
  2260. args.token_str_form = token_str_form
  2261. args.write(self._oprot)
  2262. self._oprot.writeMessageEnd()
  2263. self._oprot.trans.flush()
  2264. def recv_renew_delegation_token(self, ):
  2265. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  2266. if mtype == TMessageType.EXCEPTION:
  2267. x = TApplicationException()
  2268. x.read(self._iprot)
  2269. self._iprot.readMessageEnd()
  2270. raise x
  2271. result = renew_delegation_token_result()
  2272. result.read(self._iprot)
  2273. self._iprot.readMessageEnd()
  2274. if result.success != None:
  2275. return result.success
  2276. if result.o1 != None:
  2277. raise result.o1
  2278. raise TApplicationException(TApplicationException.MISSING_RESULT, "renew_delegation_token failed: unknown result");
  2279. def cancel_delegation_token(self, token_str_form):
  2280. """
  2281. Parameters:
  2282. - token_str_form
  2283. """
  2284. self.send_cancel_delegation_token(token_str_form)
  2285. self.recv_cancel_delegation_token()
  2286. def send_cancel_delegation_token(self, token_str_form):
  2287. self._oprot.writeMessageBegin('cancel_delegation_token', TMessageType.CALL, self._seqid)
  2288. args = cancel_delegation_token_args()
  2289. args.token_str_form = token_str_form
  2290. args.write(self._oprot)
  2291. self._oprot.writeMessageEnd()
  2292. self._oprot.trans.flush()
  2293. def recv_cancel_delegation_token(self, ):
  2294. (fname, mtype, rseqid) = self._iprot.readMessageBegin()
  2295. if mtype == TMessageType.EXCEPTION:
  2296. x = TApplicationException()
  2297. x.read(self._iprot)
  2298. self._iprot.readMessageEnd()
  2299. raise x
  2300. result = cancel_delegation_token_result()
  2301. result.read(self._iprot)
  2302. self._iprot.readMessageEnd()
  2303. if result.o1 != None:
  2304. raise result.o1
  2305. return
  2306. class Processor(fb303.FacebookService.Processor, Iface, TProcessor):
  2307. def __init__(self, handler):
  2308. fb303.FacebookService.Processor.__init__(self, handler)
  2309. self._processMap["create_database"] = Processor.process_create_database
  2310. self._processMap["get_database"] = Processor.process_get_database
  2311. self._processMap["drop_database"] = Processor.process_drop_database
  2312. self._processMap["get_databases"] = Processor.process_get_databases
  2313. self._processMap["get_all_databases"] = Processor.process_get_all_databases
  2314. self._processMap["alter_database"] = Processor.process_alter_database
  2315. self._processMap["get_type"] = Processor.process_get_type
  2316. self._processMap["create_type"] = Processor.process_create_type
  2317. self._processMap["drop_type"] = Processor.process_drop_type
  2318. self._processMap["get_type_all"] = Processor.process_get_type_all
  2319. self._processMap["get_fields"] = Processor.process_get_fields
  2320. self._processMap["get_schema"] = Processor.process_get_schema
  2321. self._processMap["create_table"] = Processor.process_create_table
  2322. self._processMap["drop_table"] = Processor.process_drop_table
  2323. self._processMap["get_tables"] = Processor.process_get_tables
  2324. self._processMap["get_all_tables"] = Processor.process_get_all_tables
  2325. self._processMap["get_table"] = Processor.process_get_table
  2326. self._processMap["alter_table"] = Processor.process_alter_table
  2327. self._processMap["add_partition"] = Processor.process_add_partition
  2328. self._processMap["append_partition"] = Processor.process_append_partition
  2329. self._processMap["append_partition_by_name"] = Processor.process_append_partition_by_name
  2330. self._processMap["drop_partition"] = Processor.process_drop_partition
  2331. self._processMap["drop_partition_by_name"] = Processor.process_drop_partition_by_name
  2332. self._processMap["get_partition"] = Processor.process_get_partition
  2333. self._processMap["get_partition_with_auth"] = Processor.process_get_partition_with_auth
  2334. self._processMap["get_partition_by_name"] = Processor.process_get_partition_by_name
  2335. self._processMap["get_partitions"] = Processor.process_get_partitions
  2336. self._processMap["get_partitions_with_auth"] = Processor.process_get_partitions_with_auth
  2337. self._processMap["get_partition_names"] = Processor.process_get_partition_names
  2338. self._processMap["get_partitions_ps"] = Processor.process_get_partitions_ps
  2339. self._processMap["get_partitions_ps_with_auth"] = Processor.process_get_partitions_ps_with_auth
  2340. self._processMap["get_partition_names_ps"] = Processor.process_get_partition_names_ps
  2341. self._processMap["get_partitions_by_filter"] = Processor.process_get_partitions_by_filter
  2342. self._processMap["alter_partition"] = Processor.process_alter_partition
  2343. self._processMap["get_config_value"] = Processor.process_get_config_value
  2344. self._processMap["partition_name_to_vals"] = Processor.process_partition_name_to_vals
  2345. self._processMap["partition_name_to_spec"] = Processor.process_partition_name_to_spec
  2346. self._processMap["add_index"] = Processor.process_add_index
  2347. self._processMap["alter_index"] = Processor.process_alter_index
  2348. self._processMap["drop_index_by_name"] = Processor.process_drop_index_by_name
  2349. self._processMap["get_index_by_name"] = Processor.process_get_index_by_name
  2350. self._processMap["get_indexes"] = Processor.process_get_indexes
  2351. self._processMap["get_index_names"] = Processor.process_get_index_names
  2352. self._processMap["create_role"] = Processor.process_create_role
  2353. self._processMap["drop_role"] = Processor.process_drop_role
  2354. self._processMap["get_role_names"] = Processor.process_get_role_names
  2355. self._processMap["grant_role"] = Processor.process_grant_role
  2356. self._processMap["revoke_role"] = Processor.process_revoke_role
  2357. self._processMap["list_roles"] = Processor.process_list_roles
  2358. self._processMap["get_privilege_set"] = Processor.process_get_privilege_set
  2359. self._processMap["list_privileges"] = Processor.process_list_privileges
  2360. self._processMap["grant_privileges"] = Processor.process_grant_privileges
  2361. self._processMap["revoke_privileges"] = Processor.process_revoke_privileges
  2362. self._processMap["get_delegation_token"] = Processor.process_get_delegation_token
  2363. self._processMap["get_delegation_token_with_signature"] = Processor.process_get_delegation_token_with_signature
  2364. self._processMap["renew_delegation_token"] = Processor.process_renew_delegation_token
  2365. self._processMap["cancel_delegation_token"] = Processor.process_cancel_delegation_token
  2366. def process(self, iprot, oprot):
  2367. (name, type, seqid) = iprot.readMessageBegin()
  2368. if name not in self._processMap:
  2369. iprot.skip(TType.STRUCT)
  2370. iprot.readMessageEnd()
  2371. x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
  2372. oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
  2373. x.write(oprot)
  2374. oprot.writeMessageEnd()
  2375. oprot.trans.flush()
  2376. return
  2377. else:
  2378. self._processMap[name](self, seqid, iprot, oprot)
  2379. return True
  2380. def process_create_database(self, seqid, iprot, oprot):
  2381. args = create_database_args()
  2382. args.read(iprot)
  2383. iprot.readMessageEnd()
  2384. result = create_database_result()
  2385. try:
  2386. self._handler.create_database(args.database)
  2387. except AlreadyExistsException, o1:
  2388. result.o1 = o1
  2389. except InvalidObjectException, o2:
  2390. result.o2 = o2
  2391. except MetaException, o3:
  2392. result.o3 = o3
  2393. oprot.writeMessageBegin("create_database", TMessageType.REPLY, seqid)
  2394. result.write(oprot)
  2395. oprot.writeMessageEnd()
  2396. oprot.trans.flush()
  2397. def process_get_database(self, seqid, iprot, oprot):
  2398. args = get_database_args()
  2399. args.read(iprot)
  2400. iprot.readMessageEnd()
  2401. result = get_database_result()
  2402. try:
  2403. result.success = self._handler.get_database(args.name)
  2404. except NoSuchObjectException, o1:
  2405. result.o1 = o1
  2406. except MetaException, o2:
  2407. result.o2 = o2
  2408. oprot.writeMessageBegin("get_database", TMessageType.REPLY, seqid)
  2409. result.write(oprot)
  2410. oprot.writeMessageEnd()
  2411. oprot.trans.flush()
  2412. def process_drop_database(self, seqid, iprot, oprot):
  2413. args = drop_database_args()
  2414. args.read(iprot)
  2415. iprot.readMessageEnd()
  2416. result = drop_database_result()
  2417. try:
  2418. self._handler.drop_database(args.name, args.deleteData)
  2419. except NoSuchObjectException, o1:
  2420. result.o1 = o1
  2421. except InvalidOperationException, o2:
  2422. result.o2 = o2
  2423. except MetaException, o3:
  2424. result.o3 = o3
  2425. oprot.writeMessageBegin("drop_database", TMessageType.REPLY, seqid)
  2426. result.write(oprot)
  2427. oprot.writeMessageEnd()
  2428. oprot.trans.flush()
  2429. def process_get_databases(self, seqid, iprot, oprot):
  2430. args = get_databases_args()
  2431. args.read(iprot)
  2432. iprot.readMessageEnd()
  2433. result = get_databases_result()
  2434. try:
  2435. result.success = self._handler.get_databases(args.pattern)
  2436. except MetaException, o1:
  2437. result.o1 = o1
  2438. oprot.writeMessageBegin("get_databases", TMessageType.REPLY, seqid)
  2439. result.write(oprot)
  2440. oprot.writeMessageEnd()
  2441. oprot.trans.flush()
  2442. def process_get_all_databases(self, seqid, iprot, oprot):
  2443. args = get_all_databases_args()
  2444. args.read(iprot)
  2445. iprot.readMessageEnd()
  2446. result = get_all_databases_result()
  2447. try:
  2448. result.success = self._handler.get_all_databases()
  2449. except MetaException, o1:
  2450. result.o1 = o1
  2451. oprot.writeMessageBegin("get_all_databases", TMessageType.REPLY, seqid)
  2452. result.write(oprot)
  2453. oprot.writeMessageEnd()
  2454. oprot.trans.flush()
  2455. def process_alter_database(self, seqid, iprot, oprot):
  2456. args = alter_database_args()
  2457. args.read(iprot)
  2458. iprot.readMessageEnd()
  2459. result = alter_database_result()
  2460. try:
  2461. self._handler.alter_database(args.dbname, args.db)
  2462. except MetaException, o1:
  2463. result.o1 = o1
  2464. except NoSuchObjectException, o2:
  2465. result.o2 = o2
  2466. oprot.writeMessageBegin("alter_database", TMessageType.REPLY, seqid)
  2467. result.write(oprot)
  2468. oprot.writeMessageEnd()
  2469. oprot.trans.flush()
  2470. def process_get_type(self, seqid, iprot, oprot):
  2471. args = get_type_args()
  2472. args.read(iprot)
  2473. iprot.readMessageEnd()
  2474. result = get_type_result()
  2475. try:
  2476. result.success = self._handler.get_type(args.name)
  2477. except MetaException, o1:
  2478. result.o1 = o1
  2479. except NoSuchObjectException, o2:
  2480. result.o2 = o2
  2481. oprot.writeMessageBegin("get_type", TMessageType.REPLY, seqid)
  2482. result.write(oprot)
  2483. oprot.writeMessageEnd()
  2484. oprot.trans.flush()
  2485. def process_create_type(self, seqid, iprot, oprot):
  2486. args = create_type_args()
  2487. args.read(iprot)
  2488. iprot.readMessageEnd()
  2489. result = create_type_result()
  2490. try:
  2491. result.success = self._handler.create_type(args.type)
  2492. except AlreadyExistsException, o1:
  2493. result.o1 = o1
  2494. except InvalidObjectException, o2:
  2495. result.o2 = o2
  2496. except MetaException, o3:
  2497. result.o3 = o3
  2498. oprot.writeMessageBegin("create_type", TMessageType.REPLY, seqid)
  2499. result.write(oprot)
  2500. oprot.writeMessageEnd()
  2501. oprot.trans.flush()
  2502. def process_drop_type(self, seqid, iprot, oprot):
  2503. args = drop_type_args()
  2504. args.read(iprot)
  2505. iprot.readMessageEnd()
  2506. result = drop_type_result()
  2507. try:
  2508. result.success = self._handler.drop_type(args.type)
  2509. except MetaException, o1:
  2510. result.o1 = o1
  2511. except NoSuchObjectException, o2:
  2512. result.o2 = o2
  2513. oprot.writeMessageBegin("drop_type", TMessageType.REPLY, seqid)
  2514. result.write(oprot)
  2515. oprot.writeMessageEnd()
  2516. oprot.trans.flush()
  2517. def process_get_type_all(self, seqid, iprot, oprot):
  2518. args = get_type_all_args()
  2519. args.read(iprot)
  2520. iprot.readMessageEnd()
  2521. result = get_type_all_result()
  2522. try:
  2523. result.success = self._handler.get_type_all(args.name)
  2524. except MetaException, o2:
  2525. result.o2 = o2
  2526. oprot.writeMessageBegin("get_type_all", TMessageType.REPLY, seqid)
  2527. result.write(oprot)
  2528. oprot.writeMessageEnd()
  2529. oprot.trans.flush()
  2530. def process_get_fields(self, seqid, iprot, oprot):
  2531. args = get_fields_args()
  2532. args.read(iprot)
  2533. iprot.readMessageEnd()
  2534. result = get_fields_result()
  2535. try:
  2536. result.success = self._handler.get_fields(args.db_name, args.table_name)
  2537. except MetaException, o1:
  2538. result.o1 = o1
  2539. except UnknownTableException, o2:
  2540. result.o2 = o2
  2541. except UnknownDBException, o3:
  2542. result.o3 = o3
  2543. oprot.writeMessageBegin("get_fields", TMessageType.REPLY, seqid)
  2544. result.write(oprot)
  2545. oprot.writeMessageEnd()
  2546. oprot.trans.flush()
  2547. def process_get_schema(self, seqid, iprot, oprot):
  2548. args = get_schema_args()
  2549. args.read(iprot)
  2550. iprot.readMessageEnd()
  2551. result = get_schema_result()
  2552. try:
  2553. result.success = self._handler.get_schema(args.db_name, args.table_name)
  2554. except MetaException, o1:
  2555. result.o1 = o1
  2556. except UnknownTableException, o2:
  2557. result.o2 = o2
  2558. except UnknownDBException, o3:
  2559. result.o3 = o3
  2560. oprot.writeMessageBegin("get_schema", TMessageType.REPLY, seqid)
  2561. result.write(oprot)
  2562. oprot.writeMessageEnd()
  2563. oprot.trans.flush()
  2564. def process_create_table(self, seqid, iprot, oprot):
  2565. args = create_table_args()
  2566. args.read(iprot)
  2567. iprot.readMessageEnd()
  2568. result = create_table_result()
  2569. try:
  2570. self._handler.create_table(args.tbl)
  2571. except AlreadyExistsException, o1:
  2572. result.o1 = o1
  2573. except InvalidObjectException, o2:
  2574. result.o2 = o2
  2575. except MetaException, o3:
  2576. result.o3 = o3
  2577. except NoSuchObjectException, o4:
  2578. result.o4 = o4
  2579. oprot.writeMessageBegin("create_table", TMessageType.REPLY, seqid)
  2580. result.write(oprot)
  2581. oprot.writeMessageEnd()
  2582. oprot.trans.flush()
  2583. def process_drop_table(self, seqid, iprot, oprot):
  2584. args = drop_table_args()
  2585. args.read(iprot)
  2586. iprot.readMessageEnd()
  2587. result = drop_table_result()
  2588. try:
  2589. self._handler.drop_table(args.dbname, args.name, args.deleteData)
  2590. except NoSuchObjectException, o1:
  2591. result.o1 = o1
  2592. except MetaException, o3:
  2593. result.o3 = o3
  2594. oprot.writeMessageBegin("drop_table", TMessageType.REPLY, seqid)
  2595. result.write(oprot)
  2596. oprot.writeMessageEnd()
  2597. oprot.trans.flush()
  2598. def process_get_tables(self, seqid, iprot, oprot):
  2599. args = get_tables_args()
  2600. args.read(iprot)
  2601. iprot.readMessageEnd()
  2602. result = get_tables_result()
  2603. try:
  2604. result.success = self._handler.get_tables(args.db_name, args.pattern)
  2605. except MetaException, o1:
  2606. result.o1 = o1
  2607. oprot.writeMessageBegin("get_tables", TMessageType.REPLY, seqid)
  2608. result.write(oprot)
  2609. oprot.writeMessageEnd()
  2610. oprot.trans.flush()
  2611. def process_get_all_tables(self, seqid, iprot, oprot):
  2612. args = get_all_tables_args()
  2613. args.read(iprot)
  2614. iprot.readMessageEnd()
  2615. result = get_all_tables_result()
  2616. try:
  2617. result.success = self._handler.get_all_tables(args.db_name)
  2618. except MetaException, o1:
  2619. result.o1 = o1
  2620. oprot.writeMessageBegin("get_all_tables", TMessageType.REPLY, seqid)
  2621. result.write(oprot)
  2622. oprot.writeMessageEnd()
  2623. oprot.trans.flush()
  2624. def process_get_table(self, seqid, iprot, oprot):
  2625. args = get_table_args()
  2626. args.read(iprot)
  2627. iprot.readMessageEnd()
  2628. result = get_table_result()
  2629. try:
  2630. result.success = self._handler.get_table(args.dbname, args.tbl_name)
  2631. except MetaException, o1:
  2632. result.o1 = o1
  2633. except NoSuchObjectException, o2:
  2634. result.o2 = o2
  2635. oprot.writeMessageBegin("get_table", TMessageType.REPLY, seqid)
  2636. result.write(oprot)
  2637. oprot.writeMessageEnd()
  2638. oprot.trans.flush()
  2639. def process_alter_table(self, seqid, iprot, oprot):
  2640. args = alter_table_args()
  2641. args.read(iprot)
  2642. iprot.readMessageEnd()
  2643. result = alter_table_result()
  2644. try:
  2645. self._handler.alter_table(args.dbname, args.tbl_name, args.new_tbl)
  2646. except InvalidOperationException, o1:
  2647. result.o1 = o1
  2648. except MetaException, o2:
  2649. result.o2 = o2
  2650. oprot.writeMessageBegin("alter_table", TMessageType.REPLY, seqid)
  2651. result.write(oprot)
  2652. oprot.writeMessageEnd()
  2653. oprot.trans.flush()
  2654. def process_add_partition(self, seqid, iprot, oprot):
  2655. args = add_partition_args()
  2656. args.read(iprot)
  2657. iprot.readMessageEnd()
  2658. result = add_partition_result()
  2659. try:
  2660. result.success = self._handler.add_partition(args.new_part)
  2661. except InvalidObjectException, o1:
  2662. result.o1 = o1
  2663. except AlreadyExistsException, o2:
  2664. result.o2 = o2
  2665. except MetaException, o3:
  2666. result.o3 = o3
  2667. oprot.writeMessageBegin("add_partition", TMessageType.REPLY, seqid)
  2668. result.write(oprot)
  2669. oprot.writeMessageEnd()
  2670. oprot.trans.flush()
  2671. def process_append_partition(self, seqid, iprot, oprot):
  2672. args = append_partition_args()
  2673. args.read(iprot)
  2674. iprot.readMessageEnd()
  2675. result = append_partition_result()
  2676. try:
  2677. result.success = self._handler.append_partition(args.db_name, args.tbl_name, args.part_vals)
  2678. except InvalidObjectException, o1:
  2679. result.o1 = o1
  2680. except AlreadyExistsException, o2:
  2681. result.o2 = o2
  2682. except MetaException, o3:
  2683. result.o3 = o3
  2684. oprot.writeMessageBegin("append_partition", TMessageType.REPLY, seqid)
  2685. result.write(oprot)
  2686. oprot.writeMessageEnd()
  2687. oprot.trans.flush()
  2688. def process_append_partition_by_name(self, seqid, iprot, oprot):
  2689. args = append_partition_by_name_args()
  2690. args.read(iprot)
  2691. iprot.readMessageEnd()
  2692. result = append_partition_by_name_result()
  2693. try:
  2694. result.success = self._handler.append_partition_by_name(args.db_name, args.tbl_name, args.part_name)
  2695. except InvalidObjectException, o1:
  2696. result.o1 = o1
  2697. except AlreadyExistsException, o2:
  2698. result.o2 = o2
  2699. except MetaException, o3:
  2700. result.o3 = o3
  2701. oprot.writeMessageBegin("append_partition_by_name", TMessageType.REPLY, seqid)
  2702. result.write(oprot)
  2703. oprot.writeMessageEnd()
  2704. oprot.trans.flush()
  2705. def process_drop_partition(self, seqid, iprot, oprot):
  2706. args = drop_partition_args()
  2707. args.read(iprot)
  2708. iprot.readMessageEnd()
  2709. result = drop_partition_result()
  2710. try:
  2711. result.success = self._handler.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData)
  2712. except NoSuchObjectException, o1:
  2713. result.o1 = o1
  2714. except MetaException, o2:
  2715. result.o2 = o2
  2716. oprot.writeMessageBegin("drop_partition", TMessageType.REPLY, seqid)
  2717. result.write(oprot)
  2718. oprot.writeMessageEnd()
  2719. oprot.trans.flush()
  2720. def process_drop_partition_by_name(self, seqid, iprot, oprot):
  2721. args = drop_partition_by_name_args()
  2722. args.read(iprot)
  2723. iprot.readMessageEnd()
  2724. result = drop_partition_by_name_result()
  2725. try:
  2726. result.success = self._handler.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData)
  2727. except NoSuchObjectException, o1:
  2728. result.o1 = o1
  2729. except MetaException, o2:
  2730. result.o2 = o2
  2731. oprot.writeMessageBegin("drop_partition_by_name", TMessageType.REPLY, seqid)
  2732. result.write(oprot)
  2733. oprot.writeMessageEnd()
  2734. oprot.trans.flush()
  2735. def process_get_partition(self, seqid, iprot, oprot):
  2736. args = get_partition_args()
  2737. args.read(iprot)
  2738. iprot.readMessageEnd()
  2739. result = get_partition_result()
  2740. try:
  2741. result.success = self._handler.get_partition(args.db_name, args.tbl_name, args.part_vals)
  2742. except MetaException, o1:
  2743. result.o1 = o1
  2744. except NoSuchObjectException, o2:
  2745. result.o2 = o2
  2746. oprot.writeMessageBegin("get_partition", TMessageType.REPLY, seqid)
  2747. result.write(oprot)
  2748. oprot.writeMessageEnd()
  2749. oprot.trans.flush()
  2750. def process_get_partition_with_auth(self, seqid, iprot, oprot):
  2751. args = get_partition_with_auth_args()
  2752. args.read(iprot)
  2753. iprot.readMessageEnd()
  2754. result = get_partition_with_auth_result()
  2755. try:
  2756. result.success = self._handler.get_partition_with_auth(args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names)
  2757. except MetaException, o1:
  2758. result.o1 = o1
  2759. except NoSuchObjectException, o2:
  2760. result.o2 = o2
  2761. oprot.writeMessageBegin("get_partition_with_auth", TMessageType.REPLY, seqid)
  2762. result.write(oprot)
  2763. oprot.writeMessageEnd()
  2764. oprot.trans.flush()
  2765. def process_get_partition_by_name(self, seqid, iprot, oprot):
  2766. args = get_partition_by_name_args()
  2767. args.read(iprot)
  2768. iprot.readMessageEnd()
  2769. result = get_partition_by_name_result()
  2770. try:
  2771. result.success = self._handler.get_partition_by_name(args.db_name, args.tbl_name, args.part_name)
  2772. except MetaException, o1:
  2773. result.o1 = o1
  2774. except NoSuchObjectException, o2:
  2775. result.o2 = o2
  2776. oprot.writeMessageBegin("get_partition_by_name", TMessageType.REPLY, seqid)
  2777. result.write(oprot)
  2778. oprot.writeMessageEnd()
  2779. oprot.trans.flush()
  2780. def process_get_partitions(self, seqid, iprot, oprot):
  2781. args = get_partitions_args()
  2782. args.read(iprot)
  2783. iprot.readMessageEnd()
  2784. result = get_partitions_result()
  2785. try:
  2786. result.success = self._handler.get_partitions(args.db_name, args.tbl_name, args.max_parts)
  2787. except NoSuchObjectException, o1:
  2788. result.o1 = o1
  2789. except MetaException, o2:
  2790. result.o2 = o2
  2791. oprot.writeMessageBegin("get_partitions", TMessageType.REPLY, seqid)
  2792. result.write(oprot)
  2793. oprot.writeMessageEnd()
  2794. oprot.trans.flush()
  2795. def process_get_partitions_with_auth(self, seqid, iprot, oprot):
  2796. args = get_partitions_with_auth_args()
  2797. args.read(iprot)
  2798. iprot.readMessageEnd()
  2799. result = get_partitions_with_auth_result()
  2800. try:
  2801. result.success = self._handler.get_partitions_with_auth(args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names)
  2802. except NoSuchObjectException, o1:
  2803. result.o1 = o1
  2804. except MetaException, o2:
  2805. result.o2 = o2
  2806. oprot.writeMessageBegin("get_partitions_with_auth", TMessageType.REPLY, seqid)
  2807. result.write(oprot)
  2808. oprot.writeMessageEnd()
  2809. oprot.trans.flush()
  2810. def process_get_partition_names(self, seqid, iprot, oprot):
  2811. args = get_partition_names_args()
  2812. args.read(iprot)
  2813. iprot.readMessageEnd()
  2814. result = get_partition_names_result()
  2815. try:
  2816. result.success = self._handler.get_partition_names(args.db_name, args.tbl_name, args.max_parts)
  2817. except MetaException, o2:
  2818. result.o2 = o2
  2819. oprot.writeMessageBegin("get_partition_names", TMessageType.REPLY, seqid)
  2820. result.write(oprot)
  2821. oprot.writeMessageEnd()
  2822. oprot.trans.flush()
  2823. def process_get_partitions_ps(self, seqid, iprot, oprot):
  2824. args = get_partitions_ps_args()
  2825. args.read(iprot)
  2826. iprot.readMessageEnd()
  2827. result = get_partitions_ps_result()
  2828. try:
  2829. result.success = self._handler.get_partitions_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts)
  2830. except MetaException, o1:
  2831. result.o1 = o1
  2832. oprot.writeMessageBegin("get_partitions_ps", TMessageType.REPLY, seqid)
  2833. result.write(oprot)
  2834. oprot.writeMessageEnd()
  2835. oprot.trans.flush()
  2836. def process_get_partitions_ps_with_auth(self, seqid, iprot, oprot):
  2837. args = get_partitions_ps_with_auth_args()
  2838. args.read(iprot)
  2839. iprot.readMessageEnd()
  2840. result = get_partitions_ps_with_auth_result()
  2841. try:
  2842. result.success = self._handler.get_partitions_ps_with_auth(args.db_name, args.tbl_name, args.part_vals, args.max_parts, args.user_name, args.group_names)
  2843. except NoSuchObjectException, o1:
  2844. result.o1 = o1
  2845. except MetaException, o2:
  2846. result.o2 = o2
  2847. oprot.writeMessageBegin("get_partitions_ps_with_auth", TMessageType.REPLY, seqid)
  2848. result.write(oprot)
  2849. oprot.writeMessageEnd()
  2850. oprot.trans.flush()
  2851. def process_get_partition_names_ps(self, seqid, iprot, oprot):
  2852. args = get_partition_names_ps_args()
  2853. args.read(iprot)
  2854. iprot.readMessageEnd()
  2855. result = get_partition_names_ps_result()
  2856. try:
  2857. result.success = self._handler.get_partition_names_ps(args.db_name, args.tbl_name, args.part_vals, args.max_parts)
  2858. except MetaException, o1:
  2859. result.o1 = o1
  2860. oprot.writeMessageBegin("get_partition_names_ps", TMessageType.REPLY, seqid)
  2861. result.write(oprot)
  2862. oprot.writeMessageEnd()
  2863. oprot.trans.flush()
  2864. def process_get_partitions_by_filter(self, seqid, iprot, oprot):
  2865. args = get_partitions_by_filter_args()
  2866. args.read(iprot)
  2867. iprot.readMessageEnd()
  2868. result = get_partitions_by_filter_result()
  2869. try:
  2870. result.success = self._handler.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts)
  2871. except MetaException, o1:
  2872. result.o1 = o1
  2873. except NoSuchObjectException, o2:
  2874. result.o2 = o2
  2875. oprot.writeMessageBegin("get_partitions_by_filter", TMessageType.REPLY, seqid)
  2876. result.write(oprot)
  2877. oprot.writeMessageEnd()
  2878. oprot.trans.flush()
  2879. def process_alter_partition(self, seqid, iprot, oprot):
  2880. args = alter_partition_args()
  2881. args.read(iprot)
  2882. iprot.readMessageEnd()
  2883. result = alter_partition_result()
  2884. try:
  2885. self._handler.alter_partition(args.db_name, args.tbl_name, args.new_part)
  2886. except InvalidOperationException, o1:
  2887. result.o1 = o1
  2888. except MetaException, o2:
  2889. result.o2 = o2
  2890. oprot.writeMessageBegin("alter_partition", TMessageType.REPLY, seqid)
  2891. result.write(oprot)
  2892. oprot.writeMessageEnd()
  2893. oprot.trans.flush()
  2894. def process_get_config_value(self, seqid, iprot, oprot):
  2895. args = get_config_value_args()
  2896. args.read(iprot)
  2897. iprot.readMessageEnd()
  2898. result = get_config_value_result()
  2899. try:
  2900. result.success = self._handler.get_config_value(args.name, args.defaultValue)
  2901. except ConfigValSecurityException, o1:
  2902. result.o1 = o1
  2903. oprot.writeMessageBegin("get_config_value", TMessageType.REPLY, seqid)
  2904. result.write(oprot)
  2905. oprot.writeMessageEnd()
  2906. oprot.trans.flush()
  2907. def process_partition_name_to_vals(self, seqid, iprot, oprot):
  2908. args = partition_name_to_vals_args()
  2909. args.read(iprot)
  2910. iprot.readMessageEnd()
  2911. result = partition_name_to_vals_result()
  2912. try:
  2913. result.success = self._handler.partition_name_to_vals(args.part_name)
  2914. except MetaException, o1:
  2915. result.o1 = o1
  2916. oprot.writeMessageBegin("partition_name_to_vals", TMessageType.REPLY, seqid)
  2917. result.write(oprot)
  2918. oprot.writeMessageEnd()
  2919. oprot.trans.flush()
  2920. def process_partition_name_to_spec(self, seqid, iprot, oprot):
  2921. args = partition_name_to_spec_args()
  2922. args.read(iprot)
  2923. iprot.readMessageEnd()
  2924. result = partition_name_to_spec_result()
  2925. try:
  2926. result.success = self._handler.partition_name_to_spec(args.part_name)
  2927. except MetaException, o1:
  2928. result.o1 = o1
  2929. oprot.writeMessageBegin("partition_name_to_spec", TMessageType.REPLY, seqid)
  2930. result.write(oprot)
  2931. oprot.writeMessageEnd()
  2932. oprot.trans.flush()
  2933. def process_add_index(self, seqid, iprot, oprot):
  2934. args = add_index_args()
  2935. args.read(iprot)
  2936. iprot.readMessageEnd()
  2937. result = add_index_result()
  2938. try:
  2939. result.success = self._handler.add_index(args.new_index, args.index_table)
  2940. except InvalidObjectException, o1:
  2941. result.o1 = o1
  2942. except AlreadyExistsException, o2:
  2943. result.o2 = o2
  2944. except MetaException, o3:
  2945. result.o3 = o3
  2946. oprot.writeMessageBegin("add_index", TMessageType.REPLY, seqid)
  2947. result.write(oprot)
  2948. oprot.writeMessageEnd()
  2949. oprot.trans.flush()
  2950. def process_alter_index(self, seqid, iprot, oprot):
  2951. args = alter_index_args()
  2952. args.read(iprot)
  2953. iprot.readMessageEnd()
  2954. result = alter_index_result()
  2955. try:
  2956. self._handler.alter_index(args.dbname, args.base_tbl_name, args.idx_name, args.new_idx)
  2957. except InvalidOperationException, o1:
  2958. result.o1 = o1
  2959. except MetaException, o2:
  2960. result.o2 = o2
  2961. oprot.writeMessageBegin("alter_index", TMessageType.REPLY, seqid)
  2962. result.write(oprot)
  2963. oprot.writeMessageEnd()
  2964. oprot.trans.flush()
  2965. def process_drop_index_by_name(self, seqid, iprot, oprot):
  2966. args = drop_index_by_name_args()
  2967. args.read(iprot)
  2968. iprot.readMessageEnd()
  2969. result = drop_index_by_name_result()
  2970. try:
  2971. result.success = self._handler.drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData)
  2972. except NoSuchObjectException, o1:
  2973. result.o1 = o1
  2974. except MetaException, o2:
  2975. result.o2 = o2
  2976. oprot.writeMessageBegin("drop_index_by_name", TMessageType.REPLY, seqid)
  2977. result.write(oprot)
  2978. oprot.writeMessageEnd()
  2979. oprot.trans.flush()
  2980. def process_get_index_by_name(self, seqid, iprot, oprot):
  2981. args = get_index_by_name_args()
  2982. args.read(iprot)
  2983. iprot.readMessageEnd()
  2984. result = get_index_by_name_result()
  2985. try:
  2986. result.success = self._handler.get_index_by_name(args.db_name, args.tbl_name, args.index_name)
  2987. except MetaException, o1:
  2988. result.o1 = o1
  2989. except NoSuchObjectException, o2:
  2990. result.o2 = o2
  2991. oprot.writeMessageBegin("get_index_by_name", TMessageType.REPLY, seqid)
  2992. result.write(oprot)
  2993. oprot.writeMessageEnd()
  2994. oprot.trans.flush()
  2995. def process_get_indexes(self, seqid, iprot, oprot):
  2996. args = get_indexes_args()
  2997. args.read(iprot)
  2998. iprot.readMessageEnd()
  2999. result = get_indexes_result()
  3000. try:
  3001. result.success = self._handler.get_indexes(args.db_name, args.tbl_name, args.max_indexes)
  3002. except NoSuchObjectException, o1:
  3003. result.o1 = o1
  3004. except MetaException, o2:
  3005. result.o2 = o2
  3006. oprot.writeMessageBegin("get_indexes", TMessageType.REPLY, seqid)
  3007. result.write(oprot)
  3008. oprot.writeMessageEnd()
  3009. oprot.trans.flush()
  3010. def process_get_index_names(self, seqid, iprot, oprot):
  3011. args = get_index_names_args()
  3012. args.read(iprot)
  3013. iprot.readMessageEnd()
  3014. result = get_index_names_result()
  3015. try:
  3016. result.success = self._handler.get_index_names(args.db_name, args.tbl_name, args.max_indexes)
  3017. except MetaException, o2:
  3018. result.o2 = o2
  3019. oprot.writeMessageBegin("get_index_names", TMessageType.REPLY, seqid)
  3020. result.write(oprot)
  3021. oprot.writeMessageEnd()
  3022. oprot.trans.flush()
  3023. def process_create_role(self, seqid, iprot, oprot):
  3024. args = create_role_args()
  3025. args.read(iprot)
  3026. iprot.readMessageEnd()
  3027. result = create_role_result()
  3028. try:
  3029. result.success = self._handler.create_role(args.role)
  3030. except MetaException, o1:
  3031. result.o1 = o1
  3032. oprot.writeMessageBegin("create_role", TMessageType.REPLY, seqid)
  3033. result.write(oprot)
  3034. oprot.writeMessageEnd()
  3035. oprot.trans.flush()
  3036. def process_drop_role(self, seqid, iprot, oprot):
  3037. args = drop_role_args()
  3038. args.read(iprot)
  3039. iprot.readMessageEnd()
  3040. result = drop_role_result()
  3041. try:
  3042. result.success = self._handler.drop_role(args.role_name)
  3043. except MetaException, o1:
  3044. result.o1 = o1
  3045. oprot.writeMessageBegin("drop_role", TMessageType.REPLY, seqid)
  3046. result.write(oprot)
  3047. oprot.writeMessageEnd()
  3048. oprot.trans.flush()
  3049. def process_get_role_names(self, seqid, iprot, oprot):
  3050. args = get_role_names_args()
  3051. args.read(iprot)
  3052. iprot.readMessageEnd()
  3053. result = get_role_names_result()
  3054. try:
  3055. result.success = self._handler.get_role_names()
  3056. except MetaException, o1:
  3057. result.o1 = o1
  3058. oprot.writeMessageBegin("get_role_names", TMessageType.REPLY, seqid)
  3059. result.write(oprot)
  3060. oprot.writeMessageEnd()
  3061. oprot.trans.flush()
  3062. def process_grant_role(self, seqid, iprot, oprot):
  3063. args = grant_role_args()
  3064. args.read(iprot)
  3065. iprot.readMessageEnd()
  3066. result = grant_role_result()
  3067. try:
  3068. result.success = self._handler.grant_role(args.role_name, args.principal_name, args.principal_type, args.grantor, args.grantorType, args.grant_option)
  3069. except MetaException, o1:
  3070. result.o1 = o1
  3071. oprot.writeMessageBegin("grant_role", TMessageType.REPLY, seqid)
  3072. result.write(oprot)
  3073. oprot.writeMessageEnd()
  3074. oprot.trans.flush()
  3075. def process_revoke_role(self, seqid, iprot, oprot):
  3076. args = revoke_role_args()
  3077. args.read(iprot)
  3078. iprot.readMessageEnd()
  3079. result = revoke_role_result()
  3080. try:
  3081. result.success = self._handler.revoke_role(args.role_name, args.principal_name, args.principal_type)
  3082. except MetaException, o1:
  3083. result.o1 = o1
  3084. oprot.writeMessageBegin("revoke_role", TMessageType.REPLY, seqid)
  3085. result.write(oprot)
  3086. oprot.writeMessageEnd()
  3087. oprot.trans.flush()
  3088. def process_list_roles(self, seqid, iprot, oprot):
  3089. args = list_roles_args()
  3090. args.read(iprot)
  3091. iprot.readMessageEnd()
  3092. result = list_roles_result()
  3093. try:
  3094. result.success = self._handler.list_roles(args.principal_name, args.principal_type)
  3095. except MetaException, o1:
  3096. result.o1 = o1
  3097. oprot.writeMessageBegin("list_roles", TMessageType.REPLY, seqid)
  3098. result.write(oprot)
  3099. oprot.writeMessageEnd()
  3100. oprot.trans.flush()
  3101. def process_get_privilege_set(self, seqid, iprot, oprot):
  3102. args = get_privilege_set_args()
  3103. args.read(iprot)
  3104. iprot.readMessageEnd()
  3105. result = get_privilege_set_result()
  3106. try:
  3107. result.success = self._handler.get_privilege_set(args.hiveObject, args.user_name, args.group_names)
  3108. except MetaException, o1:
  3109. result.o1 = o1
  3110. oprot.writeMessageBegin("get_privilege_set", TMessageType.REPLY, seqid)
  3111. result.write(oprot)
  3112. oprot.writeMessageEnd()
  3113. oprot.trans.flush()
  3114. def process_list_privileges(self, seqid, iprot, oprot):
  3115. args = list_privileges_args()
  3116. args.read(iprot)
  3117. iprot.readMessageEnd()
  3118. result = list_privileges_result()
  3119. try:
  3120. result.success = self._handler.list_privileges(args.principal_name, args.principal_type, args.hiveObject)
  3121. except MetaException, o1:
  3122. result.o1 = o1
  3123. oprot.writeMessageBegin("list_privileges", TMessageType.REPLY, seqid)
  3124. result.write(oprot)
  3125. oprot.writeMessageEnd()
  3126. oprot.trans.flush()
  3127. def process_grant_privileges(self, seqid, iprot, oprot):
  3128. args = grant_privileges_args()
  3129. args.read(iprot)
  3130. iprot.readMessageEnd()
  3131. result = grant_privileges_result()
  3132. try:
  3133. result.success = self._handler.grant_privileges(args.privileges)
  3134. except MetaException, o1:
  3135. result.o1 = o1
  3136. oprot.writeMessageBegin("grant_privileges", TMessageType.REPLY, seqid)
  3137. result.write(oprot)
  3138. oprot.writeMessageEnd()
  3139. oprot.trans.flush()
  3140. def process_revoke_privileges(self, seqid, iprot, oprot):
  3141. args = revoke_privileges_args()
  3142. args.read(iprot)
  3143. iprot.readMessageEnd()
  3144. result = revoke_privileges_result()
  3145. try:
  3146. result.success = self._handler.revoke_privileges(args.privileges)
  3147. except MetaException, o1:
  3148. result.o1 = o1
  3149. oprot.writeMessageBegin("revoke_privileges", TMessageType.REPLY, seqid)
  3150. result.write(oprot)
  3151. oprot.writeMessageEnd()
  3152. oprot.trans.flush()
  3153. def process_get_delegation_token(self, seqid, iprot, oprot):
  3154. args = get_delegation_token_args()
  3155. args.read(iprot)
  3156. iprot.readMessageEnd()
  3157. result = get_delegation_token_result()
  3158. try:
  3159. result.success = self._handler.get_delegation_token(args.renewer_kerberos_principal_name)
  3160. except MetaException, o1:
  3161. result.o1 = o1
  3162. oprot.writeMessageBegin("get_delegation_token", TMessageType.REPLY, seqid)
  3163. result.write(oprot)
  3164. oprot.writeMessageEnd()
  3165. oprot.trans.flush()
  3166. def process_get_delegation_token_with_signature(self, seqid, iprot, oprot):
  3167. args = get_delegation_token_with_signature_args()
  3168. args.read(iprot)
  3169. iprot.readMessageEnd()
  3170. result = get_delegation_token_with_signature_result()
  3171. try:
  3172. result.success = self._handler.get_delegation_token_with_signature(args.renewer_kerberos_principal_name, args.token_signature)
  3173. except MetaException, o1:
  3174. result.o1 = o1
  3175. oprot.writeMessageBegin("get_delegation_token_with_signature", TMessageType.REPLY, seqid)
  3176. result.write(oprot)
  3177. oprot.writeMessageEnd()
  3178. oprot.trans.flush()
  3179. def process_renew_delegation_token(self, seqid, iprot, oprot):
  3180. args = renew_delegation_token_args()
  3181. args.read(iprot)
  3182. iprot.readMessageEnd()
  3183. result = renew_delegation_token_result()
  3184. try:
  3185. result.success = self._handler.renew_delegation_token(args.token_str_form)
  3186. except MetaException, o1:
  3187. result.o1 = o1
  3188. oprot.writeMessageBegin("renew_delegation_token", TMessageType.REPLY, seqid)
  3189. result.write(oprot)
  3190. oprot.writeMessageEnd()
  3191. oprot.trans.flush()
  3192. def process_cancel_delegation_token(self, seqid, iprot, oprot):
  3193. args = cancel_delegation_token_args()
  3194. args.read(iprot)
  3195. iprot.readMessageEnd()
  3196. result = cancel_delegation_token_result()
  3197. try:
  3198. self._handler.cancel_delegation_token(args.token_str_form)
  3199. except MetaException, o1:
  3200. result.o1 = o1
  3201. oprot.writeMessageBegin("cancel_delegation_token", TMessageType.REPLY, seqid)
  3202. result.write(oprot)
  3203. oprot.writeMessageEnd()
  3204. oprot.trans.flush()
  3205. # HELPER FUNCTIONS AND STRUCTURES
  3206. class create_database_args:
  3207. """
  3208. Attributes:
  3209. - database
  3210. """
  3211. thrift_spec = (
  3212. None, # 0
  3213. (1, TType.STRUCT, 'database', (Database, Database.thrift_spec), None, ), # 1
  3214. )
  3215. def __init__(self, database=None,):
  3216. self.database = database
  3217. def read(self, iprot):
  3218. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3219. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3220. return
  3221. iprot.readStructBegin()
  3222. while True:
  3223. (fname, ftype, fid) = iprot.readFieldBegin()
  3224. if ftype == TType.STOP:
  3225. break
  3226. if fid == 1:
  3227. if ftype == TType.STRUCT:
  3228. self.database = Database()
  3229. self.database.read(iprot)
  3230. else:
  3231. iprot.skip(ftype)
  3232. else:
  3233. iprot.skip(ftype)
  3234. iprot.readFieldEnd()
  3235. iprot.readStructEnd()
  3236. def write(self, oprot):
  3237. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3238. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3239. return
  3240. oprot.writeStructBegin('create_database_args')
  3241. if self.database != None:
  3242. oprot.writeFieldBegin('database', TType.STRUCT, 1)
  3243. self.database.write(oprot)
  3244. oprot.writeFieldEnd()
  3245. oprot.writeFieldStop()
  3246. oprot.writeStructEnd()
  3247. def validate(self):
  3248. return
  3249. def __repr__(self):
  3250. L = ['%s=%r' % (key, value)
  3251. for key, value in self.__dict__.iteritems()]
  3252. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3253. def __eq__(self, other):
  3254. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3255. def __ne__(self, other):
  3256. return not (self == other)
  3257. class create_database_result:
  3258. """
  3259. Attributes:
  3260. - o1
  3261. - o2
  3262. - o3
  3263. """
  3264. thrift_spec = (
  3265. None, # 0
  3266. (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1
  3267. (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2
  3268. (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3
  3269. )
  3270. def __init__(self, o1=None, o2=None, o3=None,):
  3271. self.o1 = o1
  3272. self.o2 = o2
  3273. self.o3 = o3
  3274. def read(self, iprot):
  3275. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3276. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3277. return
  3278. iprot.readStructBegin()
  3279. while True:
  3280. (fname, ftype, fid) = iprot.readFieldBegin()
  3281. if ftype == TType.STOP:
  3282. break
  3283. if fid == 1:
  3284. if ftype == TType.STRUCT:
  3285. self.o1 = AlreadyExistsException()
  3286. self.o1.read(iprot)
  3287. else:
  3288. iprot.skip(ftype)
  3289. elif fid == 2:
  3290. if ftype == TType.STRUCT:
  3291. self.o2 = InvalidObjectException()
  3292. self.o2.read(iprot)
  3293. else:
  3294. iprot.skip(ftype)
  3295. elif fid == 3:
  3296. if ftype == TType.STRUCT:
  3297. self.o3 = MetaException()
  3298. self.o3.read(iprot)
  3299. else:
  3300. iprot.skip(ftype)
  3301. else:
  3302. iprot.skip(ftype)
  3303. iprot.readFieldEnd()
  3304. iprot.readStructEnd()
  3305. def write(self, oprot):
  3306. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3307. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3308. return
  3309. oprot.writeStructBegin('create_database_result')
  3310. if self.o1 != None:
  3311. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  3312. self.o1.write(oprot)
  3313. oprot.writeFieldEnd()
  3314. if self.o2 != None:
  3315. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  3316. self.o2.write(oprot)
  3317. oprot.writeFieldEnd()
  3318. if self.o3 != None:
  3319. oprot.writeFieldBegin('o3', TType.STRUCT, 3)
  3320. self.o3.write(oprot)
  3321. oprot.writeFieldEnd()
  3322. oprot.writeFieldStop()
  3323. oprot.writeStructEnd()
  3324. def validate(self):
  3325. return
  3326. def __repr__(self):
  3327. L = ['%s=%r' % (key, value)
  3328. for key, value in self.__dict__.iteritems()]
  3329. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3330. def __eq__(self, other):
  3331. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3332. def __ne__(self, other):
  3333. return not (self == other)
  3334. class get_database_args:
  3335. """
  3336. Attributes:
  3337. - name
  3338. """
  3339. thrift_spec = (
  3340. None, # 0
  3341. (1, TType.STRING, 'name', None, None, ), # 1
  3342. )
  3343. def __init__(self, name=None,):
  3344. self.name = name
  3345. def read(self, iprot):
  3346. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3347. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3348. return
  3349. iprot.readStructBegin()
  3350. while True:
  3351. (fname, ftype, fid) = iprot.readFieldBegin()
  3352. if ftype == TType.STOP:
  3353. break
  3354. if fid == 1:
  3355. if ftype == TType.STRING:
  3356. self.name = iprot.readString();
  3357. else:
  3358. iprot.skip(ftype)
  3359. else:
  3360. iprot.skip(ftype)
  3361. iprot.readFieldEnd()
  3362. iprot.readStructEnd()
  3363. def write(self, oprot):
  3364. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3365. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3366. return
  3367. oprot.writeStructBegin('get_database_args')
  3368. if self.name != None:
  3369. oprot.writeFieldBegin('name', TType.STRING, 1)
  3370. oprot.writeString(self.name)
  3371. oprot.writeFieldEnd()
  3372. oprot.writeFieldStop()
  3373. oprot.writeStructEnd()
  3374. def validate(self):
  3375. return
  3376. def __repr__(self):
  3377. L = ['%s=%r' % (key, value)
  3378. for key, value in self.__dict__.iteritems()]
  3379. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3380. def __eq__(self, other):
  3381. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3382. def __ne__(self, other):
  3383. return not (self == other)
  3384. class get_database_result:
  3385. """
  3386. Attributes:
  3387. - success
  3388. - o1
  3389. - o2
  3390. """
  3391. thrift_spec = (
  3392. (0, TType.STRUCT, 'success', (Database, Database.thrift_spec), None, ), # 0
  3393. (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1
  3394. (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2
  3395. )
  3396. def __init__(self, success=None, o1=None, o2=None,):
  3397. self.success = success
  3398. self.o1 = o1
  3399. self.o2 = o2
  3400. def read(self, iprot):
  3401. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3402. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3403. return
  3404. iprot.readStructBegin()
  3405. while True:
  3406. (fname, ftype, fid) = iprot.readFieldBegin()
  3407. if ftype == TType.STOP:
  3408. break
  3409. if fid == 0:
  3410. if ftype == TType.STRUCT:
  3411. self.success = Database()
  3412. self.success.read(iprot)
  3413. else:
  3414. iprot.skip(ftype)
  3415. elif fid == 1:
  3416. if ftype == TType.STRUCT:
  3417. self.o1 = NoSuchObjectException()
  3418. self.o1.read(iprot)
  3419. else:
  3420. iprot.skip(ftype)
  3421. elif fid == 2:
  3422. if ftype == TType.STRUCT:
  3423. self.o2 = MetaException()
  3424. self.o2.read(iprot)
  3425. else:
  3426. iprot.skip(ftype)
  3427. else:
  3428. iprot.skip(ftype)
  3429. iprot.readFieldEnd()
  3430. iprot.readStructEnd()
  3431. def write(self, oprot):
  3432. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3433. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3434. return
  3435. oprot.writeStructBegin('get_database_result')
  3436. if self.success != None:
  3437. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  3438. self.success.write(oprot)
  3439. oprot.writeFieldEnd()
  3440. if self.o1 != None:
  3441. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  3442. self.o1.write(oprot)
  3443. oprot.writeFieldEnd()
  3444. if self.o2 != None:
  3445. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  3446. self.o2.write(oprot)
  3447. oprot.writeFieldEnd()
  3448. oprot.writeFieldStop()
  3449. oprot.writeStructEnd()
  3450. def validate(self):
  3451. return
  3452. def __repr__(self):
  3453. L = ['%s=%r' % (key, value)
  3454. for key, value in self.__dict__.iteritems()]
  3455. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3456. def __eq__(self, other):
  3457. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3458. def __ne__(self, other):
  3459. return not (self == other)
  3460. class drop_database_args:
  3461. """
  3462. Attributes:
  3463. - name
  3464. - deleteData
  3465. """
  3466. thrift_spec = (
  3467. None, # 0
  3468. (1, TType.STRING, 'name', None, None, ), # 1
  3469. (2, TType.BOOL, 'deleteData', None, None, ), # 2
  3470. )
  3471. def __init__(self, name=None, deleteData=None,):
  3472. self.name = name
  3473. self.deleteData = deleteData
  3474. def read(self, iprot):
  3475. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3476. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3477. return
  3478. iprot.readStructBegin()
  3479. while True:
  3480. (fname, ftype, fid) = iprot.readFieldBegin()
  3481. if ftype == TType.STOP:
  3482. break
  3483. if fid == 1:
  3484. if ftype == TType.STRING:
  3485. self.name = iprot.readString();
  3486. else:
  3487. iprot.skip(ftype)
  3488. elif fid == 2:
  3489. if ftype == TType.BOOL:
  3490. self.deleteData = iprot.readBool();
  3491. else:
  3492. iprot.skip(ftype)
  3493. else:
  3494. iprot.skip(ftype)
  3495. iprot.readFieldEnd()
  3496. iprot.readStructEnd()
  3497. def write(self, oprot):
  3498. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3499. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3500. return
  3501. oprot.writeStructBegin('drop_database_args')
  3502. if self.name != None:
  3503. oprot.writeFieldBegin('name', TType.STRING, 1)
  3504. oprot.writeString(self.name)
  3505. oprot.writeFieldEnd()
  3506. if self.deleteData != None:
  3507. oprot.writeFieldBegin('deleteData', TType.BOOL, 2)
  3508. oprot.writeBool(self.deleteData)
  3509. oprot.writeFieldEnd()
  3510. oprot.writeFieldStop()
  3511. oprot.writeStructEnd()
  3512. def validate(self):
  3513. return
  3514. def __repr__(self):
  3515. L = ['%s=%r' % (key, value)
  3516. for key, value in self.__dict__.iteritems()]
  3517. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3518. def __eq__(self, other):
  3519. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3520. def __ne__(self, other):
  3521. return not (self == other)
  3522. class drop_database_result:
  3523. """
  3524. Attributes:
  3525. - o1
  3526. - o2
  3527. - o3
  3528. """
  3529. thrift_spec = (
  3530. None, # 0
  3531. (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1
  3532. (2, TType.STRUCT, 'o2', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 2
  3533. (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3
  3534. )
  3535. def __init__(self, o1=None, o2=None, o3=None,):
  3536. self.o1 = o1
  3537. self.o2 = o2
  3538. self.o3 = o3
  3539. def read(self, iprot):
  3540. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3541. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3542. return
  3543. iprot.readStructBegin()
  3544. while True:
  3545. (fname, ftype, fid) = iprot.readFieldBegin()
  3546. if ftype == TType.STOP:
  3547. break
  3548. if fid == 1:
  3549. if ftype == TType.STRUCT:
  3550. self.o1 = NoSuchObjectException()
  3551. self.o1.read(iprot)
  3552. else:
  3553. iprot.skip(ftype)
  3554. elif fid == 2:
  3555. if ftype == TType.STRUCT:
  3556. self.o2 = InvalidOperationException()
  3557. self.o2.read(iprot)
  3558. else:
  3559. iprot.skip(ftype)
  3560. elif fid == 3:
  3561. if ftype == TType.STRUCT:
  3562. self.o3 = MetaException()
  3563. self.o3.read(iprot)
  3564. else:
  3565. iprot.skip(ftype)
  3566. else:
  3567. iprot.skip(ftype)
  3568. iprot.readFieldEnd()
  3569. iprot.readStructEnd()
  3570. def write(self, oprot):
  3571. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3572. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3573. return
  3574. oprot.writeStructBegin('drop_database_result')
  3575. if self.o1 != None:
  3576. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  3577. self.o1.write(oprot)
  3578. oprot.writeFieldEnd()
  3579. if self.o2 != None:
  3580. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  3581. self.o2.write(oprot)
  3582. oprot.writeFieldEnd()
  3583. if self.o3 != None:
  3584. oprot.writeFieldBegin('o3', TType.STRUCT, 3)
  3585. self.o3.write(oprot)
  3586. oprot.writeFieldEnd()
  3587. oprot.writeFieldStop()
  3588. oprot.writeStructEnd()
  3589. def validate(self):
  3590. return
  3591. def __repr__(self):
  3592. L = ['%s=%r' % (key, value)
  3593. for key, value in self.__dict__.iteritems()]
  3594. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3595. def __eq__(self, other):
  3596. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3597. def __ne__(self, other):
  3598. return not (self == other)
  3599. class get_databases_args:
  3600. """
  3601. Attributes:
  3602. - pattern
  3603. """
  3604. thrift_spec = (
  3605. None, # 0
  3606. (1, TType.STRING, 'pattern', None, None, ), # 1
  3607. )
  3608. def __init__(self, pattern=None,):
  3609. self.pattern = pattern
  3610. def read(self, iprot):
  3611. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3612. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3613. return
  3614. iprot.readStructBegin()
  3615. while True:
  3616. (fname, ftype, fid) = iprot.readFieldBegin()
  3617. if ftype == TType.STOP:
  3618. break
  3619. if fid == 1:
  3620. if ftype == TType.STRING:
  3621. self.pattern = iprot.readString();
  3622. else:
  3623. iprot.skip(ftype)
  3624. else:
  3625. iprot.skip(ftype)
  3626. iprot.readFieldEnd()
  3627. iprot.readStructEnd()
  3628. def write(self, oprot):
  3629. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3630. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3631. return
  3632. oprot.writeStructBegin('get_databases_args')
  3633. if self.pattern != None:
  3634. oprot.writeFieldBegin('pattern', TType.STRING, 1)
  3635. oprot.writeString(self.pattern)
  3636. oprot.writeFieldEnd()
  3637. oprot.writeFieldStop()
  3638. oprot.writeStructEnd()
  3639. def validate(self):
  3640. return
  3641. def __repr__(self):
  3642. L = ['%s=%r' % (key, value)
  3643. for key, value in self.__dict__.iteritems()]
  3644. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3645. def __eq__(self, other):
  3646. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3647. def __ne__(self, other):
  3648. return not (self == other)
  3649. class get_databases_result:
  3650. """
  3651. Attributes:
  3652. - success
  3653. - o1
  3654. """
  3655. thrift_spec = (
  3656. (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0
  3657. (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
  3658. )
  3659. def __init__(self, success=None, o1=None,):
  3660. self.success = success
  3661. self.o1 = o1
  3662. def read(self, iprot):
  3663. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3664. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3665. return
  3666. iprot.readStructBegin()
  3667. while True:
  3668. (fname, ftype, fid) = iprot.readFieldBegin()
  3669. if ftype == TType.STOP:
  3670. break
  3671. if fid == 0:
  3672. if ftype == TType.LIST:
  3673. self.success = []
  3674. (_etype177, _size174) = iprot.readListBegin()
  3675. for _i178 in xrange(_size174):
  3676. _elem179 = iprot.readString();
  3677. self.success.append(_elem179)
  3678. iprot.readListEnd()
  3679. else:
  3680. iprot.skip(ftype)
  3681. elif fid == 1:
  3682. if ftype == TType.STRUCT:
  3683. self.o1 = MetaException()
  3684. self.o1.read(iprot)
  3685. else:
  3686. iprot.skip(ftype)
  3687. else:
  3688. iprot.skip(ftype)
  3689. iprot.readFieldEnd()
  3690. iprot.readStructEnd()
  3691. def write(self, oprot):
  3692. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3693. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3694. return
  3695. oprot.writeStructBegin('get_databases_result')
  3696. if self.success != None:
  3697. oprot.writeFieldBegin('success', TType.LIST, 0)
  3698. oprot.writeListBegin(TType.STRING, len(self.success))
  3699. for iter180 in self.success:
  3700. oprot.writeString(iter180)
  3701. oprot.writeListEnd()
  3702. oprot.writeFieldEnd()
  3703. if self.o1 != None:
  3704. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  3705. self.o1.write(oprot)
  3706. oprot.writeFieldEnd()
  3707. oprot.writeFieldStop()
  3708. oprot.writeStructEnd()
  3709. def validate(self):
  3710. return
  3711. def __repr__(self):
  3712. L = ['%s=%r' % (key, value)
  3713. for key, value in self.__dict__.iteritems()]
  3714. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3715. def __eq__(self, other):
  3716. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3717. def __ne__(self, other):
  3718. return not (self == other)
  3719. class get_all_databases_args:
  3720. thrift_spec = (
  3721. )
  3722. def read(self, iprot):
  3723. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3724. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3725. return
  3726. iprot.readStructBegin()
  3727. while True:
  3728. (fname, ftype, fid) = iprot.readFieldBegin()
  3729. if ftype == TType.STOP:
  3730. break
  3731. else:
  3732. iprot.skip(ftype)
  3733. iprot.readFieldEnd()
  3734. iprot.readStructEnd()
  3735. def write(self, oprot):
  3736. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3737. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3738. return
  3739. oprot.writeStructBegin('get_all_databases_args')
  3740. oprot.writeFieldStop()
  3741. oprot.writeStructEnd()
  3742. def validate(self):
  3743. return
  3744. def __repr__(self):
  3745. L = ['%s=%r' % (key, value)
  3746. for key, value in self.__dict__.iteritems()]
  3747. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3748. def __eq__(self, other):
  3749. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3750. def __ne__(self, other):
  3751. return not (self == other)
  3752. class get_all_databases_result:
  3753. """
  3754. Attributes:
  3755. - success
  3756. - o1
  3757. """
  3758. thrift_spec = (
  3759. (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0
  3760. (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
  3761. )
  3762. def __init__(self, success=None, o1=None,):
  3763. self.success = success
  3764. self.o1 = o1
  3765. def read(self, iprot):
  3766. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3767. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3768. return
  3769. iprot.readStructBegin()
  3770. while True:
  3771. (fname, ftype, fid) = iprot.readFieldBegin()
  3772. if ftype == TType.STOP:
  3773. break
  3774. if fid == 0:
  3775. if ftype == TType.LIST:
  3776. self.success = []
  3777. (_etype184, _size181) = iprot.readListBegin()
  3778. for _i185 in xrange(_size181):
  3779. _elem186 = iprot.readString();
  3780. self.success.append(_elem186)
  3781. iprot.readListEnd()
  3782. else:
  3783. iprot.skip(ftype)
  3784. elif fid == 1:
  3785. if ftype == TType.STRUCT:
  3786. self.o1 = MetaException()
  3787. self.o1.read(iprot)
  3788. else:
  3789. iprot.skip(ftype)
  3790. else:
  3791. iprot.skip(ftype)
  3792. iprot.readFieldEnd()
  3793. iprot.readStructEnd()
  3794. def write(self, oprot):
  3795. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3796. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3797. return
  3798. oprot.writeStructBegin('get_all_databases_result')
  3799. if self.success != None:
  3800. oprot.writeFieldBegin('success', TType.LIST, 0)
  3801. oprot.writeListBegin(TType.STRING, len(self.success))
  3802. for iter187 in self.success:
  3803. oprot.writeString(iter187)
  3804. oprot.writeListEnd()
  3805. oprot.writeFieldEnd()
  3806. if self.o1 != None:
  3807. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  3808. self.o1.write(oprot)
  3809. oprot.writeFieldEnd()
  3810. oprot.writeFieldStop()
  3811. oprot.writeStructEnd()
  3812. def validate(self):
  3813. return
  3814. def __repr__(self):
  3815. L = ['%s=%r' % (key, value)
  3816. for key, value in self.__dict__.iteritems()]
  3817. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3818. def __eq__(self, other):
  3819. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3820. def __ne__(self, other):
  3821. return not (self == other)
  3822. class alter_database_args:
  3823. """
  3824. Attributes:
  3825. - dbname
  3826. - db
  3827. """
  3828. thrift_spec = (
  3829. None, # 0
  3830. (1, TType.STRING, 'dbname', None, None, ), # 1
  3831. (2, TType.STRUCT, 'db', (Database, Database.thrift_spec), None, ), # 2
  3832. )
  3833. def __init__(self, dbname=None, db=None,):
  3834. self.dbname = dbname
  3835. self.db = db
  3836. def read(self, iprot):
  3837. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3838. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3839. return
  3840. iprot.readStructBegin()
  3841. while True:
  3842. (fname, ftype, fid) = iprot.readFieldBegin()
  3843. if ftype == TType.STOP:
  3844. break
  3845. if fid == 1:
  3846. if ftype == TType.STRING:
  3847. self.dbname = iprot.readString();
  3848. else:
  3849. iprot.skip(ftype)
  3850. elif fid == 2:
  3851. if ftype == TType.STRUCT:
  3852. self.db = Database()
  3853. self.db.read(iprot)
  3854. else:
  3855. iprot.skip(ftype)
  3856. else:
  3857. iprot.skip(ftype)
  3858. iprot.readFieldEnd()
  3859. iprot.readStructEnd()
  3860. def write(self, oprot):
  3861. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3862. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3863. return
  3864. oprot.writeStructBegin('alter_database_args')
  3865. if self.dbname != None:
  3866. oprot.writeFieldBegin('dbname', TType.STRING, 1)
  3867. oprot.writeString(self.dbname)
  3868. oprot.writeFieldEnd()
  3869. if self.db != None:
  3870. oprot.writeFieldBegin('db', TType.STRUCT, 2)
  3871. self.db.write(oprot)
  3872. oprot.writeFieldEnd()
  3873. oprot.writeFieldStop()
  3874. oprot.writeStructEnd()
  3875. def validate(self):
  3876. return
  3877. def __repr__(self):
  3878. L = ['%s=%r' % (key, value)
  3879. for key, value in self.__dict__.iteritems()]
  3880. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3881. def __eq__(self, other):
  3882. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3883. def __ne__(self, other):
  3884. return not (self == other)
  3885. class alter_database_result:
  3886. """
  3887. Attributes:
  3888. - o1
  3889. - o2
  3890. """
  3891. thrift_spec = (
  3892. None, # 0
  3893. (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
  3894. (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2
  3895. )
  3896. def __init__(self, o1=None, o2=None,):
  3897. self.o1 = o1
  3898. self.o2 = o2
  3899. def read(self, iprot):
  3900. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3901. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3902. return
  3903. iprot.readStructBegin()
  3904. while True:
  3905. (fname, ftype, fid) = iprot.readFieldBegin()
  3906. if ftype == TType.STOP:
  3907. break
  3908. if fid == 1:
  3909. if ftype == TType.STRUCT:
  3910. self.o1 = MetaException()
  3911. self.o1.read(iprot)
  3912. else:
  3913. iprot.skip(ftype)
  3914. elif fid == 2:
  3915. if ftype == TType.STRUCT:
  3916. self.o2 = NoSuchObjectException()
  3917. self.o2.read(iprot)
  3918. else:
  3919. iprot.skip(ftype)
  3920. else:
  3921. iprot.skip(ftype)
  3922. iprot.readFieldEnd()
  3923. iprot.readStructEnd()
  3924. def write(self, oprot):
  3925. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3926. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3927. return
  3928. oprot.writeStructBegin('alter_database_result')
  3929. if self.o1 != None:
  3930. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  3931. self.o1.write(oprot)
  3932. oprot.writeFieldEnd()
  3933. if self.o2 != None:
  3934. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  3935. self.o2.write(oprot)
  3936. oprot.writeFieldEnd()
  3937. oprot.writeFieldStop()
  3938. oprot.writeStructEnd()
  3939. def validate(self):
  3940. return
  3941. def __repr__(self):
  3942. L = ['%s=%r' % (key, value)
  3943. for key, value in self.__dict__.iteritems()]
  3944. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3945. def __eq__(self, other):
  3946. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3947. def __ne__(self, other):
  3948. return not (self == other)
  3949. class get_type_args:
  3950. """
  3951. Attributes:
  3952. - name
  3953. """
  3954. thrift_spec = (
  3955. None, # 0
  3956. (1, TType.STRING, 'name', None, None, ), # 1
  3957. )
  3958. def __init__(self, name=None,):
  3959. self.name = name
  3960. def read(self, iprot):
  3961. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  3962. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  3963. return
  3964. iprot.readStructBegin()
  3965. while True:
  3966. (fname, ftype, fid) = iprot.readFieldBegin()
  3967. if ftype == TType.STOP:
  3968. break
  3969. if fid == 1:
  3970. if ftype == TType.STRING:
  3971. self.name = iprot.readString();
  3972. else:
  3973. iprot.skip(ftype)
  3974. else:
  3975. iprot.skip(ftype)
  3976. iprot.readFieldEnd()
  3977. iprot.readStructEnd()
  3978. def write(self, oprot):
  3979. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  3980. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  3981. return
  3982. oprot.writeStructBegin('get_type_args')
  3983. if self.name != None:
  3984. oprot.writeFieldBegin('name', TType.STRING, 1)
  3985. oprot.writeString(self.name)
  3986. oprot.writeFieldEnd()
  3987. oprot.writeFieldStop()
  3988. oprot.writeStructEnd()
  3989. def validate(self):
  3990. return
  3991. def __repr__(self):
  3992. L = ['%s=%r' % (key, value)
  3993. for key, value in self.__dict__.iteritems()]
  3994. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  3995. def __eq__(self, other):
  3996. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  3997. def __ne__(self, other):
  3998. return not (self == other)
  3999. class get_type_result:
  4000. """
  4001. Attributes:
  4002. - success
  4003. - o1
  4004. - o2
  4005. """
  4006. thrift_spec = (
  4007. (0, TType.STRUCT, 'success', (Type, Type.thrift_spec), None, ), # 0
  4008. (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
  4009. (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2
  4010. )
  4011. def __init__(self, success=None, o1=None, o2=None,):
  4012. self.success = success
  4013. self.o1 = o1
  4014. self.o2 = o2
  4015. def read(self, iprot):
  4016. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  4017. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  4018. return
  4019. iprot.readStructBegin()
  4020. while True:
  4021. (fname, ftype, fid) = iprot.readFieldBegin()
  4022. if ftype == TType.STOP:
  4023. break
  4024. if fid == 0:
  4025. if ftype == TType.STRUCT:
  4026. self.success = Type()
  4027. self.success.read(iprot)
  4028. else:
  4029. iprot.skip(ftype)
  4030. elif fid == 1:
  4031. if ftype == TType.STRUCT:
  4032. self.o1 = MetaException()
  4033. self.o1.read(iprot)
  4034. else:
  4035. iprot.skip(ftype)
  4036. elif fid == 2:
  4037. if ftype == TType.STRUCT:
  4038. self.o2 = NoSuchObjectException()
  4039. self.o2.read(iprot)
  4040. else:
  4041. iprot.skip(ftype)
  4042. else:
  4043. iprot.skip(ftype)
  4044. iprot.readFieldEnd()
  4045. iprot.readStructEnd()
  4046. def write(self, oprot):
  4047. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  4048. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  4049. return
  4050. oprot.writeStructBegin('get_type_result')
  4051. if self.success != None:
  4052. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  4053. self.success.write(oprot)
  4054. oprot.writeFieldEnd()
  4055. if self.o1 != None:
  4056. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  4057. self.o1.write(oprot)
  4058. oprot.writeFieldEnd()
  4059. if self.o2 != None:
  4060. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  4061. self.o2.write(oprot)
  4062. oprot.writeFieldEnd()
  4063. oprot.writeFieldStop()
  4064. oprot.writeStructEnd()
  4065. def validate(self):
  4066. return
  4067. def __repr__(self):
  4068. L = ['%s=%r' % (key, value)
  4069. for key, value in self.__dict__.iteritems()]
  4070. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  4071. def __eq__(self, other):
  4072. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  4073. def __ne__(self, other):
  4074. return not (self == other)
  4075. class create_type_args:
  4076. """
  4077. Attributes:
  4078. - type
  4079. """
  4080. thrift_spec = (
  4081. None, # 0
  4082. (1, TType.STRUCT, 'type', (Type, Type.thrift_spec), None, ), # 1
  4083. )
  4084. def __init__(self, type=None,):
  4085. self.type = type
  4086. def read(self, iprot):
  4087. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  4088. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  4089. return
  4090. iprot.readStructBegin()
  4091. while True:
  4092. (fname, ftype, fid) = iprot.readFieldBegin()
  4093. if ftype == TType.STOP:
  4094. break
  4095. if fid == 1:
  4096. if ftype == TType.STRUCT:
  4097. self.type = Type()
  4098. self.type.read(iprot)
  4099. else:
  4100. iprot.skip(ftype)
  4101. else:
  4102. iprot.skip(ftype)
  4103. iprot.readFieldEnd()
  4104. iprot.readStructEnd()
  4105. def write(self, oprot):
  4106. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  4107. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  4108. return
  4109. oprot.writeStructBegin('create_type_args')
  4110. if self.type != None:
  4111. oprot.writeFieldBegin('type', TType.STRUCT, 1)
  4112. self.type.write(oprot)
  4113. oprot.writeFieldEnd()
  4114. oprot.writeFieldStop()
  4115. oprot.writeStructEnd()
  4116. def validate(self):
  4117. return
  4118. def __repr__(self):
  4119. L = ['%s=%r' % (key, value)
  4120. for key, value in self.__dict__.iteritems()]
  4121. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  4122. def __eq__(self, other):
  4123. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  4124. def __ne__(self, other):
  4125. return not (self == other)
  4126. class create_type_result:
  4127. """
  4128. Attributes:
  4129. - success
  4130. - o1
  4131. - o2
  4132. - o3
  4133. """
  4134. thrift_spec = (
  4135. (0, TType.BOOL, 'success', None, None, ), # 0
  4136. (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1
  4137. (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2
  4138. (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3
  4139. )
  4140. def __init__(self, success=None, o1=None, o2=None, o3=None,):
  4141. self.success = success
  4142. self.o1 = o1
  4143. self.o2 = o2
  4144. self.o3 = o3
  4145. def read(self, iprot):
  4146. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  4147. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  4148. return
  4149. iprot.readStructBegin()
  4150. while True:
  4151. (fname, ftype, fid) = iprot.readFieldBegin()
  4152. if ftype == TType.STOP:
  4153. break
  4154. if fid == 0:
  4155. if ftype == TType.BOOL:
  4156. self.success = iprot.readBool();
  4157. else:
  4158. iprot.skip(ftype)
  4159. elif fid == 1:
  4160. if ftype == TType.STRUCT:
  4161. self.o1 = AlreadyExistsException()
  4162. self.o1.read(iprot)
  4163. else:
  4164. iprot.skip(ftype)
  4165. elif fid == 2:
  4166. if ftype == TType.STRUCT:
  4167. self.o2 = InvalidObjectException()
  4168. self.o2.read(iprot)
  4169. else:
  4170. iprot.skip(ftype)
  4171. elif fid == 3:
  4172. if ftype == TType.STRUCT:
  4173. self.o3 = MetaException()
  4174. self.o3.read(iprot)
  4175. else:
  4176. iprot.skip(ftype)
  4177. else:
  4178. iprot.skip(ftype)
  4179. iprot.readFieldEnd()
  4180. iprot.readStructEnd()
  4181. def write(self, oprot):
  4182. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  4183. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  4184. return
  4185. oprot.writeStructBegin('create_type_result')
  4186. if self.success != None:
  4187. oprot.writeFieldBegin('success', TType.BOOL, 0)
  4188. oprot.writeBool(self.success)
  4189. oprot.writeFieldEnd()
  4190. if self.o1 != None:
  4191. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  4192. self.o1.write(oprot)
  4193. oprot.writeFieldEnd()
  4194. if self.o2 != None:
  4195. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  4196. self.o2.write(oprot)
  4197. oprot.writeFieldEnd()
  4198. if self.o3 != None:
  4199. oprot.writeFieldBegin('o3', TType.STRUCT, 3)
  4200. self.o3.write(oprot)
  4201. oprot.writeFieldEnd()
  4202. oprot.writeFieldStop()
  4203. oprot.writeStructEnd()
  4204. def validate(self):
  4205. return
  4206. def __repr__(self):
  4207. L = ['%s=%r' % (key, value)
  4208. for key, value in self.__dict__.iteritems()]
  4209. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  4210. def __eq__(self, other):
  4211. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  4212. def __ne__(self, other):
  4213. return not (self == other)
  4214. class drop_type_args:
  4215. """
  4216. Attributes:
  4217. - type
  4218. """
  4219. thrift_spec = (
  4220. None, # 0
  4221. (1, TType.STRING, 'type', None, None, ), # 1
  4222. )
  4223. def __init__(self, type=None,):
  4224. self.type = type
  4225. def read(self, iprot):
  4226. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  4227. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  4228. return
  4229. iprot.readStructBegin()
  4230. while True:
  4231. (fname, ftype, fid) = iprot.readFieldBegin()
  4232. if ftype == TType.STOP:
  4233. break
  4234. if fid == 1:
  4235. if ftype == TType.STRING:
  4236. self.type = iprot.readString();
  4237. else:
  4238. iprot.skip(ftype)
  4239. else:
  4240. iprot.skip(ftype)
  4241. iprot.readFieldEnd()
  4242. iprot.readStructEnd()
  4243. def write(self, oprot):
  4244. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  4245. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  4246. return
  4247. oprot.writeStructBegin('drop_type_args')
  4248. if self.type != None:
  4249. oprot.writeFieldBegin('type', TType.STRING, 1)
  4250. oprot.writeString(self.type)
  4251. oprot.writeFieldEnd()
  4252. oprot.writeFieldStop()
  4253. oprot.writeStructEnd()
  4254. def validate(self):
  4255. return
  4256. def __repr__(self):
  4257. L = ['%s=%r' % (key, value)
  4258. for key, value in self.__dict__.iteritems()]
  4259. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  4260. def __eq__(self, other):
  4261. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  4262. def __ne__(self, other):
  4263. return not (self == other)
  4264. class drop_type_result:
  4265. """
  4266. Attributes:
  4267. - success
  4268. - o1
  4269. - o2
  4270. """
  4271. thrift_spec = (
  4272. (0, TType.BOOL, 'success', None, None, ), # 0
  4273. (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
  4274. (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2
  4275. )
  4276. def __init__(self, success=None, o1=None, o2=None,):
  4277. self.success = success
  4278. self.o1 = o1
  4279. self.o2 = o2
  4280. def read(self, iprot):
  4281. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  4282. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  4283. return
  4284. iprot.readStructBegin()
  4285. while True:
  4286. (fname, ftype, fid) = iprot.readFieldBegin()
  4287. if ftype == TType.STOP:
  4288. break
  4289. if fid == 0:
  4290. if ftype == TType.BOOL:
  4291. self.success = iprot.readBool();
  4292. else:
  4293. iprot.skip(ftype)
  4294. elif fid == 1:
  4295. if ftype == TType.STRUCT:
  4296. self.o1 = MetaException()
  4297. self.o1.read(iprot)
  4298. else:
  4299. iprot.skip(ftype)
  4300. elif fid == 2:
  4301. if ftype == TType.STRUCT:
  4302. self.o2 = NoSuchObjectException()
  4303. self.o2.read(iprot)
  4304. else:
  4305. iprot.skip(ftype)
  4306. else:
  4307. iprot.skip(ftype)
  4308. iprot.readFieldEnd()
  4309. iprot.readStructEnd()
  4310. def write(self, oprot):
  4311. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  4312. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  4313. return
  4314. oprot.writeStructBegin('drop_type_result')
  4315. if self.success != None:
  4316. oprot.writeFieldBegin('success', TType.BOOL, 0)
  4317. oprot.writeBool(self.success)
  4318. oprot.writeFieldEnd()
  4319. if self.o1 != None:
  4320. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  4321. self.o1.write(oprot)
  4322. oprot.writeFieldEnd()
  4323. if self.o2 != None:
  4324. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  4325. self.o2.write(oprot)
  4326. oprot.writeFieldEnd()
  4327. oprot.writeFieldStop()
  4328. oprot.writeStructEnd()
  4329. def validate(self):
  4330. return
  4331. def __repr__(self):
  4332. L = ['%s=%r' % (key, value)
  4333. for key, value in self.__dict__.iteritems()]
  4334. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  4335. def __eq__(self, other):
  4336. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  4337. def __ne__(self, other):
  4338. return not (self == other)
  4339. class get_type_all_args:
  4340. """
  4341. Attributes:
  4342. - name
  4343. """
  4344. thrift_spec = (
  4345. None, # 0
  4346. (1, TType.STRING, 'name', None, None, ), # 1
  4347. )
  4348. def __init__(self, name=None,):
  4349. self.name = name
  4350. def read(self, iprot):
  4351. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  4352. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  4353. return
  4354. iprot.readStructBegin()
  4355. while True:
  4356. (fname, ftype, fid) = iprot.readFieldBegin()
  4357. if ftype == TType.STOP:
  4358. break
  4359. if fid == 1:
  4360. if ftype == TType.STRING:
  4361. self.name = iprot.readString();
  4362. else:
  4363. iprot.skip(ftype)
  4364. else:
  4365. iprot.skip(ftype)
  4366. iprot.readFieldEnd()
  4367. iprot.readStructEnd()
  4368. def write(self, oprot):
  4369. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  4370. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  4371. return
  4372. oprot.writeStructBegin('get_type_all_args')
  4373. if self.name != None:
  4374. oprot.writeFieldBegin('name', TType.STRING, 1)
  4375. oprot.writeString(self.name)
  4376. oprot.writeFieldEnd()
  4377. oprot.writeFieldStop()
  4378. oprot.writeStructEnd()
  4379. def validate(self):
  4380. return
  4381. def __repr__(self):
  4382. L = ['%s=%r' % (key, value)
  4383. for key, value in self.__dict__.iteritems()]
  4384. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  4385. def __eq__(self, other):
  4386. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  4387. def __ne__(self, other):
  4388. return not (self == other)
  4389. class get_type_all_result:
  4390. """
  4391. Attributes:
  4392. - success
  4393. - o2
  4394. """
  4395. thrift_spec = (
  4396. (0, TType.MAP, 'success', (TType.STRING,None,TType.STRUCT,(Type, Type.thrift_spec)), None, ), # 0
  4397. (1, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 1
  4398. )
  4399. def __init__(self, success=None, o2=None,):
  4400. self.success = success
  4401. self.o2 = o2
  4402. def read(self, iprot):
  4403. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  4404. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  4405. return
  4406. iprot.readStructBegin()
  4407. while True:
  4408. (fname, ftype, fid) = iprot.readFieldBegin()
  4409. if ftype == TType.STOP:
  4410. break
  4411. if fid == 0:
  4412. if ftype == TType.MAP:
  4413. self.success = {}
  4414. (_ktype189, _vtype190, _size188 ) = iprot.readMapBegin()
  4415. for _i192 in xrange(_size188):
  4416. _key193 = iprot.readString();
  4417. _val194 = Type()
  4418. _val194.read(iprot)
  4419. self.success[_key193] = _val194
  4420. iprot.readMapEnd()
  4421. else:
  4422. iprot.skip(ftype)
  4423. elif fid == 1:
  4424. if ftype == TType.STRUCT:
  4425. self.o2 = MetaException()
  4426. self.o2.read(iprot)
  4427. else:
  4428. iprot.skip(ftype)
  4429. else:
  4430. iprot.skip(ftype)
  4431. iprot.readFieldEnd()
  4432. iprot.readStructEnd()
  4433. def write(self, oprot):
  4434. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  4435. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  4436. return
  4437. oprot.writeStructBegin('get_type_all_result')
  4438. if self.success != None:
  4439. oprot.writeFieldBegin('success', TType.MAP, 0)
  4440. oprot.writeMapBegin(TType.STRING, TType.STRUCT, len(self.success))
  4441. for kiter195,viter196 in self.success.items():
  4442. oprot.writeString(kiter195)
  4443. viter196.write(oprot)
  4444. oprot.writeMapEnd()
  4445. oprot.writeFieldEnd()
  4446. if self.o2 != None:
  4447. oprot.writeFieldBegin('o2', TType.STRUCT, 1)
  4448. self.o2.write(oprot)
  4449. oprot.writeFieldEnd()
  4450. oprot.writeFieldStop()
  4451. oprot.writeStructEnd()
  4452. def validate(self):
  4453. return
  4454. def __repr__(self):
  4455. L = ['%s=%r' % (key, value)
  4456. for key, value in self.__dict__.iteritems()]
  4457. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  4458. def __eq__(self, other):
  4459. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  4460. def __ne__(self, other):
  4461. return not (self == other)
  4462. class get_fields_args:
  4463. """
  4464. Attributes:
  4465. - db_name
  4466. - table_name
  4467. """
  4468. thrift_spec = (
  4469. None, # 0
  4470. (1, TType.STRING, 'db_name', None, None, ), # 1
  4471. (2, TType.STRING, 'table_name', None, None, ), # 2
  4472. )
  4473. def __init__(self, db_name=None, table_name=None,):
  4474. self.db_name = db_name
  4475. self.table_name = table_name
  4476. def read(self, iprot):
  4477. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  4478. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  4479. return
  4480. iprot.readStructBegin()
  4481. while True:
  4482. (fname, ftype, fid) = iprot.readFieldBegin()
  4483. if ftype == TType.STOP:
  4484. break
  4485. if fid == 1:
  4486. if ftype == TType.STRING:
  4487. self.db_name = iprot.readString();
  4488. else:
  4489. iprot.skip(ftype)
  4490. elif fid == 2:
  4491. if ftype == TType.STRING:
  4492. self.table_name = iprot.readString();
  4493. else:
  4494. iprot.skip(ftype)
  4495. else:
  4496. iprot.skip(ftype)
  4497. iprot.readFieldEnd()
  4498. iprot.readStructEnd()
  4499. def write(self, oprot):
  4500. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  4501. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  4502. return
  4503. oprot.writeStructBegin('get_fields_args')
  4504. if self.db_name != None:
  4505. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  4506. oprot.writeString(self.db_name)
  4507. oprot.writeFieldEnd()
  4508. if self.table_name != None:
  4509. oprot.writeFieldBegin('table_name', TType.STRING, 2)
  4510. oprot.writeString(self.table_name)
  4511. oprot.writeFieldEnd()
  4512. oprot.writeFieldStop()
  4513. oprot.writeStructEnd()
  4514. def validate(self):
  4515. return
  4516. def __repr__(self):
  4517. L = ['%s=%r' % (key, value)
  4518. for key, value in self.__dict__.iteritems()]
  4519. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  4520. def __eq__(self, other):
  4521. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  4522. def __ne__(self, other):
  4523. return not (self == other)
  4524. class get_fields_result:
  4525. """
  4526. Attributes:
  4527. - success
  4528. - o1
  4529. - o2
  4530. - o3
  4531. """
  4532. thrift_spec = (
  4533. (0, TType.LIST, 'success', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 0
  4534. (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
  4535. (2, TType.STRUCT, 'o2', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 2
  4536. (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3
  4537. )
  4538. def __init__(self, success=None, o1=None, o2=None, o3=None,):
  4539. self.success = success
  4540. self.o1 = o1
  4541. self.o2 = o2
  4542. self.o3 = o3
  4543. def read(self, iprot):
  4544. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  4545. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  4546. return
  4547. iprot.readStructBegin()
  4548. while True:
  4549. (fname, ftype, fid) = iprot.readFieldBegin()
  4550. if ftype == TType.STOP:
  4551. break
  4552. if fid == 0:
  4553. if ftype == TType.LIST:
  4554. self.success = []
  4555. (_etype200, _size197) = iprot.readListBegin()
  4556. for _i201 in xrange(_size197):
  4557. _elem202 = FieldSchema()
  4558. _elem202.read(iprot)
  4559. self.success.append(_elem202)
  4560. iprot.readListEnd()
  4561. else:
  4562. iprot.skip(ftype)
  4563. elif fid == 1:
  4564. if ftype == TType.STRUCT:
  4565. self.o1 = MetaException()
  4566. self.o1.read(iprot)
  4567. else:
  4568. iprot.skip(ftype)
  4569. elif fid == 2:
  4570. if ftype == TType.STRUCT:
  4571. self.o2 = UnknownTableException()
  4572. self.o2.read(iprot)
  4573. else:
  4574. iprot.skip(ftype)
  4575. elif fid == 3:
  4576. if ftype == TType.STRUCT:
  4577. self.o3 = UnknownDBException()
  4578. self.o3.read(iprot)
  4579. else:
  4580. iprot.skip(ftype)
  4581. else:
  4582. iprot.skip(ftype)
  4583. iprot.readFieldEnd()
  4584. iprot.readStructEnd()
  4585. def write(self, oprot):
  4586. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  4587. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  4588. return
  4589. oprot.writeStructBegin('get_fields_result')
  4590. if self.success != None:
  4591. oprot.writeFieldBegin('success', TType.LIST, 0)
  4592. oprot.writeListBegin(TType.STRUCT, len(self.success))
  4593. for iter203 in self.success:
  4594. iter203.write(oprot)
  4595. oprot.writeListEnd()
  4596. oprot.writeFieldEnd()
  4597. if self.o1 != None:
  4598. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  4599. self.o1.write(oprot)
  4600. oprot.writeFieldEnd()
  4601. if self.o2 != None:
  4602. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  4603. self.o2.write(oprot)
  4604. oprot.writeFieldEnd()
  4605. if self.o3 != None:
  4606. oprot.writeFieldBegin('o3', TType.STRUCT, 3)
  4607. self.o3.write(oprot)
  4608. oprot.writeFieldEnd()
  4609. oprot.writeFieldStop()
  4610. oprot.writeStructEnd()
  4611. def validate(self):
  4612. return
  4613. def __repr__(self):
  4614. L = ['%s=%r' % (key, value)
  4615. for key, value in self.__dict__.iteritems()]
  4616. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  4617. def __eq__(self, other):
  4618. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  4619. def __ne__(self, other):
  4620. return not (self == other)
  4621. class get_schema_args:
  4622. """
  4623. Attributes:
  4624. - db_name
  4625. - table_name
  4626. """
  4627. thrift_spec = (
  4628. None, # 0
  4629. (1, TType.STRING, 'db_name', None, None, ), # 1
  4630. (2, TType.STRING, 'table_name', None, None, ), # 2
  4631. )
  4632. def __init__(self, db_name=None, table_name=None,):
  4633. self.db_name = db_name
  4634. self.table_name = table_name
  4635. def read(self, iprot):
  4636. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  4637. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  4638. return
  4639. iprot.readStructBegin()
  4640. while True:
  4641. (fname, ftype, fid) = iprot.readFieldBegin()
  4642. if ftype == TType.STOP:
  4643. break
  4644. if fid == 1:
  4645. if ftype == TType.STRING:
  4646. self.db_name = iprot.readString();
  4647. else:
  4648. iprot.skip(ftype)
  4649. elif fid == 2:
  4650. if ftype == TType.STRING:
  4651. self.table_name = iprot.readString();
  4652. else:
  4653. iprot.skip(ftype)
  4654. else:
  4655. iprot.skip(ftype)
  4656. iprot.readFieldEnd()
  4657. iprot.readStructEnd()
  4658. def write(self, oprot):
  4659. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  4660. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  4661. return
  4662. oprot.writeStructBegin('get_schema_args')
  4663. if self.db_name != None:
  4664. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  4665. oprot.writeString(self.db_name)
  4666. oprot.writeFieldEnd()
  4667. if self.table_name != None:
  4668. oprot.writeFieldBegin('table_name', TType.STRING, 2)
  4669. oprot.writeString(self.table_name)
  4670. oprot.writeFieldEnd()
  4671. oprot.writeFieldStop()
  4672. oprot.writeStructEnd()
  4673. def validate(self):
  4674. return
  4675. def __repr__(self):
  4676. L = ['%s=%r' % (key, value)
  4677. for key, value in self.__dict__.iteritems()]
  4678. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  4679. def __eq__(self, other):
  4680. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  4681. def __ne__(self, other):
  4682. return not (self == other)
  4683. class get_schema_result:
  4684. """
  4685. Attributes:
  4686. - success
  4687. - o1
  4688. - o2
  4689. - o3
  4690. """
  4691. thrift_spec = (
  4692. (0, TType.LIST, 'success', (TType.STRUCT,(FieldSchema, FieldSchema.thrift_spec)), None, ), # 0
  4693. (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
  4694. (2, TType.STRUCT, 'o2', (UnknownTableException, UnknownTableException.thrift_spec), None, ), # 2
  4695. (3, TType.STRUCT, 'o3', (UnknownDBException, UnknownDBException.thrift_spec), None, ), # 3
  4696. )
  4697. def __init__(self, success=None, o1=None, o2=None, o3=None,):
  4698. self.success = success
  4699. self.o1 = o1
  4700. self.o2 = o2
  4701. self.o3 = o3
  4702. def read(self, iprot):
  4703. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  4704. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  4705. return
  4706. iprot.readStructBegin()
  4707. while True:
  4708. (fname, ftype, fid) = iprot.readFieldBegin()
  4709. if ftype == TType.STOP:
  4710. break
  4711. if fid == 0:
  4712. if ftype == TType.LIST:
  4713. self.success = []
  4714. (_etype207, _size204) = iprot.readListBegin()
  4715. for _i208 in xrange(_size204):
  4716. _elem209 = FieldSchema()
  4717. _elem209.read(iprot)
  4718. self.success.append(_elem209)
  4719. iprot.readListEnd()
  4720. else:
  4721. iprot.skip(ftype)
  4722. elif fid == 1:
  4723. if ftype == TType.STRUCT:
  4724. self.o1 = MetaException()
  4725. self.o1.read(iprot)
  4726. else:
  4727. iprot.skip(ftype)
  4728. elif fid == 2:
  4729. if ftype == TType.STRUCT:
  4730. self.o2 = UnknownTableException()
  4731. self.o2.read(iprot)
  4732. else:
  4733. iprot.skip(ftype)
  4734. elif fid == 3:
  4735. if ftype == TType.STRUCT:
  4736. self.o3 = UnknownDBException()
  4737. self.o3.read(iprot)
  4738. else:
  4739. iprot.skip(ftype)
  4740. else:
  4741. iprot.skip(ftype)
  4742. iprot.readFieldEnd()
  4743. iprot.readStructEnd()
  4744. def write(self, oprot):
  4745. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  4746. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  4747. return
  4748. oprot.writeStructBegin('get_schema_result')
  4749. if self.success != None:
  4750. oprot.writeFieldBegin('success', TType.LIST, 0)
  4751. oprot.writeListBegin(TType.STRUCT, len(self.success))
  4752. for iter210 in self.success:
  4753. iter210.write(oprot)
  4754. oprot.writeListEnd()
  4755. oprot.writeFieldEnd()
  4756. if self.o1 != None:
  4757. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  4758. self.o1.write(oprot)
  4759. oprot.writeFieldEnd()
  4760. if self.o2 != None:
  4761. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  4762. self.o2.write(oprot)
  4763. oprot.writeFieldEnd()
  4764. if self.o3 != None:
  4765. oprot.writeFieldBegin('o3', TType.STRUCT, 3)
  4766. self.o3.write(oprot)
  4767. oprot.writeFieldEnd()
  4768. oprot.writeFieldStop()
  4769. oprot.writeStructEnd()
  4770. def validate(self):
  4771. return
  4772. def __repr__(self):
  4773. L = ['%s=%r' % (key, value)
  4774. for key, value in self.__dict__.iteritems()]
  4775. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  4776. def __eq__(self, other):
  4777. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  4778. def __ne__(self, other):
  4779. return not (self == other)
  4780. class create_table_args:
  4781. """
  4782. Attributes:
  4783. - tbl
  4784. """
  4785. thrift_spec = (
  4786. None, # 0
  4787. (1, TType.STRUCT, 'tbl', (Table, Table.thrift_spec), None, ), # 1
  4788. )
  4789. def __init__(self, tbl=None,):
  4790. self.tbl = tbl
  4791. def read(self, iprot):
  4792. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  4793. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  4794. return
  4795. iprot.readStructBegin()
  4796. while True:
  4797. (fname, ftype, fid) = iprot.readFieldBegin()
  4798. if ftype == TType.STOP:
  4799. break
  4800. if fid == 1:
  4801. if ftype == TType.STRUCT:
  4802. self.tbl = Table()
  4803. self.tbl.read(iprot)
  4804. else:
  4805. iprot.skip(ftype)
  4806. else:
  4807. iprot.skip(ftype)
  4808. iprot.readFieldEnd()
  4809. iprot.readStructEnd()
  4810. def write(self, oprot):
  4811. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  4812. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  4813. return
  4814. oprot.writeStructBegin('create_table_args')
  4815. if self.tbl != None:
  4816. oprot.writeFieldBegin('tbl', TType.STRUCT, 1)
  4817. self.tbl.write(oprot)
  4818. oprot.writeFieldEnd()
  4819. oprot.writeFieldStop()
  4820. oprot.writeStructEnd()
  4821. def validate(self):
  4822. return
  4823. def __repr__(self):
  4824. L = ['%s=%r' % (key, value)
  4825. for key, value in self.__dict__.iteritems()]
  4826. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  4827. def __eq__(self, other):
  4828. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  4829. def __ne__(self, other):
  4830. return not (self == other)
  4831. class create_table_result:
  4832. """
  4833. Attributes:
  4834. - o1
  4835. - o2
  4836. - o3
  4837. - o4
  4838. """
  4839. thrift_spec = (
  4840. None, # 0
  4841. (1, TType.STRUCT, 'o1', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 1
  4842. (2, TType.STRUCT, 'o2', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 2
  4843. (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3
  4844. (4, TType.STRUCT, 'o4', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 4
  4845. )
  4846. def __init__(self, o1=None, o2=None, o3=None, o4=None,):
  4847. self.o1 = o1
  4848. self.o2 = o2
  4849. self.o3 = o3
  4850. self.o4 = o4
  4851. def read(self, iprot):
  4852. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  4853. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  4854. return
  4855. iprot.readStructBegin()
  4856. while True:
  4857. (fname, ftype, fid) = iprot.readFieldBegin()
  4858. if ftype == TType.STOP:
  4859. break
  4860. if fid == 1:
  4861. if ftype == TType.STRUCT:
  4862. self.o1 = AlreadyExistsException()
  4863. self.o1.read(iprot)
  4864. else:
  4865. iprot.skip(ftype)
  4866. elif fid == 2:
  4867. if ftype == TType.STRUCT:
  4868. self.o2 = InvalidObjectException()
  4869. self.o2.read(iprot)
  4870. else:
  4871. iprot.skip(ftype)
  4872. elif fid == 3:
  4873. if ftype == TType.STRUCT:
  4874. self.o3 = MetaException()
  4875. self.o3.read(iprot)
  4876. else:
  4877. iprot.skip(ftype)
  4878. elif fid == 4:
  4879. if ftype == TType.STRUCT:
  4880. self.o4 = NoSuchObjectException()
  4881. self.o4.read(iprot)
  4882. else:
  4883. iprot.skip(ftype)
  4884. else:
  4885. iprot.skip(ftype)
  4886. iprot.readFieldEnd()
  4887. iprot.readStructEnd()
  4888. def write(self, oprot):
  4889. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  4890. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  4891. return
  4892. oprot.writeStructBegin('create_table_result')
  4893. if self.o1 != None:
  4894. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  4895. self.o1.write(oprot)
  4896. oprot.writeFieldEnd()
  4897. if self.o2 != None:
  4898. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  4899. self.o2.write(oprot)
  4900. oprot.writeFieldEnd()
  4901. if self.o3 != None:
  4902. oprot.writeFieldBegin('o3', TType.STRUCT, 3)
  4903. self.o3.write(oprot)
  4904. oprot.writeFieldEnd()
  4905. if self.o4 != None:
  4906. oprot.writeFieldBegin('o4', TType.STRUCT, 4)
  4907. self.o4.write(oprot)
  4908. oprot.writeFieldEnd()
  4909. oprot.writeFieldStop()
  4910. oprot.writeStructEnd()
  4911. def validate(self):
  4912. return
  4913. def __repr__(self):
  4914. L = ['%s=%r' % (key, value)
  4915. for key, value in self.__dict__.iteritems()]
  4916. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  4917. def __eq__(self, other):
  4918. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  4919. def __ne__(self, other):
  4920. return not (self == other)
  4921. class drop_table_args:
  4922. """
  4923. Attributes:
  4924. - dbname
  4925. - name
  4926. - deleteData
  4927. """
  4928. thrift_spec = (
  4929. None, # 0
  4930. (1, TType.STRING, 'dbname', None, None, ), # 1
  4931. (2, TType.STRING, 'name', None, None, ), # 2
  4932. (3, TType.BOOL, 'deleteData', None, None, ), # 3
  4933. )
  4934. def __init__(self, dbname=None, name=None, deleteData=None,):
  4935. self.dbname = dbname
  4936. self.name = name
  4937. self.deleteData = deleteData
  4938. def read(self, iprot):
  4939. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  4940. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  4941. return
  4942. iprot.readStructBegin()
  4943. while True:
  4944. (fname, ftype, fid) = iprot.readFieldBegin()
  4945. if ftype == TType.STOP:
  4946. break
  4947. if fid == 1:
  4948. if ftype == TType.STRING:
  4949. self.dbname = iprot.readString();
  4950. else:
  4951. iprot.skip(ftype)
  4952. elif fid == 2:
  4953. if ftype == TType.STRING:
  4954. self.name = iprot.readString();
  4955. else:
  4956. iprot.skip(ftype)
  4957. elif fid == 3:
  4958. if ftype == TType.BOOL:
  4959. self.deleteData = iprot.readBool();
  4960. else:
  4961. iprot.skip(ftype)
  4962. else:
  4963. iprot.skip(ftype)
  4964. iprot.readFieldEnd()
  4965. iprot.readStructEnd()
  4966. def write(self, oprot):
  4967. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  4968. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  4969. return
  4970. oprot.writeStructBegin('drop_table_args')
  4971. if self.dbname != None:
  4972. oprot.writeFieldBegin('dbname', TType.STRING, 1)
  4973. oprot.writeString(self.dbname)
  4974. oprot.writeFieldEnd()
  4975. if self.name != None:
  4976. oprot.writeFieldBegin('name', TType.STRING, 2)
  4977. oprot.writeString(self.name)
  4978. oprot.writeFieldEnd()
  4979. if self.deleteData != None:
  4980. oprot.writeFieldBegin('deleteData', TType.BOOL, 3)
  4981. oprot.writeBool(self.deleteData)
  4982. oprot.writeFieldEnd()
  4983. oprot.writeFieldStop()
  4984. oprot.writeStructEnd()
  4985. def validate(self):
  4986. return
  4987. def __repr__(self):
  4988. L = ['%s=%r' % (key, value)
  4989. for key, value in self.__dict__.iteritems()]
  4990. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  4991. def __eq__(self, other):
  4992. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  4993. def __ne__(self, other):
  4994. return not (self == other)
  4995. class drop_table_result:
  4996. """
  4997. Attributes:
  4998. - o1
  4999. - o3
  5000. """
  5001. thrift_spec = (
  5002. None, # 0
  5003. (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1
  5004. (2, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 2
  5005. )
  5006. def __init__(self, o1=None, o3=None,):
  5007. self.o1 = o1
  5008. self.o3 = o3
  5009. def read(self, iprot):
  5010. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  5011. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  5012. return
  5013. iprot.readStructBegin()
  5014. while True:
  5015. (fname, ftype, fid) = iprot.readFieldBegin()
  5016. if ftype == TType.STOP:
  5017. break
  5018. if fid == 1:
  5019. if ftype == TType.STRUCT:
  5020. self.o1 = NoSuchObjectException()
  5021. self.o1.read(iprot)
  5022. else:
  5023. iprot.skip(ftype)
  5024. elif fid == 2:
  5025. if ftype == TType.STRUCT:
  5026. self.o3 = MetaException()
  5027. self.o3.read(iprot)
  5028. else:
  5029. iprot.skip(ftype)
  5030. else:
  5031. iprot.skip(ftype)
  5032. iprot.readFieldEnd()
  5033. iprot.readStructEnd()
  5034. def write(self, oprot):
  5035. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  5036. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  5037. return
  5038. oprot.writeStructBegin('drop_table_result')
  5039. if self.o1 != None:
  5040. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  5041. self.o1.write(oprot)
  5042. oprot.writeFieldEnd()
  5043. if self.o3 != None:
  5044. oprot.writeFieldBegin('o3', TType.STRUCT, 2)
  5045. self.o3.write(oprot)
  5046. oprot.writeFieldEnd()
  5047. oprot.writeFieldStop()
  5048. oprot.writeStructEnd()
  5049. def validate(self):
  5050. return
  5051. def __repr__(self):
  5052. L = ['%s=%r' % (key, value)
  5053. for key, value in self.__dict__.iteritems()]
  5054. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  5055. def __eq__(self, other):
  5056. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  5057. def __ne__(self, other):
  5058. return not (self == other)
  5059. class get_tables_args:
  5060. """
  5061. Attributes:
  5062. - db_name
  5063. - pattern
  5064. """
  5065. thrift_spec = (
  5066. None, # 0
  5067. (1, TType.STRING, 'db_name', None, None, ), # 1
  5068. (2, TType.STRING, 'pattern', None, None, ), # 2
  5069. )
  5070. def __init__(self, db_name=None, pattern=None,):
  5071. self.db_name = db_name
  5072. self.pattern = pattern
  5073. def read(self, iprot):
  5074. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  5075. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  5076. return
  5077. iprot.readStructBegin()
  5078. while True:
  5079. (fname, ftype, fid) = iprot.readFieldBegin()
  5080. if ftype == TType.STOP:
  5081. break
  5082. if fid == 1:
  5083. if ftype == TType.STRING:
  5084. self.db_name = iprot.readString();
  5085. else:
  5086. iprot.skip(ftype)
  5087. elif fid == 2:
  5088. if ftype == TType.STRING:
  5089. self.pattern = iprot.readString();
  5090. else:
  5091. iprot.skip(ftype)
  5092. else:
  5093. iprot.skip(ftype)
  5094. iprot.readFieldEnd()
  5095. iprot.readStructEnd()
  5096. def write(self, oprot):
  5097. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  5098. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  5099. return
  5100. oprot.writeStructBegin('get_tables_args')
  5101. if self.db_name != None:
  5102. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  5103. oprot.writeString(self.db_name)
  5104. oprot.writeFieldEnd()
  5105. if self.pattern != None:
  5106. oprot.writeFieldBegin('pattern', TType.STRING, 2)
  5107. oprot.writeString(self.pattern)
  5108. oprot.writeFieldEnd()
  5109. oprot.writeFieldStop()
  5110. oprot.writeStructEnd()
  5111. def validate(self):
  5112. return
  5113. def __repr__(self):
  5114. L = ['%s=%r' % (key, value)
  5115. for key, value in self.__dict__.iteritems()]
  5116. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  5117. def __eq__(self, other):
  5118. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  5119. def __ne__(self, other):
  5120. return not (self == other)
  5121. class get_tables_result:
  5122. """
  5123. Attributes:
  5124. - success
  5125. - o1
  5126. """
  5127. thrift_spec = (
  5128. (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0
  5129. (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
  5130. )
  5131. def __init__(self, success=None, o1=None,):
  5132. self.success = success
  5133. self.o1 = o1
  5134. def read(self, iprot):
  5135. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  5136. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  5137. return
  5138. iprot.readStructBegin()
  5139. while True:
  5140. (fname, ftype, fid) = iprot.readFieldBegin()
  5141. if ftype == TType.STOP:
  5142. break
  5143. if fid == 0:
  5144. if ftype == TType.LIST:
  5145. self.success = []
  5146. (_etype214, _size211) = iprot.readListBegin()
  5147. for _i215 in xrange(_size211):
  5148. _elem216 = iprot.readString();
  5149. self.success.append(_elem216)
  5150. iprot.readListEnd()
  5151. else:
  5152. iprot.skip(ftype)
  5153. elif fid == 1:
  5154. if ftype == TType.STRUCT:
  5155. self.o1 = MetaException()
  5156. self.o1.read(iprot)
  5157. else:
  5158. iprot.skip(ftype)
  5159. else:
  5160. iprot.skip(ftype)
  5161. iprot.readFieldEnd()
  5162. iprot.readStructEnd()
  5163. def write(self, oprot):
  5164. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  5165. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  5166. return
  5167. oprot.writeStructBegin('get_tables_result')
  5168. if self.success != None:
  5169. oprot.writeFieldBegin('success', TType.LIST, 0)
  5170. oprot.writeListBegin(TType.STRING, len(self.success))
  5171. for iter217 in self.success:
  5172. oprot.writeString(iter217)
  5173. oprot.writeListEnd()
  5174. oprot.writeFieldEnd()
  5175. if self.o1 != None:
  5176. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  5177. self.o1.write(oprot)
  5178. oprot.writeFieldEnd()
  5179. oprot.writeFieldStop()
  5180. oprot.writeStructEnd()
  5181. def validate(self):
  5182. return
  5183. def __repr__(self):
  5184. L = ['%s=%r' % (key, value)
  5185. for key, value in self.__dict__.iteritems()]
  5186. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  5187. def __eq__(self, other):
  5188. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  5189. def __ne__(self, other):
  5190. return not (self == other)
  5191. class get_all_tables_args:
  5192. """
  5193. Attributes:
  5194. - db_name
  5195. """
  5196. thrift_spec = (
  5197. None, # 0
  5198. (1, TType.STRING, 'db_name', None, None, ), # 1
  5199. )
  5200. def __init__(self, db_name=None,):
  5201. self.db_name = db_name
  5202. def read(self, iprot):
  5203. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  5204. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  5205. return
  5206. iprot.readStructBegin()
  5207. while True:
  5208. (fname, ftype, fid) = iprot.readFieldBegin()
  5209. if ftype == TType.STOP:
  5210. break
  5211. if fid == 1:
  5212. if ftype == TType.STRING:
  5213. self.db_name = iprot.readString();
  5214. else:
  5215. iprot.skip(ftype)
  5216. else:
  5217. iprot.skip(ftype)
  5218. iprot.readFieldEnd()
  5219. iprot.readStructEnd()
  5220. def write(self, oprot):
  5221. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  5222. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  5223. return
  5224. oprot.writeStructBegin('get_all_tables_args')
  5225. if self.db_name != None:
  5226. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  5227. oprot.writeString(self.db_name)
  5228. oprot.writeFieldEnd()
  5229. oprot.writeFieldStop()
  5230. oprot.writeStructEnd()
  5231. def validate(self):
  5232. return
  5233. def __repr__(self):
  5234. L = ['%s=%r' % (key, value)
  5235. for key, value in self.__dict__.iteritems()]
  5236. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  5237. def __eq__(self, other):
  5238. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  5239. def __ne__(self, other):
  5240. return not (self == other)
  5241. class get_all_tables_result:
  5242. """
  5243. Attributes:
  5244. - success
  5245. - o1
  5246. """
  5247. thrift_spec = (
  5248. (0, TType.LIST, 'success', (TType.STRING,None), None, ), # 0
  5249. (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
  5250. )
  5251. def __init__(self, success=None, o1=None,):
  5252. self.success = success
  5253. self.o1 = o1
  5254. def read(self, iprot):
  5255. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  5256. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  5257. return
  5258. iprot.readStructBegin()
  5259. while True:
  5260. (fname, ftype, fid) = iprot.readFieldBegin()
  5261. if ftype == TType.STOP:
  5262. break
  5263. if fid == 0:
  5264. if ftype == TType.LIST:
  5265. self.success = []
  5266. (_etype221, _size218) = iprot.readListBegin()
  5267. for _i222 in xrange(_size218):
  5268. _elem223 = iprot.readString();
  5269. self.success.append(_elem223)
  5270. iprot.readListEnd()
  5271. else:
  5272. iprot.skip(ftype)
  5273. elif fid == 1:
  5274. if ftype == TType.STRUCT:
  5275. self.o1 = MetaException()
  5276. self.o1.read(iprot)
  5277. else:
  5278. iprot.skip(ftype)
  5279. else:
  5280. iprot.skip(ftype)
  5281. iprot.readFieldEnd()
  5282. iprot.readStructEnd()
  5283. def write(self, oprot):
  5284. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  5285. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  5286. return
  5287. oprot.writeStructBegin('get_all_tables_result')
  5288. if self.success != None:
  5289. oprot.writeFieldBegin('success', TType.LIST, 0)
  5290. oprot.writeListBegin(TType.STRING, len(self.success))
  5291. for iter224 in self.success:
  5292. oprot.writeString(iter224)
  5293. oprot.writeListEnd()
  5294. oprot.writeFieldEnd()
  5295. if self.o1 != None:
  5296. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  5297. self.o1.write(oprot)
  5298. oprot.writeFieldEnd()
  5299. oprot.writeFieldStop()
  5300. oprot.writeStructEnd()
  5301. def validate(self):
  5302. return
  5303. def __repr__(self):
  5304. L = ['%s=%r' % (key, value)
  5305. for key, value in self.__dict__.iteritems()]
  5306. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  5307. def __eq__(self, other):
  5308. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  5309. def __ne__(self, other):
  5310. return not (self == other)
  5311. class get_table_args:
  5312. """
  5313. Attributes:
  5314. - dbname
  5315. - tbl_name
  5316. """
  5317. thrift_spec = (
  5318. None, # 0
  5319. (1, TType.STRING, 'dbname', None, None, ), # 1
  5320. (2, TType.STRING, 'tbl_name', None, None, ), # 2
  5321. )
  5322. def __init__(self, dbname=None, tbl_name=None,):
  5323. self.dbname = dbname
  5324. self.tbl_name = tbl_name
  5325. def read(self, iprot):
  5326. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  5327. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  5328. return
  5329. iprot.readStructBegin()
  5330. while True:
  5331. (fname, ftype, fid) = iprot.readFieldBegin()
  5332. if ftype == TType.STOP:
  5333. break
  5334. if fid == 1:
  5335. if ftype == TType.STRING:
  5336. self.dbname = iprot.readString();
  5337. else:
  5338. iprot.skip(ftype)
  5339. elif fid == 2:
  5340. if ftype == TType.STRING:
  5341. self.tbl_name = iprot.readString();
  5342. else:
  5343. iprot.skip(ftype)
  5344. else:
  5345. iprot.skip(ftype)
  5346. iprot.readFieldEnd()
  5347. iprot.readStructEnd()
  5348. def write(self, oprot):
  5349. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  5350. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  5351. return
  5352. oprot.writeStructBegin('get_table_args')
  5353. if self.dbname != None:
  5354. oprot.writeFieldBegin('dbname', TType.STRING, 1)
  5355. oprot.writeString(self.dbname)
  5356. oprot.writeFieldEnd()
  5357. if self.tbl_name != None:
  5358. oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
  5359. oprot.writeString(self.tbl_name)
  5360. oprot.writeFieldEnd()
  5361. oprot.writeFieldStop()
  5362. oprot.writeStructEnd()
  5363. def validate(self):
  5364. return
  5365. def __repr__(self):
  5366. L = ['%s=%r' % (key, value)
  5367. for key, value in self.__dict__.iteritems()]
  5368. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  5369. def __eq__(self, other):
  5370. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  5371. def __ne__(self, other):
  5372. return not (self == other)
  5373. class get_table_result:
  5374. """
  5375. Attributes:
  5376. - success
  5377. - o1
  5378. - o2
  5379. """
  5380. thrift_spec = (
  5381. (0, TType.STRUCT, 'success', (Table, Table.thrift_spec), None, ), # 0
  5382. (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
  5383. (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2
  5384. )
  5385. def __init__(self, success=None, o1=None, o2=None,):
  5386. self.success = success
  5387. self.o1 = o1
  5388. self.o2 = o2
  5389. def read(self, iprot):
  5390. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  5391. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  5392. return
  5393. iprot.readStructBegin()
  5394. while True:
  5395. (fname, ftype, fid) = iprot.readFieldBegin()
  5396. if ftype == TType.STOP:
  5397. break
  5398. if fid == 0:
  5399. if ftype == TType.STRUCT:
  5400. self.success = Table()
  5401. self.success.read(iprot)
  5402. else:
  5403. iprot.skip(ftype)
  5404. elif fid == 1:
  5405. if ftype == TType.STRUCT:
  5406. self.o1 = MetaException()
  5407. self.o1.read(iprot)
  5408. else:
  5409. iprot.skip(ftype)
  5410. elif fid == 2:
  5411. if ftype == TType.STRUCT:
  5412. self.o2 = NoSuchObjectException()
  5413. self.o2.read(iprot)
  5414. else:
  5415. iprot.skip(ftype)
  5416. else:
  5417. iprot.skip(ftype)
  5418. iprot.readFieldEnd()
  5419. iprot.readStructEnd()
  5420. def write(self, oprot):
  5421. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  5422. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  5423. return
  5424. oprot.writeStructBegin('get_table_result')
  5425. if self.success != None:
  5426. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  5427. self.success.write(oprot)
  5428. oprot.writeFieldEnd()
  5429. if self.o1 != None:
  5430. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  5431. self.o1.write(oprot)
  5432. oprot.writeFieldEnd()
  5433. if self.o2 != None:
  5434. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  5435. self.o2.write(oprot)
  5436. oprot.writeFieldEnd()
  5437. oprot.writeFieldStop()
  5438. oprot.writeStructEnd()
  5439. def validate(self):
  5440. return
  5441. def __repr__(self):
  5442. L = ['%s=%r' % (key, value)
  5443. for key, value in self.__dict__.iteritems()]
  5444. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  5445. def __eq__(self, other):
  5446. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  5447. def __ne__(self, other):
  5448. return not (self == other)
  5449. class alter_table_args:
  5450. """
  5451. Attributes:
  5452. - dbname
  5453. - tbl_name
  5454. - new_tbl
  5455. """
  5456. thrift_spec = (
  5457. None, # 0
  5458. (1, TType.STRING, 'dbname', None, None, ), # 1
  5459. (2, TType.STRING, 'tbl_name', None, None, ), # 2
  5460. (3, TType.STRUCT, 'new_tbl', (Table, Table.thrift_spec), None, ), # 3
  5461. )
  5462. def __init__(self, dbname=None, tbl_name=None, new_tbl=None,):
  5463. self.dbname = dbname
  5464. self.tbl_name = tbl_name
  5465. self.new_tbl = new_tbl
  5466. def read(self, iprot):
  5467. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  5468. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  5469. return
  5470. iprot.readStructBegin()
  5471. while True:
  5472. (fname, ftype, fid) = iprot.readFieldBegin()
  5473. if ftype == TType.STOP:
  5474. break
  5475. if fid == 1:
  5476. if ftype == TType.STRING:
  5477. self.dbname = iprot.readString();
  5478. else:
  5479. iprot.skip(ftype)
  5480. elif fid == 2:
  5481. if ftype == TType.STRING:
  5482. self.tbl_name = iprot.readString();
  5483. else:
  5484. iprot.skip(ftype)
  5485. elif fid == 3:
  5486. if ftype == TType.STRUCT:
  5487. self.new_tbl = Table()
  5488. self.new_tbl.read(iprot)
  5489. else:
  5490. iprot.skip(ftype)
  5491. else:
  5492. iprot.skip(ftype)
  5493. iprot.readFieldEnd()
  5494. iprot.readStructEnd()
  5495. def write(self, oprot):
  5496. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  5497. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  5498. return
  5499. oprot.writeStructBegin('alter_table_args')
  5500. if self.dbname != None:
  5501. oprot.writeFieldBegin('dbname', TType.STRING, 1)
  5502. oprot.writeString(self.dbname)
  5503. oprot.writeFieldEnd()
  5504. if self.tbl_name != None:
  5505. oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
  5506. oprot.writeString(self.tbl_name)
  5507. oprot.writeFieldEnd()
  5508. if self.new_tbl != None:
  5509. oprot.writeFieldBegin('new_tbl', TType.STRUCT, 3)
  5510. self.new_tbl.write(oprot)
  5511. oprot.writeFieldEnd()
  5512. oprot.writeFieldStop()
  5513. oprot.writeStructEnd()
  5514. def validate(self):
  5515. return
  5516. def __repr__(self):
  5517. L = ['%s=%r' % (key, value)
  5518. for key, value in self.__dict__.iteritems()]
  5519. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  5520. def __eq__(self, other):
  5521. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  5522. def __ne__(self, other):
  5523. return not (self == other)
  5524. class alter_table_result:
  5525. """
  5526. Attributes:
  5527. - o1
  5528. - o2
  5529. """
  5530. thrift_spec = (
  5531. None, # 0
  5532. (1, TType.STRUCT, 'o1', (InvalidOperationException, InvalidOperationException.thrift_spec), None, ), # 1
  5533. (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2
  5534. )
  5535. def __init__(self, o1=None, o2=None,):
  5536. self.o1 = o1
  5537. self.o2 = o2
  5538. def read(self, iprot):
  5539. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  5540. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  5541. return
  5542. iprot.readStructBegin()
  5543. while True:
  5544. (fname, ftype, fid) = iprot.readFieldBegin()
  5545. if ftype == TType.STOP:
  5546. break
  5547. if fid == 1:
  5548. if ftype == TType.STRUCT:
  5549. self.o1 = InvalidOperationException()
  5550. self.o1.read(iprot)
  5551. else:
  5552. iprot.skip(ftype)
  5553. elif fid == 2:
  5554. if ftype == TType.STRUCT:
  5555. self.o2 = MetaException()
  5556. self.o2.read(iprot)
  5557. else:
  5558. iprot.skip(ftype)
  5559. else:
  5560. iprot.skip(ftype)
  5561. iprot.readFieldEnd()
  5562. iprot.readStructEnd()
  5563. def write(self, oprot):
  5564. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  5565. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  5566. return
  5567. oprot.writeStructBegin('alter_table_result')
  5568. if self.o1 != None:
  5569. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  5570. self.o1.write(oprot)
  5571. oprot.writeFieldEnd()
  5572. if self.o2 != None:
  5573. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  5574. self.o2.write(oprot)
  5575. oprot.writeFieldEnd()
  5576. oprot.writeFieldStop()
  5577. oprot.writeStructEnd()
  5578. def validate(self):
  5579. return
  5580. def __repr__(self):
  5581. L = ['%s=%r' % (key, value)
  5582. for key, value in self.__dict__.iteritems()]
  5583. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  5584. def __eq__(self, other):
  5585. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  5586. def __ne__(self, other):
  5587. return not (self == other)
  5588. class add_partition_args:
  5589. """
  5590. Attributes:
  5591. - new_part
  5592. """
  5593. thrift_spec = (
  5594. None, # 0
  5595. (1, TType.STRUCT, 'new_part', (Partition, Partition.thrift_spec), None, ), # 1
  5596. )
  5597. def __init__(self, new_part=None,):
  5598. self.new_part = new_part
  5599. def read(self, iprot):
  5600. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  5601. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  5602. return
  5603. iprot.readStructBegin()
  5604. while True:
  5605. (fname, ftype, fid) = iprot.readFieldBegin()
  5606. if ftype == TType.STOP:
  5607. break
  5608. if fid == 1:
  5609. if ftype == TType.STRUCT:
  5610. self.new_part = Partition()
  5611. self.new_part.read(iprot)
  5612. else:
  5613. iprot.skip(ftype)
  5614. else:
  5615. iprot.skip(ftype)
  5616. iprot.readFieldEnd()
  5617. iprot.readStructEnd()
  5618. def write(self, oprot):
  5619. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  5620. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  5621. return
  5622. oprot.writeStructBegin('add_partition_args')
  5623. if self.new_part != None:
  5624. oprot.writeFieldBegin('new_part', TType.STRUCT, 1)
  5625. self.new_part.write(oprot)
  5626. oprot.writeFieldEnd()
  5627. oprot.writeFieldStop()
  5628. oprot.writeStructEnd()
  5629. def validate(self):
  5630. return
  5631. def __repr__(self):
  5632. L = ['%s=%r' % (key, value)
  5633. for key, value in self.__dict__.iteritems()]
  5634. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  5635. def __eq__(self, other):
  5636. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  5637. def __ne__(self, other):
  5638. return not (self == other)
  5639. class add_partition_result:
  5640. """
  5641. Attributes:
  5642. - success
  5643. - o1
  5644. - o2
  5645. - o3
  5646. """
  5647. thrift_spec = (
  5648. (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0
  5649. (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1
  5650. (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2
  5651. (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3
  5652. )
  5653. def __init__(self, success=None, o1=None, o2=None, o3=None,):
  5654. self.success = success
  5655. self.o1 = o1
  5656. self.o2 = o2
  5657. self.o3 = o3
  5658. def read(self, iprot):
  5659. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  5660. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  5661. return
  5662. iprot.readStructBegin()
  5663. while True:
  5664. (fname, ftype, fid) = iprot.readFieldBegin()
  5665. if ftype == TType.STOP:
  5666. break
  5667. if fid == 0:
  5668. if ftype == TType.STRUCT:
  5669. self.success = Partition()
  5670. self.success.read(iprot)
  5671. else:
  5672. iprot.skip(ftype)
  5673. elif fid == 1:
  5674. if ftype == TType.STRUCT:
  5675. self.o1 = InvalidObjectException()
  5676. self.o1.read(iprot)
  5677. else:
  5678. iprot.skip(ftype)
  5679. elif fid == 2:
  5680. if ftype == TType.STRUCT:
  5681. self.o2 = AlreadyExistsException()
  5682. self.o2.read(iprot)
  5683. else:
  5684. iprot.skip(ftype)
  5685. elif fid == 3:
  5686. if ftype == TType.STRUCT:
  5687. self.o3 = MetaException()
  5688. self.o3.read(iprot)
  5689. else:
  5690. iprot.skip(ftype)
  5691. else:
  5692. iprot.skip(ftype)
  5693. iprot.readFieldEnd()
  5694. iprot.readStructEnd()
  5695. def write(self, oprot):
  5696. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  5697. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  5698. return
  5699. oprot.writeStructBegin('add_partition_result')
  5700. if self.success != None:
  5701. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  5702. self.success.write(oprot)
  5703. oprot.writeFieldEnd()
  5704. if self.o1 != None:
  5705. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  5706. self.o1.write(oprot)
  5707. oprot.writeFieldEnd()
  5708. if self.o2 != None:
  5709. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  5710. self.o2.write(oprot)
  5711. oprot.writeFieldEnd()
  5712. if self.o3 != None:
  5713. oprot.writeFieldBegin('o3', TType.STRUCT, 3)
  5714. self.o3.write(oprot)
  5715. oprot.writeFieldEnd()
  5716. oprot.writeFieldStop()
  5717. oprot.writeStructEnd()
  5718. def validate(self):
  5719. return
  5720. def __repr__(self):
  5721. L = ['%s=%r' % (key, value)
  5722. for key, value in self.__dict__.iteritems()]
  5723. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  5724. def __eq__(self, other):
  5725. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  5726. def __ne__(self, other):
  5727. return not (self == other)
  5728. class append_partition_args:
  5729. """
  5730. Attributes:
  5731. - db_name
  5732. - tbl_name
  5733. - part_vals
  5734. """
  5735. thrift_spec = (
  5736. None, # 0
  5737. (1, TType.STRING, 'db_name', None, None, ), # 1
  5738. (2, TType.STRING, 'tbl_name', None, None, ), # 2
  5739. (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3
  5740. )
  5741. def __init__(self, db_name=None, tbl_name=None, part_vals=None,):
  5742. self.db_name = db_name
  5743. self.tbl_name = tbl_name
  5744. self.part_vals = part_vals
  5745. def read(self, iprot):
  5746. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  5747. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  5748. return
  5749. iprot.readStructBegin()
  5750. while True:
  5751. (fname, ftype, fid) = iprot.readFieldBegin()
  5752. if ftype == TType.STOP:
  5753. break
  5754. if fid == 1:
  5755. if ftype == TType.STRING:
  5756. self.db_name = iprot.readString();
  5757. else:
  5758. iprot.skip(ftype)
  5759. elif fid == 2:
  5760. if ftype == TType.STRING:
  5761. self.tbl_name = iprot.readString();
  5762. else:
  5763. iprot.skip(ftype)
  5764. elif fid == 3:
  5765. if ftype == TType.LIST:
  5766. self.part_vals = []
  5767. (_etype228, _size225) = iprot.readListBegin()
  5768. for _i229 in xrange(_size225):
  5769. _elem230 = iprot.readString();
  5770. self.part_vals.append(_elem230)
  5771. iprot.readListEnd()
  5772. else:
  5773. iprot.skip(ftype)
  5774. else:
  5775. iprot.skip(ftype)
  5776. iprot.readFieldEnd()
  5777. iprot.readStructEnd()
  5778. def write(self, oprot):
  5779. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  5780. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  5781. return
  5782. oprot.writeStructBegin('append_partition_args')
  5783. if self.db_name != None:
  5784. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  5785. oprot.writeString(self.db_name)
  5786. oprot.writeFieldEnd()
  5787. if self.tbl_name != None:
  5788. oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
  5789. oprot.writeString(self.tbl_name)
  5790. oprot.writeFieldEnd()
  5791. if self.part_vals != None:
  5792. oprot.writeFieldBegin('part_vals', TType.LIST, 3)
  5793. oprot.writeListBegin(TType.STRING, len(self.part_vals))
  5794. for iter231 in self.part_vals:
  5795. oprot.writeString(iter231)
  5796. oprot.writeListEnd()
  5797. oprot.writeFieldEnd()
  5798. oprot.writeFieldStop()
  5799. oprot.writeStructEnd()
  5800. def validate(self):
  5801. return
  5802. def __repr__(self):
  5803. L = ['%s=%r' % (key, value)
  5804. for key, value in self.__dict__.iteritems()]
  5805. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  5806. def __eq__(self, other):
  5807. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  5808. def __ne__(self, other):
  5809. return not (self == other)
  5810. class append_partition_result:
  5811. """
  5812. Attributes:
  5813. - success
  5814. - o1
  5815. - o2
  5816. - o3
  5817. """
  5818. thrift_spec = (
  5819. (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0
  5820. (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1
  5821. (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2
  5822. (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3
  5823. )
  5824. def __init__(self, success=None, o1=None, o2=None, o3=None,):
  5825. self.success = success
  5826. self.o1 = o1
  5827. self.o2 = o2
  5828. self.o3 = o3
  5829. def read(self, iprot):
  5830. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  5831. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  5832. return
  5833. iprot.readStructBegin()
  5834. while True:
  5835. (fname, ftype, fid) = iprot.readFieldBegin()
  5836. if ftype == TType.STOP:
  5837. break
  5838. if fid == 0:
  5839. if ftype == TType.STRUCT:
  5840. self.success = Partition()
  5841. self.success.read(iprot)
  5842. else:
  5843. iprot.skip(ftype)
  5844. elif fid == 1:
  5845. if ftype == TType.STRUCT:
  5846. self.o1 = InvalidObjectException()
  5847. self.o1.read(iprot)
  5848. else:
  5849. iprot.skip(ftype)
  5850. elif fid == 2:
  5851. if ftype == TType.STRUCT:
  5852. self.o2 = AlreadyExistsException()
  5853. self.o2.read(iprot)
  5854. else:
  5855. iprot.skip(ftype)
  5856. elif fid == 3:
  5857. if ftype == TType.STRUCT:
  5858. self.o3 = MetaException()
  5859. self.o3.read(iprot)
  5860. else:
  5861. iprot.skip(ftype)
  5862. else:
  5863. iprot.skip(ftype)
  5864. iprot.readFieldEnd()
  5865. iprot.readStructEnd()
  5866. def write(self, oprot):
  5867. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  5868. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  5869. return
  5870. oprot.writeStructBegin('append_partition_result')
  5871. if self.success != None:
  5872. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  5873. self.success.write(oprot)
  5874. oprot.writeFieldEnd()
  5875. if self.o1 != None:
  5876. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  5877. self.o1.write(oprot)
  5878. oprot.writeFieldEnd()
  5879. if self.o2 != None:
  5880. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  5881. self.o2.write(oprot)
  5882. oprot.writeFieldEnd()
  5883. if self.o3 != None:
  5884. oprot.writeFieldBegin('o3', TType.STRUCT, 3)
  5885. self.o3.write(oprot)
  5886. oprot.writeFieldEnd()
  5887. oprot.writeFieldStop()
  5888. oprot.writeStructEnd()
  5889. def validate(self):
  5890. return
  5891. def __repr__(self):
  5892. L = ['%s=%r' % (key, value)
  5893. for key, value in self.__dict__.iteritems()]
  5894. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  5895. def __eq__(self, other):
  5896. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  5897. def __ne__(self, other):
  5898. return not (self == other)
  5899. class append_partition_by_name_args:
  5900. """
  5901. Attributes:
  5902. - db_name
  5903. - tbl_name
  5904. - part_name
  5905. """
  5906. thrift_spec = (
  5907. None, # 0
  5908. (1, TType.STRING, 'db_name', None, None, ), # 1
  5909. (2, TType.STRING, 'tbl_name', None, None, ), # 2
  5910. (3, TType.STRING, 'part_name', None, None, ), # 3
  5911. )
  5912. def __init__(self, db_name=None, tbl_name=None, part_name=None,):
  5913. self.db_name = db_name
  5914. self.tbl_name = tbl_name
  5915. self.part_name = part_name
  5916. def read(self, iprot):
  5917. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  5918. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  5919. return
  5920. iprot.readStructBegin()
  5921. while True:
  5922. (fname, ftype, fid) = iprot.readFieldBegin()
  5923. if ftype == TType.STOP:
  5924. break
  5925. if fid == 1:
  5926. if ftype == TType.STRING:
  5927. self.db_name = iprot.readString();
  5928. else:
  5929. iprot.skip(ftype)
  5930. elif fid == 2:
  5931. if ftype == TType.STRING:
  5932. self.tbl_name = iprot.readString();
  5933. else:
  5934. iprot.skip(ftype)
  5935. elif fid == 3:
  5936. if ftype == TType.STRING:
  5937. self.part_name = iprot.readString();
  5938. else:
  5939. iprot.skip(ftype)
  5940. else:
  5941. iprot.skip(ftype)
  5942. iprot.readFieldEnd()
  5943. iprot.readStructEnd()
  5944. def write(self, oprot):
  5945. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  5946. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  5947. return
  5948. oprot.writeStructBegin('append_partition_by_name_args')
  5949. if self.db_name != None:
  5950. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  5951. oprot.writeString(self.db_name)
  5952. oprot.writeFieldEnd()
  5953. if self.tbl_name != None:
  5954. oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
  5955. oprot.writeString(self.tbl_name)
  5956. oprot.writeFieldEnd()
  5957. if self.part_name != None:
  5958. oprot.writeFieldBegin('part_name', TType.STRING, 3)
  5959. oprot.writeString(self.part_name)
  5960. oprot.writeFieldEnd()
  5961. oprot.writeFieldStop()
  5962. oprot.writeStructEnd()
  5963. def validate(self):
  5964. return
  5965. def __repr__(self):
  5966. L = ['%s=%r' % (key, value)
  5967. for key, value in self.__dict__.iteritems()]
  5968. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  5969. def __eq__(self, other):
  5970. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  5971. def __ne__(self, other):
  5972. return not (self == other)
  5973. class append_partition_by_name_result:
  5974. """
  5975. Attributes:
  5976. - success
  5977. - o1
  5978. - o2
  5979. - o3
  5980. """
  5981. thrift_spec = (
  5982. (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0
  5983. (1, TType.STRUCT, 'o1', (InvalidObjectException, InvalidObjectException.thrift_spec), None, ), # 1
  5984. (2, TType.STRUCT, 'o2', (AlreadyExistsException, AlreadyExistsException.thrift_spec), None, ), # 2
  5985. (3, TType.STRUCT, 'o3', (MetaException, MetaException.thrift_spec), None, ), # 3
  5986. )
  5987. def __init__(self, success=None, o1=None, o2=None, o3=None,):
  5988. self.success = success
  5989. self.o1 = o1
  5990. self.o2 = o2
  5991. self.o3 = o3
  5992. def read(self, iprot):
  5993. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  5994. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  5995. return
  5996. iprot.readStructBegin()
  5997. while True:
  5998. (fname, ftype, fid) = iprot.readFieldBegin()
  5999. if ftype == TType.STOP:
  6000. break
  6001. if fid == 0:
  6002. if ftype == TType.STRUCT:
  6003. self.success = Partition()
  6004. self.success.read(iprot)
  6005. else:
  6006. iprot.skip(ftype)
  6007. elif fid == 1:
  6008. if ftype == TType.STRUCT:
  6009. self.o1 = InvalidObjectException()
  6010. self.o1.read(iprot)
  6011. else:
  6012. iprot.skip(ftype)
  6013. elif fid == 2:
  6014. if ftype == TType.STRUCT:
  6015. self.o2 = AlreadyExistsException()
  6016. self.o2.read(iprot)
  6017. else:
  6018. iprot.skip(ftype)
  6019. elif fid == 3:
  6020. if ftype == TType.STRUCT:
  6021. self.o3 = MetaException()
  6022. self.o3.read(iprot)
  6023. else:
  6024. iprot.skip(ftype)
  6025. else:
  6026. iprot.skip(ftype)
  6027. iprot.readFieldEnd()
  6028. iprot.readStructEnd()
  6029. def write(self, oprot):
  6030. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  6031. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  6032. return
  6033. oprot.writeStructBegin('append_partition_by_name_result')
  6034. if self.success != None:
  6035. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  6036. self.success.write(oprot)
  6037. oprot.writeFieldEnd()
  6038. if self.o1 != None:
  6039. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  6040. self.o1.write(oprot)
  6041. oprot.writeFieldEnd()
  6042. if self.o2 != None:
  6043. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  6044. self.o2.write(oprot)
  6045. oprot.writeFieldEnd()
  6046. if self.o3 != None:
  6047. oprot.writeFieldBegin('o3', TType.STRUCT, 3)
  6048. self.o3.write(oprot)
  6049. oprot.writeFieldEnd()
  6050. oprot.writeFieldStop()
  6051. oprot.writeStructEnd()
  6052. def validate(self):
  6053. return
  6054. def __repr__(self):
  6055. L = ['%s=%r' % (key, value)
  6056. for key, value in self.__dict__.iteritems()]
  6057. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  6058. def __eq__(self, other):
  6059. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  6060. def __ne__(self, other):
  6061. return not (self == other)
  6062. class drop_partition_args:
  6063. """
  6064. Attributes:
  6065. - db_name
  6066. - tbl_name
  6067. - part_vals
  6068. - deleteData
  6069. """
  6070. thrift_spec = (
  6071. None, # 0
  6072. (1, TType.STRING, 'db_name', None, None, ), # 1
  6073. (2, TType.STRING, 'tbl_name', None, None, ), # 2
  6074. (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3
  6075. (4, TType.BOOL, 'deleteData', None, None, ), # 4
  6076. )
  6077. def __init__(self, db_name=None, tbl_name=None, part_vals=None, deleteData=None,):
  6078. self.db_name = db_name
  6079. self.tbl_name = tbl_name
  6080. self.part_vals = part_vals
  6081. self.deleteData = deleteData
  6082. def read(self, iprot):
  6083. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  6084. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  6085. return
  6086. iprot.readStructBegin()
  6087. while True:
  6088. (fname, ftype, fid) = iprot.readFieldBegin()
  6089. if ftype == TType.STOP:
  6090. break
  6091. if fid == 1:
  6092. if ftype == TType.STRING:
  6093. self.db_name = iprot.readString();
  6094. else:
  6095. iprot.skip(ftype)
  6096. elif fid == 2:
  6097. if ftype == TType.STRING:
  6098. self.tbl_name = iprot.readString();
  6099. else:
  6100. iprot.skip(ftype)
  6101. elif fid == 3:
  6102. if ftype == TType.LIST:
  6103. self.part_vals = []
  6104. (_etype235, _size232) = iprot.readListBegin()
  6105. for _i236 in xrange(_size232):
  6106. _elem237 = iprot.readString();
  6107. self.part_vals.append(_elem237)
  6108. iprot.readListEnd()
  6109. else:
  6110. iprot.skip(ftype)
  6111. elif fid == 4:
  6112. if ftype == TType.BOOL:
  6113. self.deleteData = iprot.readBool();
  6114. else:
  6115. iprot.skip(ftype)
  6116. else:
  6117. iprot.skip(ftype)
  6118. iprot.readFieldEnd()
  6119. iprot.readStructEnd()
  6120. def write(self, oprot):
  6121. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  6122. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  6123. return
  6124. oprot.writeStructBegin('drop_partition_args')
  6125. if self.db_name != None:
  6126. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  6127. oprot.writeString(self.db_name)
  6128. oprot.writeFieldEnd()
  6129. if self.tbl_name != None:
  6130. oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
  6131. oprot.writeString(self.tbl_name)
  6132. oprot.writeFieldEnd()
  6133. if self.part_vals != None:
  6134. oprot.writeFieldBegin('part_vals', TType.LIST, 3)
  6135. oprot.writeListBegin(TType.STRING, len(self.part_vals))
  6136. for iter238 in self.part_vals:
  6137. oprot.writeString(iter238)
  6138. oprot.writeListEnd()
  6139. oprot.writeFieldEnd()
  6140. if self.deleteData != None:
  6141. oprot.writeFieldBegin('deleteData', TType.BOOL, 4)
  6142. oprot.writeBool(self.deleteData)
  6143. oprot.writeFieldEnd()
  6144. oprot.writeFieldStop()
  6145. oprot.writeStructEnd()
  6146. def validate(self):
  6147. return
  6148. def __repr__(self):
  6149. L = ['%s=%r' % (key, value)
  6150. for key, value in self.__dict__.iteritems()]
  6151. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  6152. def __eq__(self, other):
  6153. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  6154. def __ne__(self, other):
  6155. return not (self == other)
  6156. class drop_partition_result:
  6157. """
  6158. Attributes:
  6159. - success
  6160. - o1
  6161. - o2
  6162. """
  6163. thrift_spec = (
  6164. (0, TType.BOOL, 'success', None, None, ), # 0
  6165. (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1
  6166. (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2
  6167. )
  6168. def __init__(self, success=None, o1=None, o2=None,):
  6169. self.success = success
  6170. self.o1 = o1
  6171. self.o2 = o2
  6172. def read(self, iprot):
  6173. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  6174. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  6175. return
  6176. iprot.readStructBegin()
  6177. while True:
  6178. (fname, ftype, fid) = iprot.readFieldBegin()
  6179. if ftype == TType.STOP:
  6180. break
  6181. if fid == 0:
  6182. if ftype == TType.BOOL:
  6183. self.success = iprot.readBool();
  6184. else:
  6185. iprot.skip(ftype)
  6186. elif fid == 1:
  6187. if ftype == TType.STRUCT:
  6188. self.o1 = NoSuchObjectException()
  6189. self.o1.read(iprot)
  6190. else:
  6191. iprot.skip(ftype)
  6192. elif fid == 2:
  6193. if ftype == TType.STRUCT:
  6194. self.o2 = MetaException()
  6195. self.o2.read(iprot)
  6196. else:
  6197. iprot.skip(ftype)
  6198. else:
  6199. iprot.skip(ftype)
  6200. iprot.readFieldEnd()
  6201. iprot.readStructEnd()
  6202. def write(self, oprot):
  6203. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  6204. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  6205. return
  6206. oprot.writeStructBegin('drop_partition_result')
  6207. if self.success != None:
  6208. oprot.writeFieldBegin('success', TType.BOOL, 0)
  6209. oprot.writeBool(self.success)
  6210. oprot.writeFieldEnd()
  6211. if self.o1 != None:
  6212. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  6213. self.o1.write(oprot)
  6214. oprot.writeFieldEnd()
  6215. if self.o2 != None:
  6216. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  6217. self.o2.write(oprot)
  6218. oprot.writeFieldEnd()
  6219. oprot.writeFieldStop()
  6220. oprot.writeStructEnd()
  6221. def validate(self):
  6222. return
  6223. def __repr__(self):
  6224. L = ['%s=%r' % (key, value)
  6225. for key, value in self.__dict__.iteritems()]
  6226. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  6227. def __eq__(self, other):
  6228. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  6229. def __ne__(self, other):
  6230. return not (self == other)
  6231. class drop_partition_by_name_args:
  6232. """
  6233. Attributes:
  6234. - db_name
  6235. - tbl_name
  6236. - part_name
  6237. - deleteData
  6238. """
  6239. thrift_spec = (
  6240. None, # 0
  6241. (1, TType.STRING, 'db_name', None, None, ), # 1
  6242. (2, TType.STRING, 'tbl_name', None, None, ), # 2
  6243. (3, TType.STRING, 'part_name', None, None, ), # 3
  6244. (4, TType.BOOL, 'deleteData', None, None, ), # 4
  6245. )
  6246. def __init__(self, db_name=None, tbl_name=None, part_name=None, deleteData=None,):
  6247. self.db_name = db_name
  6248. self.tbl_name = tbl_name
  6249. self.part_name = part_name
  6250. self.deleteData = deleteData
  6251. def read(self, iprot):
  6252. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  6253. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  6254. return
  6255. iprot.readStructBegin()
  6256. while True:
  6257. (fname, ftype, fid) = iprot.readFieldBegin()
  6258. if ftype == TType.STOP:
  6259. break
  6260. if fid == 1:
  6261. if ftype == TType.STRING:
  6262. self.db_name = iprot.readString();
  6263. else:
  6264. iprot.skip(ftype)
  6265. elif fid == 2:
  6266. if ftype == TType.STRING:
  6267. self.tbl_name = iprot.readString();
  6268. else:
  6269. iprot.skip(ftype)
  6270. elif fid == 3:
  6271. if ftype == TType.STRING:
  6272. self.part_name = iprot.readString();
  6273. else:
  6274. iprot.skip(ftype)
  6275. elif fid == 4:
  6276. if ftype == TType.BOOL:
  6277. self.deleteData = iprot.readBool();
  6278. else:
  6279. iprot.skip(ftype)
  6280. else:
  6281. iprot.skip(ftype)
  6282. iprot.readFieldEnd()
  6283. iprot.readStructEnd()
  6284. def write(self, oprot):
  6285. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  6286. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  6287. return
  6288. oprot.writeStructBegin('drop_partition_by_name_args')
  6289. if self.db_name != None:
  6290. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  6291. oprot.writeString(self.db_name)
  6292. oprot.writeFieldEnd()
  6293. if self.tbl_name != None:
  6294. oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
  6295. oprot.writeString(self.tbl_name)
  6296. oprot.writeFieldEnd()
  6297. if self.part_name != None:
  6298. oprot.writeFieldBegin('part_name', TType.STRING, 3)
  6299. oprot.writeString(self.part_name)
  6300. oprot.writeFieldEnd()
  6301. if self.deleteData != None:
  6302. oprot.writeFieldBegin('deleteData', TType.BOOL, 4)
  6303. oprot.writeBool(self.deleteData)
  6304. oprot.writeFieldEnd()
  6305. oprot.writeFieldStop()
  6306. oprot.writeStructEnd()
  6307. def validate(self):
  6308. return
  6309. def __repr__(self):
  6310. L = ['%s=%r' % (key, value)
  6311. for key, value in self.__dict__.iteritems()]
  6312. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  6313. def __eq__(self, other):
  6314. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  6315. def __ne__(self, other):
  6316. return not (self == other)
  6317. class drop_partition_by_name_result:
  6318. """
  6319. Attributes:
  6320. - success
  6321. - o1
  6322. - o2
  6323. """
  6324. thrift_spec = (
  6325. (0, TType.BOOL, 'success', None, None, ), # 0
  6326. (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1
  6327. (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2
  6328. )
  6329. def __init__(self, success=None, o1=None, o2=None,):
  6330. self.success = success
  6331. self.o1 = o1
  6332. self.o2 = o2
  6333. def read(self, iprot):
  6334. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  6335. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  6336. return
  6337. iprot.readStructBegin()
  6338. while True:
  6339. (fname, ftype, fid) = iprot.readFieldBegin()
  6340. if ftype == TType.STOP:
  6341. break
  6342. if fid == 0:
  6343. if ftype == TType.BOOL:
  6344. self.success = iprot.readBool();
  6345. else:
  6346. iprot.skip(ftype)
  6347. elif fid == 1:
  6348. if ftype == TType.STRUCT:
  6349. self.o1 = NoSuchObjectException()
  6350. self.o1.read(iprot)
  6351. else:
  6352. iprot.skip(ftype)
  6353. elif fid == 2:
  6354. if ftype == TType.STRUCT:
  6355. self.o2 = MetaException()
  6356. self.o2.read(iprot)
  6357. else:
  6358. iprot.skip(ftype)
  6359. else:
  6360. iprot.skip(ftype)
  6361. iprot.readFieldEnd()
  6362. iprot.readStructEnd()
  6363. def write(self, oprot):
  6364. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  6365. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  6366. return
  6367. oprot.writeStructBegin('drop_partition_by_name_result')
  6368. if self.success != None:
  6369. oprot.writeFieldBegin('success', TType.BOOL, 0)
  6370. oprot.writeBool(self.success)
  6371. oprot.writeFieldEnd()
  6372. if self.o1 != None:
  6373. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  6374. self.o1.write(oprot)
  6375. oprot.writeFieldEnd()
  6376. if self.o2 != None:
  6377. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  6378. self.o2.write(oprot)
  6379. oprot.writeFieldEnd()
  6380. oprot.writeFieldStop()
  6381. oprot.writeStructEnd()
  6382. def validate(self):
  6383. return
  6384. def __repr__(self):
  6385. L = ['%s=%r' % (key, value)
  6386. for key, value in self.__dict__.iteritems()]
  6387. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  6388. def __eq__(self, other):
  6389. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  6390. def __ne__(self, other):
  6391. return not (self == other)
  6392. class get_partition_args:
  6393. """
  6394. Attributes:
  6395. - db_name
  6396. - tbl_name
  6397. - part_vals
  6398. """
  6399. thrift_spec = (
  6400. None, # 0
  6401. (1, TType.STRING, 'db_name', None, None, ), # 1
  6402. (2, TType.STRING, 'tbl_name', None, None, ), # 2
  6403. (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3
  6404. )
  6405. def __init__(self, db_name=None, tbl_name=None, part_vals=None,):
  6406. self.db_name = db_name
  6407. self.tbl_name = tbl_name
  6408. self.part_vals = part_vals
  6409. def read(self, iprot):
  6410. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  6411. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  6412. return
  6413. iprot.readStructBegin()
  6414. while True:
  6415. (fname, ftype, fid) = iprot.readFieldBegin()
  6416. if ftype == TType.STOP:
  6417. break
  6418. if fid == 1:
  6419. if ftype == TType.STRING:
  6420. self.db_name = iprot.readString();
  6421. else:
  6422. iprot.skip(ftype)
  6423. elif fid == 2:
  6424. if ftype == TType.STRING:
  6425. self.tbl_name = iprot.readString();
  6426. else:
  6427. iprot.skip(ftype)
  6428. elif fid == 3:
  6429. if ftype == TType.LIST:
  6430. self.part_vals = []
  6431. (_etype242, _size239) = iprot.readListBegin()
  6432. for _i243 in xrange(_size239):
  6433. _elem244 = iprot.readString();
  6434. self.part_vals.append(_elem244)
  6435. iprot.readListEnd()
  6436. else:
  6437. iprot.skip(ftype)
  6438. else:
  6439. iprot.skip(ftype)
  6440. iprot.readFieldEnd()
  6441. iprot.readStructEnd()
  6442. def write(self, oprot):
  6443. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  6444. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  6445. return
  6446. oprot.writeStructBegin('get_partition_args')
  6447. if self.db_name != None:
  6448. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  6449. oprot.writeString(self.db_name)
  6450. oprot.writeFieldEnd()
  6451. if self.tbl_name != None:
  6452. oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
  6453. oprot.writeString(self.tbl_name)
  6454. oprot.writeFieldEnd()
  6455. if self.part_vals != None:
  6456. oprot.writeFieldBegin('part_vals', TType.LIST, 3)
  6457. oprot.writeListBegin(TType.STRING, len(self.part_vals))
  6458. for iter245 in self.part_vals:
  6459. oprot.writeString(iter245)
  6460. oprot.writeListEnd()
  6461. oprot.writeFieldEnd()
  6462. oprot.writeFieldStop()
  6463. oprot.writeStructEnd()
  6464. def validate(self):
  6465. return
  6466. def __repr__(self):
  6467. L = ['%s=%r' % (key, value)
  6468. for key, value in self.__dict__.iteritems()]
  6469. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  6470. def __eq__(self, other):
  6471. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  6472. def __ne__(self, other):
  6473. return not (self == other)
  6474. class get_partition_result:
  6475. """
  6476. Attributes:
  6477. - success
  6478. - o1
  6479. - o2
  6480. """
  6481. thrift_spec = (
  6482. (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0
  6483. (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
  6484. (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2
  6485. )
  6486. def __init__(self, success=None, o1=None, o2=None,):
  6487. self.success = success
  6488. self.o1 = o1
  6489. self.o2 = o2
  6490. def read(self, iprot):
  6491. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  6492. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  6493. return
  6494. iprot.readStructBegin()
  6495. while True:
  6496. (fname, ftype, fid) = iprot.readFieldBegin()
  6497. if ftype == TType.STOP:
  6498. break
  6499. if fid == 0:
  6500. if ftype == TType.STRUCT:
  6501. self.success = Partition()
  6502. self.success.read(iprot)
  6503. else:
  6504. iprot.skip(ftype)
  6505. elif fid == 1:
  6506. if ftype == TType.STRUCT:
  6507. self.o1 = MetaException()
  6508. self.o1.read(iprot)
  6509. else:
  6510. iprot.skip(ftype)
  6511. elif fid == 2:
  6512. if ftype == TType.STRUCT:
  6513. self.o2 = NoSuchObjectException()
  6514. self.o2.read(iprot)
  6515. else:
  6516. iprot.skip(ftype)
  6517. else:
  6518. iprot.skip(ftype)
  6519. iprot.readFieldEnd()
  6520. iprot.readStructEnd()
  6521. def write(self, oprot):
  6522. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  6523. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  6524. return
  6525. oprot.writeStructBegin('get_partition_result')
  6526. if self.success != None:
  6527. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  6528. self.success.write(oprot)
  6529. oprot.writeFieldEnd()
  6530. if self.o1 != None:
  6531. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  6532. self.o1.write(oprot)
  6533. oprot.writeFieldEnd()
  6534. if self.o2 != None:
  6535. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  6536. self.o2.write(oprot)
  6537. oprot.writeFieldEnd()
  6538. oprot.writeFieldStop()
  6539. oprot.writeStructEnd()
  6540. def validate(self):
  6541. return
  6542. def __repr__(self):
  6543. L = ['%s=%r' % (key, value)
  6544. for key, value in self.__dict__.iteritems()]
  6545. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  6546. def __eq__(self, other):
  6547. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  6548. def __ne__(self, other):
  6549. return not (self == other)
  6550. class get_partition_with_auth_args:
  6551. """
  6552. Attributes:
  6553. - db_name
  6554. - tbl_name
  6555. - part_vals
  6556. - user_name
  6557. - group_names
  6558. """
  6559. thrift_spec = (
  6560. None, # 0
  6561. (1, TType.STRING, 'db_name', None, None, ), # 1
  6562. (2, TType.STRING, 'tbl_name', None, None, ), # 2
  6563. (3, TType.LIST, 'part_vals', (TType.STRING,None), None, ), # 3
  6564. (4, TType.STRING, 'user_name', None, None, ), # 4
  6565. (5, TType.LIST, 'group_names', (TType.STRING,None), None, ), # 5
  6566. )
  6567. def __init__(self, db_name=None, tbl_name=None, part_vals=None, user_name=None, group_names=None,):
  6568. self.db_name = db_name
  6569. self.tbl_name = tbl_name
  6570. self.part_vals = part_vals
  6571. self.user_name = user_name
  6572. self.group_names = group_names
  6573. def read(self, iprot):
  6574. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  6575. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  6576. return
  6577. iprot.readStructBegin()
  6578. while True:
  6579. (fname, ftype, fid) = iprot.readFieldBegin()
  6580. if ftype == TType.STOP:
  6581. break
  6582. if fid == 1:
  6583. if ftype == TType.STRING:
  6584. self.db_name = iprot.readString();
  6585. else:
  6586. iprot.skip(ftype)
  6587. elif fid == 2:
  6588. if ftype == TType.STRING:
  6589. self.tbl_name = iprot.readString();
  6590. else:
  6591. iprot.skip(ftype)
  6592. elif fid == 3:
  6593. if ftype == TType.LIST:
  6594. self.part_vals = []
  6595. (_etype249, _size246) = iprot.readListBegin()
  6596. for _i250 in xrange(_size246):
  6597. _elem251 = iprot.readString();
  6598. self.part_vals.append(_elem251)
  6599. iprot.readListEnd()
  6600. else:
  6601. iprot.skip(ftype)
  6602. elif fid == 4:
  6603. if ftype == TType.STRING:
  6604. self.user_name = iprot.readString();
  6605. else:
  6606. iprot.skip(ftype)
  6607. elif fid == 5:
  6608. if ftype == TType.LIST:
  6609. self.group_names = []
  6610. (_etype255, _size252) = iprot.readListBegin()
  6611. for _i256 in xrange(_size252):
  6612. _elem257 = iprot.readString();
  6613. self.group_names.append(_elem257)
  6614. iprot.readListEnd()
  6615. else:
  6616. iprot.skip(ftype)
  6617. else:
  6618. iprot.skip(ftype)
  6619. iprot.readFieldEnd()
  6620. iprot.readStructEnd()
  6621. def write(self, oprot):
  6622. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  6623. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  6624. return
  6625. oprot.writeStructBegin('get_partition_with_auth_args')
  6626. if self.db_name != None:
  6627. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  6628. oprot.writeString(self.db_name)
  6629. oprot.writeFieldEnd()
  6630. if self.tbl_name != None:
  6631. oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
  6632. oprot.writeString(self.tbl_name)
  6633. oprot.writeFieldEnd()
  6634. if self.part_vals != None:
  6635. oprot.writeFieldBegin('part_vals', TType.LIST, 3)
  6636. oprot.writeListBegin(TType.STRING, len(self.part_vals))
  6637. for iter258 in self.part_vals:
  6638. oprot.writeString(iter258)
  6639. oprot.writeListEnd()
  6640. oprot.writeFieldEnd()
  6641. if self.user_name != None:
  6642. oprot.writeFieldBegin('user_name', TType.STRING, 4)
  6643. oprot.writeString(self.user_name)
  6644. oprot.writeFieldEnd()
  6645. if self.group_names != None:
  6646. oprot.writeFieldBegin('group_names', TType.LIST, 5)
  6647. oprot.writeListBegin(TType.STRING, len(self.group_names))
  6648. for iter259 in self.group_names:
  6649. oprot.writeString(iter259)
  6650. oprot.writeListEnd()
  6651. oprot.writeFieldEnd()
  6652. oprot.writeFieldStop()
  6653. oprot.writeStructEnd()
  6654. def validate(self):
  6655. return
  6656. def __repr__(self):
  6657. L = ['%s=%r' % (key, value)
  6658. for key, value in self.__dict__.iteritems()]
  6659. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  6660. def __eq__(self, other):
  6661. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  6662. def __ne__(self, other):
  6663. return not (self == other)
  6664. class get_partition_with_auth_result:
  6665. """
  6666. Attributes:
  6667. - success
  6668. - o1
  6669. - o2
  6670. """
  6671. thrift_spec = (
  6672. (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0
  6673. (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
  6674. (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2
  6675. )
  6676. def __init__(self, success=None, o1=None, o2=None,):
  6677. self.success = success
  6678. self.o1 = o1
  6679. self.o2 = o2
  6680. def read(self, iprot):
  6681. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  6682. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  6683. return
  6684. iprot.readStructBegin()
  6685. while True:
  6686. (fname, ftype, fid) = iprot.readFieldBegin()
  6687. if ftype == TType.STOP:
  6688. break
  6689. if fid == 0:
  6690. if ftype == TType.STRUCT:
  6691. self.success = Partition()
  6692. self.success.read(iprot)
  6693. else:
  6694. iprot.skip(ftype)
  6695. elif fid == 1:
  6696. if ftype == TType.STRUCT:
  6697. self.o1 = MetaException()
  6698. self.o1.read(iprot)
  6699. else:
  6700. iprot.skip(ftype)
  6701. elif fid == 2:
  6702. if ftype == TType.STRUCT:
  6703. self.o2 = NoSuchObjectException()
  6704. self.o2.read(iprot)
  6705. else:
  6706. iprot.skip(ftype)
  6707. else:
  6708. iprot.skip(ftype)
  6709. iprot.readFieldEnd()
  6710. iprot.readStructEnd()
  6711. def write(self, oprot):
  6712. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  6713. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  6714. return
  6715. oprot.writeStructBegin('get_partition_with_auth_result')
  6716. if self.success != None:
  6717. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  6718. self.success.write(oprot)
  6719. oprot.writeFieldEnd()
  6720. if self.o1 != None:
  6721. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  6722. self.o1.write(oprot)
  6723. oprot.writeFieldEnd()
  6724. if self.o2 != None:
  6725. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  6726. self.o2.write(oprot)
  6727. oprot.writeFieldEnd()
  6728. oprot.writeFieldStop()
  6729. oprot.writeStructEnd()
  6730. def validate(self):
  6731. return
  6732. def __repr__(self):
  6733. L = ['%s=%r' % (key, value)
  6734. for key, value in self.__dict__.iteritems()]
  6735. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  6736. def __eq__(self, other):
  6737. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  6738. def __ne__(self, other):
  6739. return not (self == other)
  6740. class get_partition_by_name_args:
  6741. """
  6742. Attributes:
  6743. - db_name
  6744. - tbl_name
  6745. - part_name
  6746. """
  6747. thrift_spec = (
  6748. None, # 0
  6749. (1, TType.STRING, 'db_name', None, None, ), # 1
  6750. (2, TType.STRING, 'tbl_name', None, None, ), # 2
  6751. (3, TType.STRING, 'part_name', None, None, ), # 3
  6752. )
  6753. def __init__(self, db_name=None, tbl_name=None, part_name=None,):
  6754. self.db_name = db_name
  6755. self.tbl_name = tbl_name
  6756. self.part_name = part_name
  6757. def read(self, iprot):
  6758. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  6759. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  6760. return
  6761. iprot.readStructBegin()
  6762. while True:
  6763. (fname, ftype, fid) = iprot.readFieldBegin()
  6764. if ftype == TType.STOP:
  6765. break
  6766. if fid == 1:
  6767. if ftype == TType.STRING:
  6768. self.db_name = iprot.readString();
  6769. else:
  6770. iprot.skip(ftype)
  6771. elif fid == 2:
  6772. if ftype == TType.STRING:
  6773. self.tbl_name = iprot.readString();
  6774. else:
  6775. iprot.skip(ftype)
  6776. elif fid == 3:
  6777. if ftype == TType.STRING:
  6778. self.part_name = iprot.readString();
  6779. else:
  6780. iprot.skip(ftype)
  6781. else:
  6782. iprot.skip(ftype)
  6783. iprot.readFieldEnd()
  6784. iprot.readStructEnd()
  6785. def write(self, oprot):
  6786. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  6787. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  6788. return
  6789. oprot.writeStructBegin('get_partition_by_name_args')
  6790. if self.db_name != None:
  6791. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  6792. oprot.writeString(self.db_name)
  6793. oprot.writeFieldEnd()
  6794. if self.tbl_name != None:
  6795. oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
  6796. oprot.writeString(self.tbl_name)
  6797. oprot.writeFieldEnd()
  6798. if self.part_name != None:
  6799. oprot.writeFieldBegin('part_name', TType.STRING, 3)
  6800. oprot.writeString(self.part_name)
  6801. oprot.writeFieldEnd()
  6802. oprot.writeFieldStop()
  6803. oprot.writeStructEnd()
  6804. def validate(self):
  6805. return
  6806. def __repr__(self):
  6807. L = ['%s=%r' % (key, value)
  6808. for key, value in self.__dict__.iteritems()]
  6809. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  6810. def __eq__(self, other):
  6811. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  6812. def __ne__(self, other):
  6813. return not (self == other)
  6814. class get_partition_by_name_result:
  6815. """
  6816. Attributes:
  6817. - success
  6818. - o1
  6819. - o2
  6820. """
  6821. thrift_spec = (
  6822. (0, TType.STRUCT, 'success', (Partition, Partition.thrift_spec), None, ), # 0
  6823. (1, TType.STRUCT, 'o1', (MetaException, MetaException.thrift_spec), None, ), # 1
  6824. (2, TType.STRUCT, 'o2', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 2
  6825. )
  6826. def __init__(self, success=None, o1=None, o2=None,):
  6827. self.success = success
  6828. self.o1 = o1
  6829. self.o2 = o2
  6830. def read(self, iprot):
  6831. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  6832. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  6833. return
  6834. iprot.readStructBegin()
  6835. while True:
  6836. (fname, ftype, fid) = iprot.readFieldBegin()
  6837. if ftype == TType.STOP:
  6838. break
  6839. if fid == 0:
  6840. if ftype == TType.STRUCT:
  6841. self.success = Partition()
  6842. self.success.read(iprot)
  6843. else:
  6844. iprot.skip(ftype)
  6845. elif fid == 1:
  6846. if ftype == TType.STRUCT:
  6847. self.o1 = MetaException()
  6848. self.o1.read(iprot)
  6849. else:
  6850. iprot.skip(ftype)
  6851. elif fid == 2:
  6852. if ftype == TType.STRUCT:
  6853. self.o2 = NoSuchObjectException()
  6854. self.o2.read(iprot)
  6855. else:
  6856. iprot.skip(ftype)
  6857. else:
  6858. iprot.skip(ftype)
  6859. iprot.readFieldEnd()
  6860. iprot.readStructEnd()
  6861. def write(self, oprot):
  6862. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  6863. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  6864. return
  6865. oprot.writeStructBegin('get_partition_by_name_result')
  6866. if self.success != None:
  6867. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  6868. self.success.write(oprot)
  6869. oprot.writeFieldEnd()
  6870. if self.o1 != None:
  6871. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  6872. self.o1.write(oprot)
  6873. oprot.writeFieldEnd()
  6874. if self.o2 != None:
  6875. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  6876. self.o2.write(oprot)
  6877. oprot.writeFieldEnd()
  6878. oprot.writeFieldStop()
  6879. oprot.writeStructEnd()
  6880. def validate(self):
  6881. return
  6882. def __repr__(self):
  6883. L = ['%s=%r' % (key, value)
  6884. for key, value in self.__dict__.iteritems()]
  6885. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  6886. def __eq__(self, other):
  6887. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  6888. def __ne__(self, other):
  6889. return not (self == other)
  6890. class get_partitions_args:
  6891. """
  6892. Attributes:
  6893. - db_name
  6894. - tbl_name
  6895. - max_parts
  6896. """
  6897. thrift_spec = (
  6898. None, # 0
  6899. (1, TType.STRING, 'db_name', None, None, ), # 1
  6900. (2, TType.STRING, 'tbl_name', None, None, ), # 2
  6901. (3, TType.I16, 'max_parts', None, -1, ), # 3
  6902. )
  6903. def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4],):
  6904. self.db_name = db_name
  6905. self.tbl_name = tbl_name
  6906. self.max_parts = max_parts
  6907. def read(self, iprot):
  6908. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  6909. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  6910. return
  6911. iprot.readStructBegin()
  6912. while True:
  6913. (fname, ftype, fid) = iprot.readFieldBegin()
  6914. if ftype == TType.STOP:
  6915. break
  6916. if fid == 1:
  6917. if ftype == TType.STRING:
  6918. self.db_name = iprot.readString();
  6919. else:
  6920. iprot.skip(ftype)
  6921. elif fid == 2:
  6922. if ftype == TType.STRING:
  6923. self.tbl_name = iprot.readString();
  6924. else:
  6925. iprot.skip(ftype)
  6926. elif fid == 3:
  6927. if ftype == TType.I16:
  6928. self.max_parts = iprot.readI16();
  6929. else:
  6930. iprot.skip(ftype)
  6931. else:
  6932. iprot.skip(ftype)
  6933. iprot.readFieldEnd()
  6934. iprot.readStructEnd()
  6935. def write(self, oprot):
  6936. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  6937. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  6938. return
  6939. oprot.writeStructBegin('get_partitions_args')
  6940. if self.db_name != None:
  6941. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  6942. oprot.writeString(self.db_name)
  6943. oprot.writeFieldEnd()
  6944. if self.tbl_name != None:
  6945. oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
  6946. oprot.writeString(self.tbl_name)
  6947. oprot.writeFieldEnd()
  6948. if self.max_parts != None:
  6949. oprot.writeFieldBegin('max_parts', TType.I16, 3)
  6950. oprot.writeI16(self.max_parts)
  6951. oprot.writeFieldEnd()
  6952. oprot.writeFieldStop()
  6953. oprot.writeStructEnd()
  6954. def validate(self):
  6955. return
  6956. def __repr__(self):
  6957. L = ['%s=%r' % (key, value)
  6958. for key, value in self.__dict__.iteritems()]
  6959. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  6960. def __eq__(self, other):
  6961. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  6962. def __ne__(self, other):
  6963. return not (self == other)
  6964. class get_partitions_result:
  6965. """
  6966. Attributes:
  6967. - success
  6968. - o1
  6969. - o2
  6970. """
  6971. thrift_spec = (
  6972. (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0
  6973. (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1
  6974. (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2
  6975. )
  6976. def __init__(self, success=None, o1=None, o2=None,):
  6977. self.success = success
  6978. self.o1 = o1
  6979. self.o2 = o2
  6980. def read(self, iprot):
  6981. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  6982. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  6983. return
  6984. iprot.readStructBegin()
  6985. while True:
  6986. (fname, ftype, fid) = iprot.readFieldBegin()
  6987. if ftype == TType.STOP:
  6988. break
  6989. if fid == 0:
  6990. if ftype == TType.LIST:
  6991. self.success = []
  6992. (_etype263, _size260) = iprot.readListBegin()
  6993. for _i264 in xrange(_size260):
  6994. _elem265 = Partition()
  6995. _elem265.read(iprot)
  6996. self.success.append(_elem265)
  6997. iprot.readListEnd()
  6998. else:
  6999. iprot.skip(ftype)
  7000. elif fid == 1:
  7001. if ftype == TType.STRUCT:
  7002. self.o1 = NoSuchObjectException()
  7003. self.o1.read(iprot)
  7004. else:
  7005. iprot.skip(ftype)
  7006. elif fid == 2:
  7007. if ftype == TType.STRUCT:
  7008. self.o2 = MetaException()
  7009. self.o2.read(iprot)
  7010. else:
  7011. iprot.skip(ftype)
  7012. else:
  7013. iprot.skip(ftype)
  7014. iprot.readFieldEnd()
  7015. iprot.readStructEnd()
  7016. def write(self, oprot):
  7017. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  7018. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  7019. return
  7020. oprot.writeStructBegin('get_partitions_result')
  7021. if self.success != None:
  7022. oprot.writeFieldBegin('success', TType.LIST, 0)
  7023. oprot.writeListBegin(TType.STRUCT, len(self.success))
  7024. for iter266 in self.success:
  7025. iter266.write(oprot)
  7026. oprot.writeListEnd()
  7027. oprot.writeFieldEnd()
  7028. if self.o1 != None:
  7029. oprot.writeFieldBegin('o1', TType.STRUCT, 1)
  7030. self.o1.write(oprot)
  7031. oprot.writeFieldEnd()
  7032. if self.o2 != None:
  7033. oprot.writeFieldBegin('o2', TType.STRUCT, 2)
  7034. self.o2.write(oprot)
  7035. oprot.writeFieldEnd()
  7036. oprot.writeFieldStop()
  7037. oprot.writeStructEnd()
  7038. def validate(self):
  7039. return
  7040. def __repr__(self):
  7041. L = ['%s=%r' % (key, value)
  7042. for key, value in self.__dict__.iteritems()]
  7043. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  7044. def __eq__(self, other):
  7045. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  7046. def __ne__(self, other):
  7047. return not (self == other)
  7048. class get_partitions_with_auth_args:
  7049. """
  7050. Attributes:
  7051. - db_name
  7052. - tbl_name
  7053. - max_parts
  7054. - user_name
  7055. - group_names
  7056. """
  7057. thrift_spec = (
  7058. None, # 0
  7059. (1, TType.STRING, 'db_name', None, None, ), # 1
  7060. (2, TType.STRING, 'tbl_name', None, None, ), # 2
  7061. (3, TType.I16, 'max_parts', None, -1, ), # 3
  7062. (4, TType.STRING, 'user_name', None, None, ), # 4
  7063. (5, TType.LIST, 'group_names', (TType.STRING,None), None, ), # 5
  7064. )
  7065. def __init__(self, db_name=None, tbl_name=None, max_parts=thrift_spec[3][4], user_name=None, group_names=None,):
  7066. self.db_name = db_name
  7067. self.tbl_name = tbl_name
  7068. self.max_parts = max_parts
  7069. self.user_name = user_name
  7070. self.group_names = group_names
  7071. def read(self, iprot):
  7072. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  7073. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  7074. return
  7075. iprot.readStructBegin()
  7076. while True:
  7077. (fname, ftype, fid) = iprot.readFieldBegin()
  7078. if ftype == TType.STOP:
  7079. break
  7080. if fid == 1:
  7081. if ftype == TType.STRING:
  7082. self.db_name = iprot.readString();
  7083. else:
  7084. iprot.skip(ftype)
  7085. elif fid == 2:
  7086. if ftype == TType.STRING:
  7087. self.tbl_name = iprot.readString();
  7088. else:
  7089. iprot.skip(ftype)
  7090. elif fid == 3:
  7091. if ftype == TType.I16:
  7092. self.max_parts = iprot.readI16();
  7093. else:
  7094. iprot.skip(ftype)
  7095. elif fid == 4:
  7096. if ftype == TType.STRING:
  7097. self.user_name = iprot.readString();
  7098. else:
  7099. iprot.skip(ftype)
  7100. elif fid == 5:
  7101. if ftype == TType.LIST:
  7102. self.group_names = []
  7103. (_etype270, _size267) = iprot.readListBegin()
  7104. for _i271 in xrange(_size267):
  7105. _elem272 = iprot.readString();
  7106. self.group_names.append(_elem272)
  7107. iprot.readListEnd()
  7108. else:
  7109. iprot.skip(ftype)
  7110. else:
  7111. iprot.skip(ftype)
  7112. iprot.readFieldEnd()
  7113. iprot.readStructEnd()
  7114. def write(self, oprot):
  7115. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  7116. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  7117. return
  7118. oprot.writeStructBegin('get_partitions_with_auth_args')
  7119. if self.db_name != None:
  7120. oprot.writeFieldBegin('db_name', TType.STRING, 1)
  7121. oprot.writeString(self.db_name)
  7122. oprot.writeFieldEnd()
  7123. if self.tbl_name != None:
  7124. oprot.writeFieldBegin('tbl_name', TType.STRING, 2)
  7125. oprot.writeString(self.tbl_name)
  7126. oprot.writeFieldEnd()
  7127. if self.max_parts != None:
  7128. oprot.writeFieldBegin('max_parts', TType.I16, 3)
  7129. oprot.writeI16(self.max_parts)
  7130. oprot.writeFieldEnd()
  7131. if self.user_name != None:
  7132. oprot.writeFieldBegin('user_name', TType.STRING, 4)
  7133. oprot.writeString(self.user_name)
  7134. oprot.writeFieldEnd()
  7135. if self.group_names != None:
  7136. oprot.writeFieldBegin('group_names', TType.LIST, 5)
  7137. oprot.writeListBegin(TType.STRING, len(self.group_names))
  7138. for iter273 in self.group_names:
  7139. oprot.writeString(iter273)
  7140. oprot.writeListEnd()
  7141. oprot.writeFieldEnd()
  7142. oprot.writeFieldStop()
  7143. oprot.writeStructEnd()
  7144. def validate(self):
  7145. return
  7146. def __repr__(self):
  7147. L = ['%s=%r' % (key, value)
  7148. for key, value in self.__dict__.iteritems()]
  7149. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  7150. def __eq__(self, other):
  7151. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  7152. def __ne__(self, other):
  7153. return not (self == other)
  7154. class get_partitions_with_auth_result:
  7155. """
  7156. Attributes:
  7157. - success
  7158. - o1
  7159. - o2
  7160. """
  7161. thrift_spec = (
  7162. (0, TType.LIST, 'success', (TType.STRUCT,(Partition, Partition.thrift_spec)), None, ), # 0
  7163. (1, TType.STRUCT, 'o1', (NoSuchObjectException, NoSuchObjectException.thrift_spec), None, ), # 1
  7164. (2, TType.STRUCT, 'o2', (MetaException, MetaException.thrift_spec), None, ), # 2
  7165. )
  7166. def __init__(self, success=None, o1=None, o2=None,):
  7167. self.success = success
  7168. self.o1 = o1
  7169. self.o2 = o2
  7170. def read(self, iprot):
  7171. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  7172. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  7173. return
  7174. iprot.readStructBegin()
  7175. while True:
  7176. (fname, ftype, fid) = iprot.readFieldBegin()
  7177. if ftype == TType.STOP:
  7178. break
  7179. if fid == 0:
  7180. if ftype == TType.LIST:
  7181. self.success = []
  7182. (_etype277, _size274) = iprot.readListBegin()
  7183. for _i278 in xrange(_size274):
  7184. _elem279 = Partition()
  7185. _elem279.read(iprot)
  7186. self.s