@Test public void testGetTable() throws Exception { String dbName = "default"; String tableName = "table"; given(hiveMetaStoreService.getTable(dbName, tableName)).willReturn( new Table(tableName, null, null, 0, 0, 0, null, null, null, null, null, null)); mockMvc.perform(get(URLHelper.API_VERSION_PATH + "/metadata/hive/table") .param("db", dbName).param("table", tableName)) .andExpect(status().isOk()) .andExpect(jsonPath("$.tableName", is(tableName))); }
@RequestMapping(value = "/table", method = RequestMethod.GET) public Table getTable(@RequestParam("db") String dbName, @RequestParam("table") String tableName) { return hiveMetaStoreService.getTable(dbName, tableName); }
HiveMetaStoreController { @RequestMapping(value = "/table", method = RequestMethod.GET) public Table getTable(@RequestParam("db") String dbName, @RequestParam("table") String tableName) { return hiveMetaStoreService.getTable(dbName, tableName); } }
HiveMetaStoreController { @RequestMapping(value = "/table", method = RequestMethod.GET) public Table getTable(@RequestParam("db") String dbName, @RequestParam("table") String tableName) { return hiveMetaStoreService.getTable(dbName, tableName); }  }
HiveMetaStoreController { @RequestMapping(value = "/table", method = RequestMethod.GET) public Table getTable(@RequestParam("db") String dbName, @RequestParam("table") String tableName) { return hiveMetaStoreService.getTable(dbName, tableName); }  @RequestMapping(value = "/dbs", method = RequestMethod.GET) Iterable<String> getAllDatabases(); @RequestMapping(value = "/tables/names", method = RequestMethod.GET) Iterable<String> getAllTableNames(@RequestParam("db") String dbName); @RequestMapping(value = "/tables", method = RequestMethod.GET) List<Table> getAllTables(@RequestParam("db") String dbName); @RequestMapping(value = "/dbs/tables", method = RequestMethod.GET) Map<String, List<Table>> getAllTables(); @RequestMapping(value = "/dbs/tables/names", method = RequestMethod.GET) Map<String, List<String>> getAllTableNames(); @RequestMapping(value = "/table", method = RequestMethod.GET) Table getTable(@RequestParam("db") String dbName,
                          @RequestParam("table") String tableName); }
HiveMetaStoreController { @RequestMapping(value = "/table", method = RequestMethod.GET) public Table getTable(@RequestParam("db") String dbName, @RequestParam("table") String tableName) { return hiveMetaStoreService.getTable(dbName, tableName); }  @RequestMapping(value = "/dbs", method = RequestMethod.GET) Iterable<String> getAllDatabases(); @RequestMapping(value = "/tables/names", method = RequestMethod.GET) Iterable<String> getAllTableNames(@RequestParam("db") String dbName); @RequestMapping(value = "/tables", method = RequestMethod.GET) List<Table> getAllTables(@RequestParam("db") String dbName); @RequestMapping(value = "/dbs/tables", method = RequestMethod.GET) Map<String, List<Table>> getAllTables(); @RequestMapping(value = "/dbs/tables/names", method = RequestMethod.GET) Map<String, List<String>> getAllTableNames(); @RequestMapping(value = "/table", method = RequestMethod.GET) Table getTable(@RequestParam("db") String dbName,
                          @RequestParam("table") String tableName);  }