@Override public String get_metastore_db_uuid() throws TException { try { return getMS().getMetastoreDbUuid(); } catch (MetaException e) { LOG.error("Exception thrown while querying metastore db uuid", e); throw e; } }
@Override public WMCreatePoolResponse create_wm_pool(WMCreatePoolRequest request) throws AlreadyExistsException, NoSuchObjectException, InvalidObjectException, MetaException, TException { try { getMS().createPool(request.getPool()); return new WMCreatePoolResponse(); } catch (MetaException e) { LOG.error("Exception while trying to create WMPool", e); throw e; } }
@Override public NotificationEventResponse get_next_notification(NotificationEventRequest rqst) throws TException { try { authorizeProxyPrivilege(); } catch (Exception ex) { LOG.error("Not authorized to make the get_next_notification call. You can try to disable " + ConfVars.EVENT_DB_NOTIFICATION_API_AUTH.toString(), ex); throw new TException(ex); } RawStore ms = getMS(); return ms.getNextNotification(rqst); }
@Override public WMDropMappingResponse drop_wm_mapping(WMDropMappingRequest request) throws NoSuchObjectException, InvalidOperationException, MetaException, TException { try { getMS().dropWMMapping(request.getMapping()); return new WMDropMappingResponse(); } catch (MetaException e) { LOG.error("Exception while trying to drop WMMapping", e); throw e; } }
@Override public WMDropPoolResponse drop_wm_pool(WMDropPoolRequest request) throws NoSuchObjectException, InvalidOperationException, MetaException, TException { try { getMS().dropWMPool(request.getResourcePlanName(), request.getPoolPath(), request.getNs()); return new WMDropPoolResponse(); } catch (MetaException e) { LOG.error("Exception while trying to drop WMPool", e); throw e; } }
@Override public WMAlterPoolResponse alter_wm_pool(WMAlterPoolRequest request) throws AlreadyExistsException, NoSuchObjectException, InvalidObjectException, MetaException, TException { try { getMS().alterPool(request.getPool(), request.getPoolPath()); return new WMAlterPoolResponse(); } catch (MetaException e) { LOG.error("Exception while trying to alter WMPool", e); throw e; } }
@Override public WMDropTriggerResponse drop_wm_trigger(WMDropTriggerRequest request) throws NoSuchObjectException, InvalidOperationException, MetaException, TException { try { getMS().dropWMTrigger(request.getResourcePlanName(), request.getTriggerName(), request.getNs()); return new WMDropTriggerResponse(); } catch (MetaException e) { LOG.error("Exception while trying to drop trigger.", e); throw e; } }
@Override public WMAlterTriggerResponse alter_wm_trigger(WMAlterTriggerRequest request) throws NoSuchObjectException, InvalidObjectException, MetaException, TException { try { getMS().alterWMTrigger(request.getTrigger()); return new WMAlterTriggerResponse(); } catch (MetaException e) { LOG.error("Exception while trying to alter trigger", e); throw e; } }
@Override public WMGetAllResourcePlanResponse get_all_resource_plans(WMGetAllResourcePlanRequest request) throws MetaException, TException { try { WMGetAllResourcePlanResponse resp = new WMGetAllResourcePlanResponse(); resp.setResourcePlans(getMS().getAllResourcePlans(request.getNs())); return resp; } catch (MetaException e) { LOG.error("Exception while trying to retrieve resource plans", e); throw e; } }
@Override public WMValidateResourcePlanResponse validate_resource_plan(WMValidateResourcePlanRequest request) throws NoSuchObjectException, MetaException, TException { try { return getMS().validateResourcePlan(request.getResourcePlanName(), request.getNs()); } catch (MetaException e) { LOG.error("Exception while trying to validate resource plan", e); throw e; } }
@Override public PutFileMetadataResult put_file_metadata(PutFileMetadataRequest req) throws TException { RawStore ms = getMS(); if (ms.isFileMetadataSupported()) { ms.putFileMetadata(req.getFileIds(), req.getMetadata(), req.getType()); } return new PutFileMetadataResult(); }
private Table getTable(String catName, String dbName, String tableName, String writeIdList) throws MetaException, InvalidObjectException { Table t = getMS().getTable(catName, dbName, tableName, writeIdList); if (t == null) { throw new InvalidObjectException(TableName.getQualified(catName, dbName, tableName) + " table not found"); } return t; }
@Override public WMCreateOrUpdateMappingResponse create_or_update_wm_mapping( WMCreateOrUpdateMappingRequest request) throws AlreadyExistsException, NoSuchObjectException, InvalidObjectException, MetaException, TException { try { getMS().createOrUpdateWMMapping(request.getMapping(), request.isUpdate()); return new WMCreateOrUpdateMappingResponse(); } catch (MetaException e) { LOG.error("Exception while trying to create or update WMMapping", e); throw e; } }
@Override public WMCreateTriggerResponse create_wm_trigger(WMCreateTriggerRequest request) throws AlreadyExistsException, InvalidObjectException, MetaException, TException { try { getMS().createWMTrigger(request.getTrigger()); return new WMCreateTriggerResponse(); } catch (MetaException e) { LOG.error("Exception while trying to create trigger", e); throw e; } }
@Override public WMDropResourcePlanResponse drop_resource_plan(WMDropResourcePlanRequest request) throws NoSuchObjectException, InvalidOperationException, MetaException, TException { try { getMS().dropResourcePlan(request.getResourcePlanName(), request.getNs()); return new WMDropResourcePlanResponse(); } catch (MetaException e) { LOG.error("Exception while trying to drop resource plan", e); throw e; } }
@Override public WMGetActiveResourcePlanResponse get_active_resource_plan( WMGetActiveResourcePlanRequest request) throws MetaException, TException { try { WMGetActiveResourcePlanResponse response = new WMGetActiveResourcePlanResponse(); response.setResourcePlan(getMS().getActiveResourcePlan(request.getNs())); return response; } catch (MetaException e) { LOG.error("Exception while trying to get active resource plan", e); throw e; } }
@Override public ClearFileMetadataResult clear_file_metadata(ClearFileMetadataRequest req) throws TException { getMS().putFileMetadata(req.getFileIds(), null, null); return new ClearFileMetadataResult(); }
@Override public List<Role> list_roles(final String principalName, final PrincipalType principalType) throws TException { incrementCounter("list_roles"); firePreEvent(new PreAuthorizationCallEvent(this)); return getMS().listRoles(principalName, principalType); }
@Override public CurrentNotificationEventId get_current_notificationEventId() throws TException { try { authorizeProxyPrivilege(); } catch (Exception ex) { LOG.error("Not authorized to make the get_current_notificationEventId call. You can try to disable " + ConfVars.EVENT_DB_NOTIFICATION_API_AUTH.toString(), ex); throw new TException(ex); } RawStore ms = getMS(); return ms.getCurrentNotificationEventId(); }