OmniSciDB  8a228a1076
com.mapd.tests.MapdTestClient Class Reference
+ Collaboration diagram for com.mapd.tests.MapdTestClient:

Public Member Functions

TServerStatus get_server_status () throws TOmniSciException, TException
 
List< TServerStatus > get_status () throws TOmniSciException, TException
 
TClusterHardwareInfo get_hardware_info () throws TOmniSciException, TException
 
List< TNodeMemoryInfo > get_memory (String memory_level) throws TOmniSciException, TException
 
TTableDetails get_table_details (String table_name) throws Exception
 
List< TTableMeta > get_tables_meta () throws TOmniSciException, Exception
 
TQueryResult runSql (String sql) throws Exception
 
List< 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

OmniSci.Client client
 
String sessionId
 

Detailed Description

Definition at line 42 of file MapdTestClient.java.

Member Function Documentation

◆ create_dashboard()

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

Definition at line 79 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.client.

Referenced by com.mapd.dashboard.DashboardTest.testDashboards().

79  {
80  return client.create_dashboard(
81  sessionId, name, "STATE", name + "_hash", name + "_meta");
82  }
+ Here is the caller graph for this function:

◆ delete_dashboard()

void com.mapd.tests.MapdTestClient.delete_dashboard ( int  id) throws Exception
inline

Definition at line 101 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.client.

Referenced by com.mapd.dashboard.DashboardTest.testDashboards().

101  {
102  client.delete_dashboard(sessionId, id);
103  }
+ Here is the caller graph for this function:

◆ disconnect()

void com.mapd.tests.MapdTestClient.disconnect ( ) throws Exception
inline

Definition at line 136 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.client.

Referenced by com.mapd.tests.EagainConcurrencyTest.run_test().

136  {
137  client.disconnect(sessionId);
138  }
+ Here is the caller graph for this function:

◆ get_all_roles_for_user()

Collection<String> com.mapd.tests.MapdTestClient.get_all_roles_for_user ( String  username) throws Exception
inline

Definition at line 140 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.client.

140  {
141  List<String> roles = client.get_all_roles_for_user(sessionId, username);
142  return new HashSet<String>(roles);
143  }

◆ get_dashboard()

TDashboard com.mapd.tests.MapdTestClient.get_dashboard ( int  id) throws Exception
inline

Definition at line 96 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.client.

Referenced by com.mapd.dashboard.DashboardTest.testDashboards().

96  {
97  TDashboard dashboard = client.get_dashboard(sessionId, id);
98  return dashboard;
99  }
+ Here is the caller graph for this function:

◆ get_dashboards()

List<TDashboard> com.mapd.tests.MapdTestClient.get_dashboards ( ) throws Exception
inline

Definition at line 105 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.client.

Referenced by com.mapd.tests.EagainConcurrencyTest.run_test(), and com.mapd.dashboard.DashboardTest.testDashboards().

105  {
106  return client.get_dashboards(sessionId);
107  }
+ Here is the caller graph for this function:

◆ get_db_object_privs()

List<TDBObject> com.mapd.tests.MapdTestClient.get_db_object_privs ( String  objectName,
TDBObjectType  type 
) throws Exception
inline

Definition at line 131 of file MapdTestClient.java.

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

Referenced by com.mapd.dashboard.DashboardTest.testDbLevelDashboardPermissions().

132  {
133  return client.get_db_object_privs(sessionId, objectName, type);
134  }
+ Here is the caller graph for this function:

◆ get_hardware_info()

TClusterHardwareInfo com.mapd.tests.MapdTestClient.get_hardware_info ( ) throws TOmniSciException, TException
inline

Definition at line 54 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.client.

Referenced by com.mapd.tests.EagainConcurrencyTest.run_test(), and com.mapd.tests.DistributedConcurrencyTest.runTest().

54  {
55  return client.get_hardware_info(sessionId);
56  }
+ Here is the caller graph for this function:

◆ get_memory()

List<TNodeMemoryInfo> com.mapd.tests.MapdTestClient.get_memory ( String  memory_level) throws TOmniSciException, TException
inline

Definition at line 58 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.client.

Referenced by com.mapd.tests.EagainConcurrencyTest.run_test(), and com.mapd.tests.DistributedConcurrencyTest.runTest().

59  {
60  return client.get_memory(sessionId, memory_level);
61  }
+ Here is the caller graph for this function:

