HBASE-891 HRS.validateValuesLength throws IOE, gets caught in the retries
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@698008 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b174254d9e
commit
5982c95d8e
|
@ -3,6 +3,7 @@ Release 0.19.0 - Unreleased
|
|||
INCOMPATIBLE CHANGES
|
||||
|
||||
BUG FIXES
|
||||
HBASE-891 HRS.validateValuesLength throws IOE, gets caught in the retries
|
||||
|
||||
IMPROVEMENTS
|
||||
HBASE-890 Alter table operation and also related changes in REST interface
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
/**
|
||||
* Copyright 2008 The Apache Software Foundation
|
||||
*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.hadoop.hbase;
|
||||
|
||||
/**
|
||||
* Thrown when a value is longer than the specified LENGTH
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class ValueOverMaxLengthException extends DoNotRetryIOException {
|
||||
|
||||
/**
|
||||
* default constructor
|
||||
*/
|
||||
public ValueOverMaxLengthException() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param message
|
||||
*/
|
||||
public ValueOverMaxLengthException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
}
|
|
@ -70,6 +70,7 @@ import org.apache.hadoop.hbase.RegionHistorian;
|
|||
import org.apache.hadoop.hbase.RemoteExceptionHandler;
|
||||
import org.apache.hadoop.hbase.UnknownScannerException;
|
||||
import org.apache.hadoop.hbase.UnknownRowLockException;
|
||||
import org.apache.hadoop.hbase.ValueOverMaxLengthException;
|
||||
import org.apache.hadoop.hbase.Leases.LeaseStillHeldException;
|
||||
import org.apache.hadoop.hbase.filter.RowFilterInterface;
|
||||
import org.apache.hadoop.hbase.io.BatchOperation;
|
||||
|
@ -1134,7 +1135,7 @@ public class HRegionServer implements HConstants, HRegionInterface, Runnable {
|
|||
if (fam != null) {
|
||||
int maxLength = fam.getMaxValueLength();
|
||||
if (operation.getValue().length > maxLength) {
|
||||
throw new IOException("Value in column "
|
||||
throw new ValueOverMaxLengthException("Value in column "
|
||||
+ Bytes.toString(operation.getColumn()) + " is too long. "
|
||||
+ operation.getValue().length + " instead of " + maxLength);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue