Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
simba.cc File Reference
#include <stdio.h>
#include "boost/shared_ptr.hpp"
#include "boost/thread.hpp"
#include "thrift/protocol/TBinaryProtocol.h"
#include "thrift/transport/TTransportUtils.h"
#include "thrift/transport/TSocket.h"
#include "gen-cpp/TCLIService.h"
Include dependency graph for simba.cc:

Go to the source code of this file.

Functions

void CloseOperation (apache::hive::service::cli::thrift::TFetchResultsReq &fetchResultsReq, TCLIServiceClient &impalaClient)
 Method to close a fetch operation handle. More...
 
void FetchFunction (apache::hive::service::cli::thrift::TOperationHandle opHandle, shared_ptr< TCLIServiceClient > impalaClient, shared_ptr< mutex > m)
 Thread entry point method to demonstrate background-fetching behavior. More...
 
void ExecuteAndCancelOperationTest ()
 Test method to execute/cancel a SQL statement and fetch the results in a seperate thread. More...
 
int main (int argc, const char *argv[])
 

Function Documentation

void CloseOperation ( apache::hive::service::cli::thrift::TFetchResultsReq &  fetchResultsReq,
TCLIServiceClient &  impalaClient 
)

Method to close a fetch operation handle.

Parameters
fetchResultsReqFetch result request object used for the operation handle to close
impalaClientThe thrift service client object used to call the close operation

Definition at line 29 of file simba.cc.

Referenced by FetchFunction().

void ExecuteAndCancelOperationTest ( )

Test method to execute/cancel a SQL statement and fetch the results in a seperate thread.

Definition at line 97 of file simba.cc.

References FetchFunction(), and impala::protocol.

Referenced by main().

void FetchFunction ( apache::hive::service::cli::thrift::TOperationHandle  opHandle,
shared_ptr< TCLIServiceClient >  impalaClient,
shared_ptr< mutex >  m 
)

Thread entry point method to demonstrate background-fetching behavior.

Parameters
opHandleOperation handle used for requests
impalaClientThe thrift service client object used to call the fetch operation

Definition at line 50 of file simba.cc.

References CloseOperation().

Referenced by ExecuteAndCancelOperationTest().

int main ( int  argc,
const char *  argv[] 
)

Definition at line 179 of file simba.cc.

References ExecuteAndCancelOperationTest().