◆ get_roles()

List<String> com.mapd.tests.MapdTestClient.get_roles ( ) throws Exception
inline

Definition at line 127 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.client.

Referenced by com.mapd.dashboard.DashboardTest.testUserRoles().

127  {
128  return client.get_roles(sessionId);
129  }
+ Here is the caller graph for this function:

◆ get_server_status()

TServerStatus com.mapd.tests.MapdTestClient.get_server_status ( ) throws TOmniSciException, TException
inline

Definition at line 46 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.client.

Referenced by com.mapd.tests.EagainConcurrencyTest.run_test().

46  {
47  return client.get_server_status(sessionId);
48  }
+ Here is the caller graph for this function:

◆ get_status()

List<TServerStatus> com.mapd.tests.MapdTestClient.get_status ( ) throws TOmniSciException, TException
inline

Definition at line 50 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.client.

Referenced by com.mapd.tests.EagainConcurrencyTest.run_test(), and com.mapd.tests.DistributedConcurrencyTest.runTest().

50  {
51  return client.get_status(sessionId);
52  }
+ Here is the caller graph for this function:

◆ get_table_details()

TTableDetails com.mapd.tests.MapdTestClient.get_table_details ( String  table_name) throws Exception
inline

Definition at line 63 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.client.

63  {
64  return client.get_table_details(sessionId, table_name);
65  }

◆ get_tables_meta()

List<TTableMeta> com.mapd.tests.MapdTestClient.get_tables_meta ( ) throws TOmniSciException, Exception
inline

Definition at line 67 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.client.

67  {
68  return client.get_tables_meta(sessionId);
69  }

◆ get_users()

List<String> com.mapd.tests.MapdTestClient.get_users ( ) throws Exception
inline

Definition at line 123 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.client.

Referenced by com.mapd.dashboard.DashboardTest.testDashboards(), and com.mapd.dashboard.DashboardTest.testUserRoles().

123  {
124  return client.get_users(sessionId);
125  }
+ Here is the caller graph for this function:

◆ getClient()

static MapdTestClient com.mapd.tests.MapdTestClient.getClient ( String  host,
int  port,
String  db,
String  user,
String  password 
) throws Exception
inlinestatic

Definition at line 145 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.client, and com.mapd.tests.MapdTestClient.sessionId.

Referenced by com.mapd.tests.DateTimeTest.main(), com.mapd.tests.EagainConcurrencyTest.run_test(), com.mapd.tests.ImportAlterValidateSelectConcurrencyTest.runTest(), com.mapd.tests.DistributedConcurrencyTest.runTest(), com.mapd.tests.SelectUpdateDeleteDifferentTables.runTest(), com.mapd.tests.UpdateDeleteInsertConcurrencyTest.runTest(), com.mapd.tests.AlterDropTruncateValidateConcurrencyTest.runTest(), com.mapd.tests.CtasItasSelectUpdelConcurrencyTest.runTest(), com.mapd.tests.CatalogConcurrencyTest.runTest(), com.mapd.tests.EagainConcurrencyTest.runTest(), com.mapd.tests.SelectCopyFromDeleteConcurrencyTest.runTest(), com.mapd.tests.CatalogConcurrencyTest.testCatalogConcurrency(), com.mapd.tests.EagainConcurrencyTest.testCatalogConcurrency(), com.mapd.tests.DistributedConcurrencyTest.testConcurrency(), com.mapd.tests.SelectUpdateDeleteDifferentTables.testConcurrency(), com.mapd.tests.AlterDropTruncateValidateConcurrencyTest.testConcurrency(), com.mapd.tests.CtasItasSelectUpdelConcurrencyTest.testConcurrency(), com.mapd.tests.ImportAlterValidateSelectConcurrencyTest.testConcurrency(), com.mapd.tests.ViewPermissionsTest.testCreateViewPermission(), com.mapd.dashboard.DashboardTest.testDashboards(), com.mapd.dashboard.DashboardTest.testDbLevelDashboardPermissions(), com.mapd.tests.SelectCopyFromDeleteConcurrencyTest.testSelecyCopyFromConcurrency(), com.mapd.tests.TablePermissionsTest.testTablePermissions(), com.mapd.tests.UpdateDeleteInsertConcurrencyTest.testUpdateDeleteInsertConcurrency(), com.mapd.dashboard.DashboardTest.testUserRoles(), com.mapd.tests.ViewPermissionsTest.testViewPermissions(), and com.mapd.tests.CalciteViewsConcurrencyTest.testViewsResolutionConcurrency().

