env.getRegion().mutateRowsWithLocks(mutations, rowsToLock, nonceGroup, nonce); } catch (IOException e) { CoprocessorRpcUtils.setControllerException(controller, e);
private void mutateRowsWithLocks(final Region region, final List<Mutation> mutations, final Set<byte[]> rowsToLock, final long nonceGroup, final long nonce) throws IOException { // we need to mutate SYSTEM.CATALOG with HBase/login user if access is enabled. if (this.accessCheckEnabled) { User.runAsLoginUser(new PrivilegedExceptionAction<Void>() { @Override public Void run() throws Exception { final RpcCall rpcContext = RpcUtil.getRpcContext(); // Setting RPC context as null so that user can be resetted try { RpcUtil.setRpcContext(null); region.mutateRowsWithLocks(mutations, rowsToLock, nonceGroup, nonce); } catch (Throwable e) { throw new IOException(e); } finally { // Setting RPC context back to original context of the RPC RpcUtil.setRpcContext(rpcContext); } return null; } }); } else { region.mutateRowsWithLocks(mutations, rowsToLock, nonceGroup, nonce); } }
@Override public Void run() throws Exception { final RpcCall rpcContext = RpcUtil.getRpcContext(); // Setting RPC context as null so that user can be resetted try { RpcUtil.setRpcContext(null); region.mutateRowsWithLocks(mutations, rowsToLock, nonceGroup, nonce); } catch (Throwable e) { throw new IOException(e); } finally { // Setting RPC context back to original context of the RPC RpcUtil.setRpcContext(rpcContext); } return null; } });
private void mutateRowsWithLocks(final Region region, final List<Mutation> mutations, final Set<byte[]> rowsToLock, final long nonceGroup, final long nonce) throws IOException { // we need to mutate SYSTEM.CATALOG with HBase/login user if access is enabled. if (this.accessCheckEnabled) { User.runAsLoginUser(new PrivilegedExceptionAction<Void>() { @Override public Void run() throws Exception { final RpcCall rpcContext = RpcUtil.getRpcContext(); // Setting RPC context as null so that user can be resetted try { RpcUtil.setRpcContext(null); region.mutateRowsWithLocks(mutations, rowsToLock, nonceGroup, nonce); } catch (Throwable e) { throw new IOException(e); } finally { // Setting RPC context back to original context of the RPC RpcUtil.setRpcContext(rpcContext); } return null; } }); } else { region.mutateRowsWithLocks(mutations, rowsToLock, nonceGroup, nonce); } }
private void mutateRowsWithLocks(final Region region, final List<Mutation> mutations, final Set<byte[]> rowsToLock, final long nonceGroup, final long nonce) throws IOException { // we need to mutate SYSTEM.CATALOG with HBase/login user if access is enabled. if (this.accessCheckEnabled) { User.runAsLoginUser(new PrivilegedExceptionAction<Void>() { @Override public Void run() throws Exception { final RpcCall rpcContext = RpcUtil.getRpcContext(); // Setting RPC context as null so that user can be resetted try { RpcUtil.setRpcContext(null); region.mutateRowsWithLocks(mutations, rowsToLock, nonceGroup, nonce); } catch (Throwable e) { throw new IOException(e); } finally { // Setting RPC context back to original context of the RPC RpcUtil.setRpcContext(rpcContext); } return null; } }); } else { region.mutateRowsWithLocks(mutations, rowsToLock, nonceGroup, nonce); } }
@Override public Void run() throws Exception { final RpcCall rpcContext = RpcUtil.getRpcContext(); // Setting RPC context as null so that user can be resetted try { RpcUtil.setRpcContext(null); region.mutateRowsWithLocks(mutations, rowsToLock, nonceGroup, nonce); } catch (Throwable e) { throw new IOException(e); } finally { // Setting RPC context back to original context of the RPC RpcUtil.setRpcContext(rpcContext); } return null; } });
@Override public Void run() throws Exception { final RpcCall rpcContext = RpcUtil.getRpcContext(); // Setting RPC context as null so that user can be resetted try { RpcUtil.setRpcContext(null); region.mutateRowsWithLocks(mutations, rowsToLock, nonceGroup, nonce); } catch (Throwable e) { throw new IOException(e); } finally { // Setting RPC context back to original context of the RPC RpcUtil.setRpcContext(rpcContext); } return null; } });
env.getRegion().mutateRowsWithLocks(mutations, rowsToLock, nonceGroup, nonce); } catch (IOException e) { ResponseConverter.setControllerException(controller, e);