client = new SentryHDFSService.Client(protocol); LOGGER.info("Successfully created client");
public synchronized SentryAuthzUpdate getAllUpdatesFrom(long permSeqNum, long pathSeqNum) throws SentryHdfsServiceException { SentryAuthzUpdate retVal = new SentryAuthzUpdate(new LinkedList<PermissionsUpdate>(), new LinkedList<PathsUpdate>()); try { TAuthzUpdateResponse sentryUpdates = client.get_all_authz_updates_from(permSeqNum, pathSeqNum); if (sentryUpdates.getAuthzPathUpdate() != null) { for (TPathsUpdate pathsUpdate : sentryUpdates.getAuthzPathUpdate()) { retVal.getPathUpdates().add(new PathsUpdate(pathsUpdate)); } } if (sentryUpdates.getAuthzPermUpdate() != null) { for (TPermissionsUpdate permsUpdate : sentryUpdates.getAuthzPermUpdate()) { retVal.getPermUpdates().add(new PermissionsUpdate(permsUpdate)); } } } catch (Exception e) { throw new SentryHdfsServiceException("Thrift Exception occurred !!", e); } return retVal; }
public long getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_check_hms_seq_num(); } }
public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) { return new Client(iprot, oprot); } }
public Client getClient(org.apache.thrift.protocol.TProtocol prot) { return new Client(prot); } public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
public void send_check_hms_seq_num(long pathSeqNum) throws org.apache.thrift.TException { check_hms_seq_num_args args = new check_hms_seq_num_args(); args.setPathSeqNum(pathSeqNum); sendBase("check_hms_seq_num", args); }
public void send_handle_hms_notification(TPathsUpdate pathsUpdate) throws org.apache.thrift.TException { handle_hms_notification_args args = new handle_hms_notification_args(); args.setPathsUpdate(pathsUpdate); sendBase("handle_hms_notification", args); }
public Map<String,List<String>> recv_get_all_related_paths() throws org.apache.thrift.TException { get_all_related_paths_result result = new get_all_related_paths_result(); receiveBase(result, "get_all_related_paths"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "get_all_related_paths failed: unknown result"); }
public TAuthzUpdateResponse getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_all_authz_updates_from(); } }
public void getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); (new Client(prot)).recv_handle_hms_notification(); } }
public synchronized long getLastSeenHMSPathSeqNum() throws SentryHdfsServiceException { try { return client.check_hms_seq_num(-1); } catch (Exception e) { throw new SentryHdfsServiceException("Thrift Exception occurred !!", e); } }
public synchronized void notifyHMSUpdate(PathsUpdate update) throws SentryHdfsServiceException { try { client.handle_hms_notification(update.toThrift()); } catch (Exception e) { throw new SentryHdfsServiceException("Thrift Exception occurred !!", e); } }
public void send_get_all_related_paths(String path, boolean exactMatch) throws org.apache.thrift.TException { get_all_related_paths_args args = new get_all_related_paths_args(); args.setPath(path); args.setExactMatch(exactMatch); sendBase("get_all_related_paths", args); }
public TAuthzUpdateResponse get_all_authz_updates_from(long permSeqNum, long pathSeqNum) throws org.apache.thrift.TException { send_get_all_authz_updates_from(permSeqNum, pathSeqNum); return recv_get_all_authz_updates_from(); }
public long check_hms_seq_num(long pathSeqNum) throws org.apache.thrift.TException { send_check_hms_seq_num(pathSeqNum); return recv_check_hms_seq_num(); }
public Map<String,List<String>> get_all_related_paths(String path, boolean exactMatch) throws org.apache.thrift.TException { send_get_all_related_paths(path, exactMatch); return recv_get_all_related_paths(); }
public void send_get_all_authz_updates_from(long permSeqNum, long pathSeqNum) throws org.apache.thrift.TException { get_all_authz_updates_from_args args = new get_all_authz_updates_from_args(); args.setPermSeqNum(permSeqNum); args.setPathSeqNum(pathSeqNum); sendBase("get_all_authz_updates_from", args); }
public void handle_hms_notification(TPathsUpdate pathsUpdate) throws org.apache.thrift.TException { send_handle_hms_notification(pathsUpdate); recv_handle_hms_notification(); }
public long recv_check_hms_seq_num() throws org.apache.thrift.TException { check_hms_seq_num_result result = new check_hms_seq_num_result(); receiveBase(result, "check_hms_seq_num"); if (result.isSetSuccess()) { return result.success; } throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "check_hms_seq_num failed: unknown result"); }
public Map<String,List<String>> getResult() throws org.apache.thrift.TException { if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) { throw new IllegalStateException("Method call not finished!"); } org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array()); org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport); return (new Client(prot)).recv_get_all_related_paths(); } }