HBASE-12979 Use setters instead of return values for handing back statistics from HRegion methods

This commit is contained in:
Jesse Yates 2015-02-06 10:42:03 -08:00
parent 78c50af3ec
commit 073badfd7f
2 changed files with 7 additions and 7 deletions

View File

@ -5349,18 +5349,18 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver { //
return results; return results;
} }
public ClientProtos.RegionLoadStats mutateRow(RowMutations rm) throws IOException { public void mutateRow(RowMutations rm) throws IOException {
// Don't need nonces here - RowMutations only supports puts and deletes // Don't need nonces here - RowMutations only supports puts and deletes
return mutateRowsWithLocks(rm.getMutations(), Collections.singleton(rm.getRow())); mutateRowsWithLocks(rm.getMutations(), Collections.singleton(rm.getRow()));
} }
/** /**
* Perform atomic mutations within the region w/o nonces. * Perform atomic mutations within the region w/o nonces.
* See {@link #mutateRowsWithLocks(Collection, Collection, long, long)} * See {@link #mutateRowsWithLocks(Collection, Collection, long, long)}
*/ */
public ClientProtos.RegionLoadStats mutateRowsWithLocks(Collection<Mutation> mutations, public void mutateRowsWithLocks(Collection<Mutation> mutations,
Collection<byte[]> rowsToLock) throws IOException { Collection<byte[]> rowsToLock) throws IOException {
return mutateRowsWithLocks(mutations, rowsToLock, HConstants.NO_NONCE, HConstants.NO_NONCE); mutateRowsWithLocks(mutations, rowsToLock, HConstants.NO_NONCE, HConstants.NO_NONCE);
} }
/** /**
@ -5375,11 +5375,10 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver { //
* <code>rowsToLock</code> is sorted in order to avoid deadlocks. * <code>rowsToLock</code> is sorted in order to avoid deadlocks.
* @throws IOException * @throws IOException
*/ */
public ClientProtos.RegionLoadStats mutateRowsWithLocks(Collection<Mutation> mutations, public void mutateRowsWithLocks(Collection<Mutation> mutations,
Collection<byte[]> rowsToLock, long nonceGroup, long nonce) throws IOException { Collection<byte[]> rowsToLock, long nonceGroup, long nonce) throws IOException {
MultiRowMutationProcessor proc = new MultiRowMutationProcessor(mutations, rowsToLock); MultiRowMutationProcessor proc = new MultiRowMutationProcessor(mutations, rowsToLock);
processRowsWithLocks(proc, -1, nonceGroup, nonce); processRowsWithLocks(proc, -1, nonceGroup, nonce);
return getRegionStats();
} }
/** /**

View File

@ -385,7 +385,8 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
throw new DoNotRetryIOException("Atomic put and/or delete only, not " + type.name()); throw new DoNotRetryIOException("Atomic put and/or delete only, not " + type.name());
} }
} }
return region.mutateRow(rm); region.mutateRow(rm);
return region.getRegionStats();
} }
/** /**