From 79e1eed60eaf584b02e79eeeb6717db9cda17a99 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Tue, 7 Jul 2009 23:25:39 +0000 Subject: [PATCH] HBASE-1624 Don't sort Puts if only one in list in HCM#processBatchOfRows git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@791999 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 1 + .../org/apache/hadoop/hbase/client/HConnectionManager.java | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 0b818a2b50d..a6ad783c220 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -447,6 +447,7 @@ Release 0.20.0 - Unreleased HBASE-1575 HMaster does not handle ZK session expiration HBASE-1620 Need to use special StoreScanner constructor for major compactions (passed sf, no caching, etc) (Jon Gray via Stack) + HBASE-1624 Don't sort Puts if only one in list in HCM#processBatchOfRows OPTIMIZATIONS HBASE-1412 Change values for delete column and column family in KeyValue diff --git a/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java b/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java index ca2503eccb7..58a146458b8 100644 --- a/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java +++ b/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java @@ -1003,7 +1003,9 @@ public class HConnectionManager implements HConstants { } boolean retryOnlyOne = false; int tries = 0; - Collections.sort(list); + if (list.size() > 1) { + Collections.sort(list); + } List currentPuts = new ArrayList(); HRegionLocation location = getRegionLocationForRowWithRetries(tableName, list.get(0).getRow(),