OmniSciDB  1dac507f6e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
com.mapd.tests.MapdTestClient Class Reference
+ Collaboration diagram for com.mapd.tests.MapdTestClient:

Public Member Functions

TServerStatus get_server_status () throws TMapDException, TException
 
List< TServerStatus > get_status () throws TMapDException, TException
 
TClusterHardwareInfo get_hardware_info () throws TMapDException, TException
 
TTableDetails get_table_details (String table_name) throws Exception
 
TQueryResult runSql (String sql) throws Exception
 
int create_dashboard (String name) throws Exception
 
void replace_dashboard (int dashboard_id, java.lang.String name, java.lang.String new_owner) throws Exception
 
TDashboard get_dashboard (int id) throws Exception
 
void delete_dashboard (int id) throws Exception
 
List< TDashboard > get_dashboards () throws Exception
 
List< String > get_users () throws Exception
 
List< String > get_roles () throws Exception
 
List< TDBObject > get_db_object_privs (String objectName, TDBObjectType type) throws Exception
 
void disconnect () throws Exception
 
Collection< String > get_all_roles_for_user (String username) throws Exception
 

Static Public Member Functions

static MapdTestClient getClient (String host, int port, String db, String user, String password) throws Exception
 

Package Attributes

MapD.Client client
 
String sessionId
 

Detailed Description

Definition at line 37 of file MapdTestClient.java.

Member Function Documentation

int com.mapd.tests.MapdTestClient.create_dashboard ( String  name) throws Exception
inline

Definition at line 61 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

61  {
62  return client.create_dashboard(
63  sessionId, name, "STATE", name + "_hash", name + "_meta");
64  }
void com.mapd.tests.MapdTestClient.delete_dashboard ( int  id) throws Exception
inline

Definition at line 83 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

83  {
84  client.delete_dashboard(sessionId, id);
85  }
void com.mapd.tests.MapdTestClient.disconnect ( ) throws Exception
inline

Definition at line 104 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

104  {
105  client.disconnect(sessionId);
106  }
Collection<String> com.mapd.tests.MapdTestClient.get_all_roles_for_user ( String  username) throws Exception
inline

Definition at line 108 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

108  {
109  List<String> roles = client.get_all_roles_for_user(sessionId, username);
110  return new HashSet<String>(roles);
111  }
TDashboard com.mapd.tests.MapdTestClient.get_dashboard ( int  id) throws Exception
inline

Definition at line 78 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

78  {
79  TDashboard dashboard = client.get_dashboard(sessionId, id);
80  return dashboard;
81  }
List<TDashboard> com.mapd.tests.MapdTestClient.get_dashboards ( ) throws Exception
inline

Definition at line 87 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

87  {
88  return client.get_dashboards(sessionId);
89  }
List<TDBObject> com.mapd.tests.MapdTestClient.get_db_object_privs ( String  objectName,
TDBObjectType  type 
) throws Exception
inline

Definition at line 99 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId, and run_benchmark_import.type.

100  {
101  return client.get_db_object_privs(sessionId, objectName, type);
102  }
TClusterHardwareInfo com.mapd.tests.MapdTestClient.get_hardware_info ( ) throws TMapDException, TException
inline

Definition at line 49 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

49  {
50  return client.get_hardware_info(sessionId);
51  }
List<String> com.mapd.tests.MapdTestClient.get_roles ( ) throws Exception
inline

Definition at line 95 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

95  {
96  return client.get_roles(sessionId);
97  }
TServerStatus com.mapd.tests.MapdTestClient.get_server_status ( ) throws TMapDException, TException
inline

Definition at line 41 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

41  {
42  return client.get_server_status(sessionId);
43  }
List<TServerStatus> com.mapd.tests.MapdTestClient.get_status ( ) throws TMapDException, TException
inline

Definition at line 45 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

45  {
46  return client.get_status(sessionId);
47  }
TTableDetails com.mapd.tests.MapdTestClient.get_table_details ( String  table_name) throws Exception
inline

Definition at line 53 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

53  {
54  return client.get_table_details(sessionId, table_name);
55  }
List<String> com.mapd.tests.MapdTestClient.get_users ( ) throws Exception
inline

Definition at line 91 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

91  {
92  return client.get_users(sessionId);
93  }
static MapdTestClient com.mapd.tests.MapdTestClient.getClient ( String  host,
int  port,
String  db,
String  user,
String  password 
) throws Exception
inlinestatic

Definition at line 113 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.client.

115  {
116  TSocket transport = new TSocket(host, port);
117  transport.open();
118  TProtocol protocol = new TBinaryProtocol(transport);
119  MapD.Client client = new MapD.Client(protocol);
120  MapdTestClient session = new MapdTestClient();
121  session.client = client;
122  session.sessionId = client.connect(user, password, db);
123  return session;
124  }
void com.mapd.tests.MapdTestClient.replace_dashboard ( int  dashboard_id,
java.lang.String  name,
java.lang.String  new_owner 
) throws Exception
inline

Definition at line 66 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

68  {
69  client.replace_dashboard(sessionId,
70  dashboard_id,
71  name,
72  new_owner,
73  "STATE",
74  name + "_hash",
75  name + "_meta");
76  }
TQueryResult com.mapd.tests.MapdTestClient.runSql ( String  sql) throws Exception
inline

Definition at line 57 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

57  {
58  return client.sql_execute(sessionId, sql, true, null, -1, -1);
59  }

Member Data Documentation

MapD.Client com.mapd.tests.MapdTestClient.client
package

Definition at line 38 of file MapdTestClient.java.

Referenced by com.mapd.tests.MapdTestClient.getClient().


The documentation for this class was generated from the following file: