| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296 |
- #
- # Autogenerated by Thrift Compiler (0.9.0)
- #
- # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
- #
- # options string: py:new_style
- #
- from thrift.Thrift import TType, TMessageType, TException, TApplicationException
- from ttypes import *
- from thrift.Thrift import TProcessor
- from thrift.transport import TTransport
- from thrift.protocol import TBinaryProtocol, TProtocol
- try:
- from thrift.protocol import fastbinary
- except:
- fastbinary = None
- class Iface(object):
- def query(self, query):
- """
- Submit a query and return a handle (QueryHandle). The query runs asynchronously.
- Parameters:
- - query
- """
- pass
- def executeAndWait(self, query, clientCtx):
- """
- run a query synchronously and return a handle (QueryHandle).
- Parameters:
- - query
- - clientCtx
- """
- pass
- def explain(self, query):
- """
- Get the query plan for a query.
- Parameters:
- - query
- """
- pass
- def fetch(self, query_id, start_over, fetch_size):
- """
- Get the results of a query. This is non-blocking. Caller should check
- Results.ready to determine if the results are in yet. The call requests
- the batch size of fetch.
- Parameters:
- - query_id
- - start_over
- - fetch_size
- """
- pass
- def get_state(self, handle):
- """
- Get the state of the query
- Parameters:
- - handle
- """
- pass
- def get_results_metadata(self, handle):
- """
- Get the result metadata
- Parameters:
- - handle
- """
- pass
- def echo(self, s):
- """
- Used to test connection to server. A "noop" command.
- Parameters:
- - s
- """
- pass
- def dump_config(self, ):
- """
- Returns a string representation of the configuration object being used.
- Handy for debugging.
- """
- pass
- def get_log(self, context):
- """
- Get the log messages related to the given context.
- Parameters:
- - context
- """
- pass
- def get_default_configuration(self, include_hadoop):
- """
- Parameters:
- - include_hadoop
- """
- pass
- def close(self, handle):
- """
- Parameters:
- - handle
- """
- pass
- def clean(self, log_context):
- """
- Parameters:
- - log_context
- """
- pass
- class Client(Iface):
- def __init__(self, iprot, oprot=None):
- self._iprot = self._oprot = iprot
- if oprot is not None:
- self._oprot = oprot
- self._seqid = 0
- def query(self, query):
- """
- Submit a query and return a handle (QueryHandle). The query runs asynchronously.
- Parameters:
- - query
- """
- self.send_query(query)
- return self.recv_query()
- def send_query(self, query):
- self._oprot.writeMessageBegin('query', TMessageType.CALL, self._seqid)
- args = query_args()
- args.query = query
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
- def recv_query(self, ):
- (fname, mtype, rseqid) = self._iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(self._iprot)
- self._iprot.readMessageEnd()
- raise x
- result = query_result()
- result.read(self._iprot)
- self._iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- if result.error is not None:
- raise result.error
- raise TApplicationException(TApplicationException.MISSING_RESULT, "query failed: unknown result");
- def executeAndWait(self, query, clientCtx):
- """
- run a query synchronously and return a handle (QueryHandle).
- Parameters:
- - query
- - clientCtx
- """
- self.send_executeAndWait(query, clientCtx)
- return self.recv_executeAndWait()
- def send_executeAndWait(self, query, clientCtx):
- self._oprot.writeMessageBegin('executeAndWait', TMessageType.CALL, self._seqid)
- args = executeAndWait_args()
- args.query = query
- args.clientCtx = clientCtx
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
- def recv_executeAndWait(self, ):
- (fname, mtype, rseqid) = self._iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(self._iprot)
- self._iprot.readMessageEnd()
- raise x
- result = executeAndWait_result()
- result.read(self._iprot)
- self._iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- if result.error is not None:
- raise result.error
- raise TApplicationException(TApplicationException.MISSING_RESULT, "executeAndWait failed: unknown result");
- def explain(self, query):
- """
- Get the query plan for a query.
- Parameters:
- - query
- """
- self.send_explain(query)
- return self.recv_explain()
- def send_explain(self, query):
- self._oprot.writeMessageBegin('explain', TMessageType.CALL, self._seqid)
- args = explain_args()
- args.query = query
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
- def recv_explain(self, ):
- (fname, mtype, rseqid) = self._iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(self._iprot)
- self._iprot.readMessageEnd()
- raise x
- result = explain_result()
- result.read(self._iprot)
- self._iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- if result.error is not None:
- raise result.error
- raise TApplicationException(TApplicationException.MISSING_RESULT, "explain failed: unknown result");
- def fetch(self, query_id, start_over, fetch_size):
- """
- Get the results of a query. This is non-blocking. Caller should check
- Results.ready to determine if the results are in yet. The call requests
- the batch size of fetch.
- Parameters:
- - query_id
- - start_over
- - fetch_size
- """
- self.send_fetch(query_id, start_over, fetch_size)
- return self.recv_fetch()
- def send_fetch(self, query_id, start_over, fetch_size):
- self._oprot.writeMessageBegin('fetch', TMessageType.CALL, self._seqid)
- args = fetch_args()
- args.query_id = query_id
- args.start_over = start_over
- args.fetch_size = fetch_size
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
- def recv_fetch(self, ):
- (fname, mtype, rseqid) = self._iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(self._iprot)
- self._iprot.readMessageEnd()
- raise x
- result = fetch_result()
- result.read(self._iprot)
- self._iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- if result.error is not None:
- raise result.error
- if result.error2 is not None:
- raise result.error2
- raise TApplicationException(TApplicationException.MISSING_RESULT, "fetch failed: unknown result");
- def get_state(self, handle):
- """
- Get the state of the query
- Parameters:
- - handle
- """
- self.send_get_state(handle)
- return self.recv_get_state()
- def send_get_state(self, handle):
- self._oprot.writeMessageBegin('get_state', TMessageType.CALL, self._seqid)
- args = get_state_args()
- args.handle = handle
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
- def recv_get_state(self, ):
- (fname, mtype, rseqid) = self._iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(self._iprot)
- self._iprot.readMessageEnd()
- raise x
- result = get_state_result()
- result.read(self._iprot)
- self._iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- if result.error is not None:
- raise result.error
- raise TApplicationException(TApplicationException.MISSING_RESULT, "get_state failed: unknown result");
- def get_results_metadata(self, handle):
- """
- Get the result metadata
- Parameters:
- - handle
- """
- self.send_get_results_metadata(handle)
- return self.recv_get_results_metadata()
- def send_get_results_metadata(self, handle):
- self._oprot.writeMessageBegin('get_results_metadata', TMessageType.CALL, self._seqid)
- args = get_results_metadata_args()
- args.handle = handle
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
- def recv_get_results_metadata(self, ):
- (fname, mtype, rseqid) = self._iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(self._iprot)
- self._iprot.readMessageEnd()
- raise x
- result = get_results_metadata_result()
- result.read(self._iprot)
- self._iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- if result.error is not None:
- raise result.error
- raise TApplicationException(TApplicationException.MISSING_RESULT, "get_results_metadata failed: unknown result");
- def echo(self, s):
- """
- Used to test connection to server. A "noop" command.
- Parameters:
- - s
- """
- self.send_echo(s)
- return self.recv_echo()
- def send_echo(self, s):
- self._oprot.writeMessageBegin('echo', TMessageType.CALL, self._seqid)
- args = echo_args()
- args.s = s
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
- def recv_echo(self, ):
- (fname, mtype, rseqid) = self._iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(self._iprot)
- self._iprot.readMessageEnd()
- raise x
- result = echo_result()
- result.read(self._iprot)
- self._iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- raise TApplicationException(TApplicationException.MISSING_RESULT, "echo failed: unknown result");
- def dump_config(self, ):
- """
- Returns a string representation of the configuration object being used.
- Handy for debugging.
- """
- self.send_dump_config()
- return self.recv_dump_config()
- def send_dump_config(self, ):
- self._oprot.writeMessageBegin('dump_config', TMessageType.CALL, self._seqid)
- args = dump_config_args()
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
- def recv_dump_config(self, ):
- (fname, mtype, rseqid) = self._iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(self._iprot)
- self._iprot.readMessageEnd()
- raise x
- result = dump_config_result()
- result.read(self._iprot)
- self._iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- raise TApplicationException(TApplicationException.MISSING_RESULT, "dump_config failed: unknown result");
- def get_log(self, context):
- """
- Get the log messages related to the given context.
- Parameters:
- - context
- """
- self.send_get_log(context)
- return self.recv_get_log()
- def send_get_log(self, context):
- self._oprot.writeMessageBegin('get_log', TMessageType.CALL, self._seqid)
- args = get_log_args()
- args.context = context
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
- def recv_get_log(self, ):
- (fname, mtype, rseqid) = self._iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(self._iprot)
- self._iprot.readMessageEnd()
- raise x
- result = get_log_result()
- result.read(self._iprot)
- self._iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- if result.error is not None:
- raise result.error
- raise TApplicationException(TApplicationException.MISSING_RESULT, "get_log failed: unknown result");
- def get_default_configuration(self, include_hadoop):
- """
- Parameters:
- - include_hadoop
- """
- self.send_get_default_configuration(include_hadoop)
- return self.recv_get_default_configuration()
- def send_get_default_configuration(self, include_hadoop):
- self._oprot.writeMessageBegin('get_default_configuration', TMessageType.CALL, self._seqid)
- args = get_default_configuration_args()
- args.include_hadoop = include_hadoop
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
- def recv_get_default_configuration(self, ):
- (fname, mtype, rseqid) = self._iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(self._iprot)
- self._iprot.readMessageEnd()
- raise x
- result = get_default_configuration_result()
- result.read(self._iprot)
- self._iprot.readMessageEnd()
- if result.success is not None:
- return result.success
- raise TApplicationException(TApplicationException.MISSING_RESULT, "get_default_configuration failed: unknown result");
- def close(self, handle):
- """
- Parameters:
- - handle
- """
- self.send_close(handle)
- self.recv_close()
- def send_close(self, handle):
- self._oprot.writeMessageBegin('close', TMessageType.CALL, self._seqid)
- args = close_args()
- args.handle = handle
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
- def recv_close(self, ):
- (fname, mtype, rseqid) = self._iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(self._iprot)
- self._iprot.readMessageEnd()
- raise x
- result = close_result()
- result.read(self._iprot)
- self._iprot.readMessageEnd()
- if result.error is not None:
- raise result.error
- if result.error2 is not None:
- raise result.error2
- return
- def clean(self, log_context):
- """
- Parameters:
- - log_context
- """
- self.send_clean(log_context)
- self.recv_clean()
- def send_clean(self, log_context):
- self._oprot.writeMessageBegin('clean', TMessageType.CALL, self._seqid)
- args = clean_args()
- args.log_context = log_context
- args.write(self._oprot)
- self._oprot.writeMessageEnd()
- self._oprot.trans.flush()
- def recv_clean(self, ):
- (fname, mtype, rseqid) = self._iprot.readMessageBegin()
- if mtype == TMessageType.EXCEPTION:
- x = TApplicationException()
- x.read(self._iprot)
- self._iprot.readMessageEnd()
- raise x
- result = clean_result()
- result.read(self._iprot)
- self._iprot.readMessageEnd()
- return
- class Processor(Iface, TProcessor):
- def __init__(self, handler):
- self._handler = handler
- self._processMap = {}
- self._processMap["query"] = Processor.process_query
- self._processMap["executeAndWait"] = Processor.process_executeAndWait
- self._processMap["explain"] = Processor.process_explain
- self._processMap["fetch"] = Processor.process_fetch
- self._processMap["get_state"] = Processor.process_get_state
- self._processMap["get_results_metadata"] = Processor.process_get_results_metadata
- self._processMap["echo"] = Processor.process_echo
- self._processMap["dump_config"] = Processor.process_dump_config
- self._processMap["get_log"] = Processor.process_get_log
- self._processMap["get_default_configuration"] = Processor.process_get_default_configuration
- self._processMap["close"] = Processor.process_close
- self._processMap["clean"] = Processor.process_clean
- def process(self, iprot, oprot):
- (name, type, seqid) = iprot.readMessageBegin()
- if name not in self._processMap:
- iprot.skip(TType.STRUCT)
- iprot.readMessageEnd()
- x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
- oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
- x.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
- return
- else:
- self._processMap[name](self, seqid, iprot, oprot)
- return True
- def process_query(self, seqid, iprot, oprot):
- args = query_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = query_result()
- try:
- result.success = self._handler.query(args.query)
- except BeeswaxException, error:
- result.error = error
- oprot.writeMessageBegin("query", TMessageType.REPLY, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
- def process_executeAndWait(self, seqid, iprot, oprot):
- args = executeAndWait_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = executeAndWait_result()
- try:
- result.success = self._handler.executeAndWait(args.query, args.clientCtx)
- except BeeswaxException, error:
- result.error = error
- oprot.writeMessageBegin("executeAndWait", TMessageType.REPLY, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
- def process_explain(self, seqid, iprot, oprot):
- args = explain_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = explain_result()
- try:
- result.success = self._handler.explain(args.query)
- except BeeswaxException, error:
- result.error = error
- oprot.writeMessageBegin("explain", TMessageType.REPLY, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
- def process_fetch(self, seqid, iprot, oprot):
- args = fetch_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = fetch_result()
- try:
- result.success = self._handler.fetch(args.query_id, args.start_over, args.fetch_size)
- except QueryNotFoundException, error:
- result.error = error
- except BeeswaxException, error2:
- result.error2 = error2
- oprot.writeMessageBegin("fetch", TMessageType.REPLY, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
- def process_get_state(self, seqid, iprot, oprot):
- args = get_state_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = get_state_result()
- try:
- result.success = self._handler.get_state(args.handle)
- except QueryNotFoundException, error:
- result.error = error
- oprot.writeMessageBegin("get_state", TMessageType.REPLY, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
- def process_get_results_metadata(self, seqid, iprot, oprot):
- args = get_results_metadata_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = get_results_metadata_result()
- try:
- result.success = self._handler.get_results_metadata(args.handle)
- except QueryNotFoundException, error:
- result.error = error
- oprot.writeMessageBegin("get_results_metadata", TMessageType.REPLY, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
- def process_echo(self, seqid, iprot, oprot):
- args = echo_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = echo_result()
- result.success = self._handler.echo(args.s)
- oprot.writeMessageBegin("echo", TMessageType.REPLY, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
- def process_dump_config(self, seqid, iprot, oprot):
- args = dump_config_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = dump_config_result()
- result.success = self._handler.dump_config()
- oprot.writeMessageBegin("dump_config", TMessageType.REPLY, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
- def process_get_log(self, seqid, iprot, oprot):
- args = get_log_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = get_log_result()
- try:
- result.success = self._handler.get_log(args.context)
- except QueryNotFoundException, error:
- result.error = error
- oprot.writeMessageBegin("get_log", TMessageType.REPLY, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
- def process_get_default_configuration(self, seqid, iprot, oprot):
- args = get_default_configuration_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = get_default_configuration_result()
- result.success = self._handler.get_default_configuration(args.include_hadoop)
- oprot.writeMessageBegin("get_default_configuration", TMessageType.REPLY, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
- def process_close(self, seqid, iprot, oprot):
- args = close_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = close_result()
- try:
- self._handler.close(args.handle)
- except QueryNotFoundException, error:
- result.error = error
- except BeeswaxException, error2:
- result.error2 = error2
- oprot.writeMessageBegin("close", TMessageType.REPLY, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
- def process_clean(self, seqid, iprot, oprot):
- args = clean_args()
- args.read(iprot)
- iprot.readMessageEnd()
- result = clean_result()
- self._handler.clean(args.log_context)
- oprot.writeMessageBegin("clean", TMessageType.REPLY, seqid)
- result.write(oprot)
- oprot.writeMessageEnd()
- oprot.trans.flush()
- # HELPER FUNCTIONS AND STRUCTURES
- class query_args(object):
- """
- Attributes:
- - query
- """
- thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'query', (Query, Query.thrift_spec), None, ), # 1
- )
- def __init__(self, query=None,):
- self.query = query
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.query = Query()
- self.query.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('query_args')
- if self.query is not None:
- oprot.writeFieldBegin('query', TType.STRUCT, 1)
- self.query.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
- def __ne__(self, other):
- return not (self == other)
- class query_result(object):
- """
- Attributes:
- - success
- - error
- """
- thrift_spec = (
- (0, TType.STRUCT, 'success', (QueryHandle, QueryHandle.thrift_spec), None, ), # 0
- (1, TType.STRUCT, 'error', (BeeswaxException, BeeswaxException.thrift_spec), None, ), # 1
- )
- def __init__(self, success=None, error=None,):
- self.success = success
- self.error = error
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 0:
- if ftype == TType.STRUCT:
- self.success = QueryHandle()
- self.success.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 1:
- if ftype == TType.STRUCT:
- self.error = BeeswaxException()
- self.error.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('query_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRUCT, 0)
- self.success.write(oprot)
- oprot.writeFieldEnd()
- if self.error is not None:
- oprot.writeFieldBegin('error', TType.STRUCT, 1)
- self.error.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
- def __ne__(self, other):
- return not (self == other)
- class executeAndWait_args(object):
- """
- Attributes:
- - query
- - clientCtx
- """
- thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'query', (Query, Query.thrift_spec), None, ), # 1
- (2, TType.STRING, 'clientCtx', None, None, ), # 2
- )
- def __init__(self, query=None, clientCtx=None,):
- self.query = query
- self.clientCtx = clientCtx
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.query = Query()
- self.query.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRING:
- self.clientCtx = iprot.readString();
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('executeAndWait_args')
- if self.query is not None:
- oprot.writeFieldBegin('query', TType.STRUCT, 1)
- self.query.write(oprot)
- oprot.writeFieldEnd()
- if self.clientCtx is not None:
- oprot.writeFieldBegin('clientCtx', TType.STRING, 2)
- oprot.writeString(self.clientCtx)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
- def __ne__(self, other):
- return not (self == other)
- class executeAndWait_result(object):
- """
- Attributes:
- - success
- - error
- """
- thrift_spec = (
- (0, TType.STRUCT, 'success', (QueryHandle, QueryHandle.thrift_spec), None, ), # 0
- (1, TType.STRUCT, 'error', (BeeswaxException, BeeswaxException.thrift_spec), None, ), # 1
- )
- def __init__(self, success=None, error=None,):
- self.success = success
- self.error = error
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 0:
- if ftype == TType.STRUCT:
- self.success = QueryHandle()
- self.success.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 1:
- if ftype == TType.STRUCT:
- self.error = BeeswaxException()
- self.error.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('executeAndWait_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRUCT, 0)
- self.success.write(oprot)
- oprot.writeFieldEnd()
- if self.error is not None:
- oprot.writeFieldBegin('error', TType.STRUCT, 1)
- self.error.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
- def __ne__(self, other):
- return not (self == other)
- class explain_args(object):
- """
- Attributes:
- - query
- """
- thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'query', (Query, Query.thrift_spec), None, ), # 1
- )
- def __init__(self, query=None,):
- self.query = query
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.query = Query()
- self.query.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('explain_args')
- if self.query is not None:
- oprot.writeFieldBegin('query', TType.STRUCT, 1)
- self.query.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
- def __ne__(self, other):
- return not (self == other)
- class explain_result(object):
- """
- Attributes:
- - success
- - error
- """
- thrift_spec = (
- (0, TType.STRUCT, 'success', (QueryExplanation, QueryExplanation.thrift_spec), None, ), # 0
- (1, TType.STRUCT, 'error', (BeeswaxException, BeeswaxException.thrift_spec), None, ), # 1
- )
- def __init__(self, success=None, error=None,):
- self.success = success
- self.error = error
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 0:
- if ftype == TType.STRUCT:
- self.success = QueryExplanation()
- self.success.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 1:
- if ftype == TType.STRUCT:
- self.error = BeeswaxException()
- self.error.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('explain_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRUCT, 0)
- self.success.write(oprot)
- oprot.writeFieldEnd()
- if self.error is not None:
- oprot.writeFieldBegin('error', TType.STRUCT, 1)
- self.error.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
- def __ne__(self, other):
- return not (self == other)
- class fetch_args(object):
- """
- Attributes:
- - query_id
- - start_over
- - fetch_size
- """
- thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'query_id', (QueryHandle, QueryHandle.thrift_spec), None, ), # 1
- (2, TType.BOOL, 'start_over', None, None, ), # 2
- (3, TType.I32, 'fetch_size', None, -1, ), # 3
- )
- def __init__(self, query_id=None, start_over=None, fetch_size=thrift_spec[3][4],):
- self.query_id = query_id
- self.start_over = start_over
- self.fetch_size = fetch_size
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.query_id = QueryHandle()
- self.query_id.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.BOOL:
- self.start_over = iprot.readBool();
- else:
- iprot.skip(ftype)
- elif fid == 3:
- if ftype == TType.I32:
- self.fetch_size = iprot.readI32();
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('fetch_args')
- if self.query_id is not None:
- oprot.writeFieldBegin('query_id', TType.STRUCT, 1)
- self.query_id.write(oprot)
- oprot.writeFieldEnd()
- if self.start_over is not None:
- oprot.writeFieldBegin('start_over', TType.BOOL, 2)
- oprot.writeBool(self.start_over)
- oprot.writeFieldEnd()
- if self.fetch_size is not None:
- oprot.writeFieldBegin('fetch_size', TType.I32, 3)
- oprot.writeI32(self.fetch_size)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
- def __ne__(self, other):
- return not (self == other)
- class fetch_result(object):
- """
- Attributes:
- - success
- - error
- - error2
- """
- thrift_spec = (
- (0, TType.STRUCT, 'success', (Results, Results.thrift_spec), None, ), # 0
- (1, TType.STRUCT, 'error', (QueryNotFoundException, QueryNotFoundException.thrift_spec), None, ), # 1
- (2, TType.STRUCT, 'error2', (BeeswaxException, BeeswaxException.thrift_spec), None, ), # 2
- )
- def __init__(self, success=None, error=None, error2=None,):
- self.success = success
- self.error = error
- self.error2 = error2
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 0:
- if ftype == TType.STRUCT:
- self.success = Results()
- self.success.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 1:
- if ftype == TType.STRUCT:
- self.error = QueryNotFoundException()
- self.error.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRUCT:
- self.error2 = BeeswaxException()
- self.error2.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('fetch_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRUCT, 0)
- self.success.write(oprot)
- oprot.writeFieldEnd()
- if self.error is not None:
- oprot.writeFieldBegin('error', TType.STRUCT, 1)
- self.error.write(oprot)
- oprot.writeFieldEnd()
- if self.error2 is not None:
- oprot.writeFieldBegin('error2', TType.STRUCT, 2)
- self.error2.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
- def __ne__(self, other):
- return not (self == other)
- class get_state_args(object):
- """
- Attributes:
- - handle
- """
- thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'handle', (QueryHandle, QueryHandle.thrift_spec), None, ), # 1
- )
- def __init__(self, handle=None,):
- self.handle = handle
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.handle = QueryHandle()
- self.handle.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('get_state_args')
- if self.handle is not None:
- oprot.writeFieldBegin('handle', TType.STRUCT, 1)
- self.handle.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
- def __ne__(self, other):
- return not (self == other)
- class get_state_result(object):
- """
- Attributes:
- - success
- - error
- """
- thrift_spec = (
- (0, TType.I32, 'success', None, None, ), # 0
- (1, TType.STRUCT, 'error', (QueryNotFoundException, QueryNotFoundException.thrift_spec), None, ), # 1
- )
- def __init__(self, success=None, error=None,):
- self.success = success
- self.error = error
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 0:
- if ftype == TType.I32:
- self.success = iprot.readI32();
- else:
- iprot.skip(ftype)
- elif fid == 1:
- if ftype == TType.STRUCT:
- self.error = QueryNotFoundException()
- self.error.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('get_state_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.I32, 0)
- oprot.writeI32(self.success)
- oprot.writeFieldEnd()
- if self.error is not None:
- oprot.writeFieldBegin('error', TType.STRUCT, 1)
- self.error.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
- def __ne__(self, other):
- return not (self == other)
- class get_results_metadata_args(object):
- """
- Attributes:
- - handle
- """
- thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'handle', (QueryHandle, QueryHandle.thrift_spec), None, ), # 1
- )
- def __init__(self, handle=None,):
- self.handle = handle
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.handle = QueryHandle()
- self.handle.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('get_results_metadata_args')
- if self.handle is not None:
- oprot.writeFieldBegin('handle', TType.STRUCT, 1)
- self.handle.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
- def __ne__(self, other):
- return not (self == other)
- class get_results_metadata_result(object):
- """
- Attributes:
- - success
- - error
- """
- thrift_spec = (
- (0, TType.STRUCT, 'success', (ResultsMetadata, ResultsMetadata.thrift_spec), None, ), # 0
- (1, TType.STRUCT, 'error', (QueryNotFoundException, QueryNotFoundException.thrift_spec), None, ), # 1
- )
- def __init__(self, success=None, error=None,):
- self.success = success
- self.error = error
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 0:
- if ftype == TType.STRUCT:
- self.success = ResultsMetadata()
- self.success.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 1:
- if ftype == TType.STRUCT:
- self.error = QueryNotFoundException()
- self.error.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('get_results_metadata_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRUCT, 0)
- self.success.write(oprot)
- oprot.writeFieldEnd()
- if self.error is not None:
- oprot.writeFieldBegin('error', TType.STRUCT, 1)
- self.error.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
- def __ne__(self, other):
- return not (self == other)
- class echo_args(object):
- """
- Attributes:
- - s
- """
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 's', None, None, ), # 1
- )
- def __init__(self, s=None,):
- self.s = s
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.s = iprot.readString();
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('echo_args')
- if self.s is not None:
- oprot.writeFieldBegin('s', TType.STRING, 1)
- oprot.writeString(self.s)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
- def __ne__(self, other):
- return not (self == other)
- class echo_result(object):
- """
- Attributes:
- - success
- """
- thrift_spec = (
- (0, TType.STRING, 'success', None, None, ), # 0
- )
- def __init__(self, success=None,):
- self.success = success
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 0:
- if ftype == TType.STRING:
- self.success = iprot.readString();
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('echo_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRING, 0)
- oprot.writeString(self.success)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
- def __ne__(self, other):
- return not (self == other)
- class dump_config_args(object):
- thrift_spec = (
- )
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('dump_config_args')
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
- def __ne__(self, other):
- return not (self == other)
- class dump_config_result(object):
- """
- Attributes:
- - success
- """
- thrift_spec = (
- (0, TType.STRING, 'success', None, None, ), # 0
- )
- def __init__(self, success=None,):
- self.success = success
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 0:
- if ftype == TType.STRING:
- self.success = iprot.readString();
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('dump_config_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRING, 0)
- oprot.writeString(self.success)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
- def __ne__(self, other):
- return not (self == other)
- class get_log_args(object):
- """
- Attributes:
- - context
- """
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'context', None, None, ), # 1
- )
- def __init__(self, context=None,):
- self.context = context
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.context = iprot.readString();
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('get_log_args')
- if self.context is not None:
- oprot.writeFieldBegin('context', TType.STRING, 1)
- oprot.writeString(self.context)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
- def __ne__(self, other):
- return not (self == other)
- class get_log_result(object):
- """
- Attributes:
- - success
- - error
- """
- thrift_spec = (
- (0, TType.STRING, 'success', None, None, ), # 0
- (1, TType.STRUCT, 'error', (QueryNotFoundException, QueryNotFoundException.thrift_spec), None, ), # 1
- )
- def __init__(self, success=None, error=None,):
- self.success = success
- self.error = error
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 0:
- if ftype == TType.STRING:
- self.success = iprot.readString();
- else:
- iprot.skip(ftype)
- elif fid == 1:
- if ftype == TType.STRUCT:
- self.error = QueryNotFoundException()
- self.error.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('get_log_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.STRING, 0)
- oprot.writeString(self.success)
- oprot.writeFieldEnd()
- if self.error is not None:
- oprot.writeFieldBegin('error', TType.STRUCT, 1)
- self.error.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
- def __ne__(self, other):
- return not (self == other)
- class get_default_configuration_args(object):
- """
- Attributes:
- - include_hadoop
- """
- thrift_spec = (
- None, # 0
- (1, TType.BOOL, 'include_hadoop', None, None, ), # 1
- )
- def __init__(self, include_hadoop=None,):
- self.include_hadoop = include_hadoop
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.BOOL:
- self.include_hadoop = iprot.readBool();
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('get_default_configuration_args')
- if self.include_hadoop is not None:
- oprot.writeFieldBegin('include_hadoop', TType.BOOL, 1)
- oprot.writeBool(self.include_hadoop)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
- def __ne__(self, other):
- return not (self == other)
- class get_default_configuration_result(object):
- """
- Attributes:
- - success
- """
- thrift_spec = (
- (0, TType.LIST, 'success', (TType.STRUCT,(ConfigVariable, ConfigVariable.thrift_spec)), None, ), # 0
- )
- def __init__(self, success=None,):
- self.success = success
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 0:
- if ftype == TType.LIST:
- self.success = []
- (_etype24, _size21) = iprot.readListBegin()
- for _i25 in xrange(_size21):
- _elem26 = ConfigVariable()
- _elem26.read(iprot)
- self.success.append(_elem26)
- iprot.readListEnd()
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('get_default_configuration_result')
- if self.success is not None:
- oprot.writeFieldBegin('success', TType.LIST, 0)
- oprot.writeListBegin(TType.STRUCT, len(self.success))
- for iter27 in self.success:
- iter27.write(oprot)
- oprot.writeListEnd()
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
- def __ne__(self, other):
- return not (self == other)
- class close_args(object):
- """
- Attributes:
- - handle
- """
- thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'handle', (QueryHandle, QueryHandle.thrift_spec), None, ), # 1
- )
- def __init__(self, handle=None,):
- self.handle = handle
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.handle = QueryHandle()
- self.handle.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('close_args')
- if self.handle is not None:
- oprot.writeFieldBegin('handle', TType.STRUCT, 1)
- self.handle.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
- def __ne__(self, other):
- return not (self == other)
- class close_result(object):
- """
- Attributes:
- - error
- - error2
- """
- thrift_spec = (
- None, # 0
- (1, TType.STRUCT, 'error', (QueryNotFoundException, QueryNotFoundException.thrift_spec), None, ), # 1
- (2, TType.STRUCT, 'error2', (BeeswaxException, BeeswaxException.thrift_spec), None, ), # 2
- )
- def __init__(self, error=None, error2=None,):
- self.error = error
- self.error2 = error2
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRUCT:
- self.error = QueryNotFoundException()
- self.error.read(iprot)
- else:
- iprot.skip(ftype)
- elif fid == 2:
- if ftype == TType.STRUCT:
- self.error2 = BeeswaxException()
- self.error2.read(iprot)
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('close_result')
- if self.error is not None:
- oprot.writeFieldBegin('error', TType.STRUCT, 1)
- self.error.write(oprot)
- oprot.writeFieldEnd()
- if self.error2 is not None:
- oprot.writeFieldBegin('error2', TType.STRUCT, 2)
- self.error2.write(oprot)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
- def __ne__(self, other):
- return not (self == other)
- class clean_args(object):
- """
- Attributes:
- - log_context
- """
- thrift_spec = (
- None, # 0
- (1, TType.STRING, 'log_context', None, None, ), # 1
- )
- def __init__(self, log_context=None,):
- self.log_context = log_context
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- if fid == 1:
- if ftype == TType.STRING:
- self.log_context = iprot.readString();
- else:
- iprot.skip(ftype)
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('clean_args')
- if self.log_context is not None:
- oprot.writeFieldBegin('log_context', TType.STRING, 1)
- oprot.writeString(self.log_context)
- oprot.writeFieldEnd()
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
- def __ne__(self, other):
- return not (self == other)
- class clean_result(object):
- thrift_spec = (
- )
- def read(self, iprot):
- if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
- fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
- return
- iprot.readStructBegin()
- while True:
- (fname, ftype, fid) = iprot.readFieldBegin()
- if ftype == TType.STOP:
- break
- else:
- iprot.skip(ftype)
- iprot.readFieldEnd()
- iprot.readStructEnd()
- def write(self, oprot):
- if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
- oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
- return
- oprot.writeStructBegin('clean_result')
- oprot.writeFieldStop()
- oprot.writeStructEnd()
- def validate(self):
- return
- def __repr__(self):
- L = ['%s=%r' % (key, value)
- for key, value in self.__dict__.iteritems()]
- return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
- def __eq__(self, other):
- return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
- def __ne__(self, other):
- return not (self == other)
|