HBASE-831 committing BatchUpdate with no row should complain
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@685984 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
aabc02c44b
commit
282810c65e
|
@ -23,6 +23,7 @@ Release 0.3.0 - Unreleased
|
||||||
HBASE-808,809 MAX_VERSIONS not respected, and Deletall doesn't and inserts
|
HBASE-808,809 MAX_VERSIONS not respected, and Deletall doesn't and inserts
|
||||||
after delete don't work as expected
|
after delete don't work as expected
|
||||||
(Jean-Daniel Cryans via Stack)
|
(Jean-Daniel Cryans via Stack)
|
||||||
|
HBASE-831 committing BatchUpdate with no row should complain
|
||||||
|
|
||||||
IMPROVEMENTS
|
IMPROVEMENTS
|
||||||
HBASE-801 When a table haven't disable, shell could response in a "user
|
HBASE-801 When a table haven't disable, shell could response in a "user
|
||||||
|
|
|
@ -1252,6 +1252,8 @@ public class HTable {
|
||||||
public synchronized void commit(final BatchUpdate batchUpdate,
|
public synchronized void commit(final BatchUpdate batchUpdate,
|
||||||
final RowLock rl)
|
final RowLock rl)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
if (batchUpdate.getRow() == null)
|
||||||
|
throw new IllegalArgumentException("update has null row");
|
||||||
connection.getRegionServerWithRetries(
|
connection.getRegionServerWithRetries(
|
||||||
new ServerCallable<Boolean>(connection, tableName, batchUpdate.getRow()) {
|
new ServerCallable<Boolean>(connection, tableName, batchUpdate.getRow()) {
|
||||||
public Boolean call() throws IOException {
|
public Boolean call() throws IOException {
|
||||||
|
|
|
@ -1129,6 +1129,8 @@ public class HRegionServer implements HConstants, HRegionInterface, Runnable {
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
public void batchUpdate(final byte [] regionName, BatchUpdate b, long lockId)
|
public void batchUpdate(final byte [] regionName, BatchUpdate b, long lockId)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
|
if (b.getRow() == null)
|
||||||
|
throw new IllegalArgumentException("update has null row");
|
||||||
checkOpen();
|
checkOpen();
|
||||||
this.requestCount.incrementAndGet();
|
this.requestCount.incrementAndGet();
|
||||||
HRegion region = getRegion(regionName);
|
HRegion region = getRegion(regionName);
|
||||||
|
|
Loading…
Reference in New Issue