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 2583e8de57
commit 75148385ee
2 changed files with 7 additions and 7 deletions

View File

@ -5245,18 +5245,18 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver { //
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
return mutateRowsWithLocks(rm.getMutations(), Collections.singleton(rm.getRow()));
mutateRowsWithLocks(rm.getMutations(), Collections.singleton(rm.getRow()));
}
/**
* Perform atomic mutations within the region w/o nonces.
* 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 {
return mutateRowsWithLocks(mutations, rowsToLock, HConstants.NO_NONCE, HConstants.NO_NONCE);
mutateRowsWithLocks(mutations, rowsToLock, HConstants.NO_NONCE, HConstants.NO_NONCE);
}
/**
@ -5271,11 +5271,10 @@ public class HRegion implements HeapSize, PropagatingConfigurationObserver { //
* <code>rowsToLock</code> is sorted in order to avoid deadlocks.
* @throws IOException
*/
public ClientProtos.RegionLoadStats mutateRowsWithLocks(Collection<Mutation> mutations,
public void mutateRowsWithLocks(Collection<Mutation> mutations,
Collection<byte[]> rowsToLock, long nonceGroup, long nonce) throws IOException {
MultiRowMutationProcessor proc = new MultiRowMutationProcessor(mutations, rowsToLock);
processRowsWithLocks(proc, -1, nonceGroup, nonce);
return getRegionStats();
}
/**

View File

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