/** * Method for retrieving the get's RowLock * @return RowLock */ public RowLock getRowLock() { return new RowLock(this.row, this.lockId); }
/** * Create a Increment operation for the specified row, using an existing row * lock. * <p> * At least one column must be incremented. * @param row row key * @param rowLock previously acquired row lock, or null * @deprecated {@link RowLock} and associated operations are deprecated, * use {@link #Increment(byte[])} */ public Increment(byte [] row, RowLock rowLock) { this.row = row; if(rowLock != null) { this.lockId = rowLock.getLockId(); } }
/** * {@inheritDoc} */ @Override public void unlockRow(final RowLock rl) throws IOException { new ServerCallable<Boolean>(connection, tableName, rl.getRow(), operationTimeout) { public Boolean call() throws IOException { server.unlockRow(location.getRegionInfo().getRegionName(), rl.getLockId()); return null; // FindBugs NP_BOOLEAN_RETURN_NULL } }.withRetries(); }
@Override public void unlockRow(final RowLock rl) throws IOException { try { timedExecute(OpType.UNLOCKROW, rl.getRow(), new Callable<Object>() { @Override public Object call() throws IOException { normalHTable.unlockRow(rl); return null; } }); } catch (IOException e) { throw e; } catch (Exception e) { final String errMsg = "Unexpected exception in stats wrapper for unlockRow"; log.error(errMsg, e); throw new RuntimeException(errMsg, e); } }
/** * Method for retrieving the delete's RowLock * @return RowLock * @deprecated {@link RowLock} and associated operations are deprecated */ public RowLock getRowLock() { return new RowLock(this.row, this.lockId); }
/** * Create a Get operation for the specified row, using an existing row lock. * <p> * If no further operations are done, this will get the latest version of * all columns in all families of the specified row. * @param row row key * @param rowLock previously acquired row lock, or null * @deprecated {@link RowLock} is deprecated, use {@link #Get(byte[])}. */ public Get(byte [] row, RowLock rowLock) { this.row = row; if(rowLock != null) { this.lockId = rowLock.getLockId(); } }
/** * Method for retrieving the increment's RowLock * @return RowLock * @deprecated {@link RowLock} and associated operations are deprecated */ public RowLock getRowLock() { return new RowLock(this.row, this.lockId); }
/** * Create a Delete operation for the specified row and timestamp, using * an optional row lock.<p> * * If no further operations are done, this will delete all columns in all * families of the specified row with a timestamp less than or equal to the * specified timestamp.<p> * * This timestamp is ONLY used for a delete row operation. If specifying * families or columns, you must specify each timestamp individually. * @param row row key * @param timestamp maximum version timestamp (only for delete row) * @param rowLock previously acquired row lock, or null * @deprecated {@link RowLock} is deprecated, use {@link #Delete(byte[], long)}. */ public Delete(byte [] row, long timestamp, RowLock rowLock) { this.row = row; this.ts = timestamp; if (rowLock != null) { this.lockId = rowLock.getLockId(); } }
public RowLock call() throws IOException { long lockId = server.lockRow(location.getRegionInfo().getRegionName(), row); return new RowLock(row,lockId); } }.withRetries();
/** * Create a Put operation for the specified row, using a given timestamp, and an existing row lock. * @param row row key * @param ts timestamp * @param rowLock previously acquired row lock, or null * @deprecated {@link RowLock} and associated operations are deprecated, * use {@link #Put(byte[], long)} */ public Put(byte [] row, long ts, RowLock rowLock) { if(row == null || row.length > HConstants.MAX_ROW_LENGTH) { throw new IllegalArgumentException("Row key is invalid"); } this.row = Arrays.copyOf(row, row.length); this.ts = ts; if(rowLock != null) { this.lockId = rowLock.getLockId(); } }
lock = new RowLock(proto.getLockId());
public Boolean call() throws IOException { server.unlockRow(location.getRegionInfo().getRegionName(), rl.getLockId()); return null; // FindBugs NP_BOOLEAN_RETURN_NULL } }.withRetries();
lock = new RowLock(proto.getLockId());