@GET @Path("/clusters/{clusterId}/services/hbase/namespaces") @Timed public Response getNamespacesByClusterId(@PathParam("clusterId") Long clusterId, @Context SecurityContext securityContext) throws Exception { SecurityUtil.checkPermissions(authorizer, securityContext, Cluster.NAMESPACE, clusterId, READ); try (HBaseMetadataService hbaseMetadataService = HBaseMetadataService .newInstance(environmentService, clusterId, securityContext, subject)) { return WSUtils.respondEntity(hbaseMetadataService.getHBaseNamespaces(), OK); } catch (EntityNotFoundException ex) { throw com.hortonworks.streamline.common.exception.service.exception.request.EntityNotFoundException.byId(ex.getMessage()); } }