147  {
148  TSocket transport = new TSocket(host, port);
149  transport.open();
150  TProtocol protocol = new TBinaryProtocol(transport);
151  OmniSci.Client client = new OmniSci.Client(protocol);
152  MapdTestClient session = new MapdTestClient();
153  session.client = client;
154  session.sessionId = client.connect(user, password, db);
155  return session;
156  }
+ Here is the caller graph for this function:

◆ import_geo_table()

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 114 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.client.

Referenced by com.mapd.tests.ImportAlterValidateSelectConcurrencyTest.runTest().

118  {
119  client.import_geo_table(
120  sessionId, table_name, file_name, copy_params, row_desc, create_params);
121  }
+ Here is the caller graph for this function:

◆ import_table()

void com.mapd.tests.MapdTestClient.import_table ( String  table_name,
String  file_name,
TCopyParams  copy_params 
) throws Exception
inline

Definition at line 109 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.client.

Referenced by com.mapd.tests.ImportAlterValidateSelectConcurrencyTest.runTest().

110  {
111  client.import_table(sessionId, table_name, file_name, copy_params);
112  }
+ Here is the caller graph for this function:

◆ replace_dashboard()

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 84 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.client.

Referenced by com.mapd.dashboard.DashboardTest.testDashboards().

86  {
87  client.replace_dashboard(sessionId,
88  dashboard_id,
89  name,
90  new_owner,
91  "STATE",
92  name + "_hash",
93  name + "_meta");
94  }
+ Here is the caller graph for this function:

◆ runSql()

TQueryResult com.mapd.tests.MapdTestClient.runSql ( String  sql) throws Exception
inline

Definition at line 71 of file MapdTestClient.java.

References com.mapd.tests.MapdTestClient.client.

Referenced by com.mapd.tests.EagainConcurrencyTest.run_test(), com.mapd.tests.ImportAlterValidateSelectConcurrencyTest.runTest(), com.mapd.tests.DistributedConcurrencyTest.runTest(), com.mapd.tests.SelectUpdateDeleteDifferentTables.runTest(), com.mapd.tests.UpdateDeleteInsertConcurrencyTest.runTest(), com.mapd.tests.AlterDropTruncateValidateConcurrencyTest.runTest(), com.mapd.tests.CtasItasSelectUpdelConcurrencyTest.runTest(), com.mapd.tests.CatalogConcurrencyTest.testCatalogConcurrency(), com.mapd.tests.EagainConcurrencyTest.testCatalogConcurrency(), com.mapd.tests.DistributedConcurrencyTest.testConcurrency(), com.mapd.tests.SelectUpdateDeleteDifferentTables.testConcurrency(), com.mapd.tests.AlterDropTruncateValidateConcurrencyTest.testConcurrency(), com.mapd.tests.CtasItasSelectUpdelConcurrencyTest.testConcurrency(), com.mapd.tests.ImportAlterValidateSelectConcurrencyTest.testConcurrency(), com.mapd.tests.ViewPermissionsTest.testCreateViewPermission(), com.mapd.dashboard.DashboardTest.testDashboards(), com.mapd.dashboard.DashboardTest.testDbLevelDashboardPermissions(), com.mapd.tests.SelectCopyFromDeleteConcurrencyTest.testSelecyCopyFromConcurrency(), com.mapd.tests.TablePermissionsTest.testTablePermissions(), com.mapd.tests.UpdateDeleteInsertConcurrencyTest.testUpdateDeleteInsertConcurrency(), com.mapd.dashboard.DashboardTest.testUserRoles(), com.mapd.tests.ViewPermissionsTest.testViewPermissions(), and com.mapd.tests.CalciteViewsConcurrencyTest.testViewsResolutionConcurrency().

71  {
72  return client.sql_execute(sessionId, sql, true, null, -1, -1);
73  }
+ Here is the caller graph for this function:

◆ sqlValidate()

List<TColumnType> com.mapd.tests.MapdTestClient.sqlValidate ( String  sql) throws Exception
inline

Member Data Documentation

◆ client

◆ sessionId

String com.mapd.tests.MapdTestClient.sessionId
package

Definition at line 44 of file MapdTestClient.java.

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


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