HBASE-2908 Wrong order of null-check [in TIF]
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@984423 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e30ddb01aa
commit
8b5d7dbb1c
@ -474,6 +474,7 @@ Release 0.21.0 - Unreleased
|
|||||||
HBASE-2897 RowResultGenerator should handle NoSuchColumnFamilyException
|
HBASE-2897 RowResultGenerator should handle NoSuchColumnFamilyException
|
||||||
HBASE-2905 NPE when inserting mass data via REST interface (Sandy Yin via
|
HBASE-2905 NPE when inserting mass data via REST interface (Sandy Yin via
|
||||||
Andrew Purtell)
|
Andrew Purtell)
|
||||||
|
HBASE-2908 Wrong order of null-check [in TIF] (Libor Dener via Stack)
|
||||||
|
|
||||||
IMPROVEMENTS
|
IMPROVEMENTS
|
||||||
HBASE-1760 Cleanup TODOs in HTable
|
HBASE-1760 Cleanup TODOs in HTable
|
||||||
|
@ -123,14 +123,14 @@ extends InputFormat<ImmutableBytesWritable, Result> {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<InputSplit> getSplits(JobContext context) throws IOException {
|
public List<InputSplit> getSplits(JobContext context) throws IOException {
|
||||||
|
if (table == null) {
|
||||||
|
throw new IOException("No table was provided.");
|
||||||
|
}
|
||||||
Pair<byte[][], byte[][]> keys = table.getStartEndKeys();
|
Pair<byte[][], byte[][]> keys = table.getStartEndKeys();
|
||||||
if (keys == null || keys.getFirst() == null ||
|
if (keys == null || keys.getFirst() == null ||
|
||||||
keys.getFirst().length == 0) {
|
keys.getFirst().length == 0) {
|
||||||
throw new IOException("Expecting at least one region.");
|
throw new IOException("Expecting at least one region.");
|
||||||
}
|
}
|
||||||
if (table == null) {
|
|
||||||
throw new IOException("No table was provided.");
|
|
||||||
}
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
List<InputSplit> splits = new ArrayList<InputSplit>(keys.getFirst().length);
|
List<InputSplit> splits = new ArrayList<InputSplit>(keys.getFirst().length);
|
||||||
for (int i = 0; i < keys.getFirst().length; i++) {
|
for (int i = 0; i < keys.getFirst().length; i++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user