OmniSciDB  7bf56492aa
 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
 
java.util.Map
< java.lang.String,
TColumnType > 
sqlValidate (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
 
void import_table (String table_name, String file_name, TCopyParams copy_params) throws Exception
 
void import_geo_table (String table_name, String file_name, TCopyParams copy_params, java.util.List< TColumnType > row_desc, TCreateParams create_params) 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 40 of file MapdTestClient.java.

Member Function Documentation

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

Definition at line 69 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

69  {
70  return client.create_dashboard(
71  sessionId, name, "STATE", name + "_hash", name + "_meta");
72  }
void com.mapd.tests.MapdTestClient.delete_dashboard ( int  id) throws Exception
inline

Definition at line 91 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

91  {
92  client.delete_dashboard(sessionId, id);
93  }
void com.mapd.tests.MapdTestClient.disconnect ( ) throws Exception
inline

Definition at line 126 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

126  {
127  client.disconnect(sessionId);
128  }
Collection<String> com.mapd.tests.MapdTestClient.get_all_roles_for_user ( String  username) throws Exception
inline

Definition at line 130 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

130  {
131  List<String> roles = client.get_all_roles_for_user(sessionId, username);
132  return new HashSet<String>(roles);
133  }
TDashboard com.mapd.tests.MapdTestClient.get_dashboard ( int  id) throws Exception
inline

Definition at line 86 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

86  {
87  TDashboard dashboard = client.get_dashboard(sessionId, id);
88  return dashboard;
89  }
List<TDashboard> com.mapd.tests.MapdTestClient.get_dashboards ( ) throws Exception
inline

Definition at line 95 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

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

Definition at line 121 of file MapdTestClient.java.

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

122  {
123  return client.get_db_object_privs(sessionId, objectName, type);
124  }
TClusterHardwareInfo com.mapd.tests.MapdTestClient.get_hardware_info ( ) throws TMapDException, TException
inline

Definition at line 52 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

52  {
53  return client.get_hardware_info(sessionId);
54  }
List<String> com.mapd.tests.MapdTestClient.get_roles ( ) throws Exception
inline

Definition at line 117 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

117  {
118  return client.get_roles(sessionId);
119  }
TServerStatus com.mapd.tests.MapdTestClient.get_server_status ( ) throws TMapDException, TException
inline

Definition at line 44 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

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

Definition at line 48 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

48  {
49  return client.get_status(sessionId);
50  }
TTableDetails com.mapd.tests.MapdTestClient.get_table_details ( String  table_name) throws Exception
inline

Definition at line 56 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

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

Definition at line 113 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

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

Definition at line 135 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.client.

137  {
138  TSocket transport = new TSocket(host, port);
139  transport.open();
140  TProtocol protocol = new TBinaryProtocol(transport);
141  MapD.Client client = new MapD.Client(protocol);
142  MapdTestClient session = new MapdTestClient();
143  session.client = client;
144  session.sessionId = client.connect(user, password, db);
145  return session;
146  }
void com.mapd.tests.MapdTestClient.import_geo_table ( String  table_name,
String  file_name,
TCopyParams  copy_params,
java.util.List< TColumnType >  row_desc,
TCreateParams  create_params 
) throws Exception
inline

Definition at line 104 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

108  {
109  client.import_geo_table(
110  sessionId, table_name, file_name, copy_params, row_desc, create_params);
111  }
void com.mapd.tests.MapdTestClient.import_table ( String  table_name,
String  file_name,
TCopyParams  copy_params 
) throws Exception
inline

Definition at line 99 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

100  {
101  client.import_table(sessionId, table_name, file_name, copy_params);
102  }
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 74 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

76  {
77  client.replace_dashboard(sessionId,
78  dashboard_id,
79  name,
80  new_owner,
81  "STATE",
82  name + "_hash",
83  name + "_meta");
84  }
TQueryResult com.mapd.tests.MapdTestClient.runSql ( String  sql) throws Exception
inline

Definition at line 60 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

60  {
61  return client.sql_execute(sessionId, sql, true, null, -1, -1);
62  }
java.util.Map<java.lang.String, TColumnType> com.mapd.tests.MapdTestClient.sqlValidate ( String  sql) throws Exception
inline

Definition at line 64 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.sessionId.

65  {
66  return client.sql_validate(sessionId, sql);
67  }

Member Data Documentation

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

Definition at line 41 of file MapdTestClient.java.

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


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