Index: src/main/java/org/apache/hadoop/hbase/client/coprocessor/AggregationClient.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/client/coprocessor/AggregationClient.java (revision 1096914) +++ src/main/java/org/apache/hadoop/hbase/client/coprocessor/AggregationClient.java (working copy) @@ -108,11 +108,13 @@ } private void validateParameters(Scan scan) throws IOException { - if (scan == null || - (Bytes.equals(scan.getStartRow(), scan.getStopRow()) && !Bytes - .equals(scan.getStartRow(), HConstants.EMPTY_START_ROW))){ - throw new IOException("Agg client Exception: Startrow should be smaller than Stoprow"); - }else if(scan.getFamilyMap().size() != 1) { + if (scan == null + || (Bytes.equals(scan.getStartRow(), scan.getStopRow()) && !Bytes + .equals(scan.getStartRow(), HConstants.EMPTY_START_ROW)) + || Bytes.compareTo(scan.getStartRow(), scan.getStopRow()) > 0) { + throw new IOException( + "Agg client Exception: Startrow should be smaller than Stoprow"); + } else if (scan.getFamilyMap().size() != 1) { throw new IOException("There must be only one family."); } } Index: src/main/java/org/apache/hadoop/hbase/client/coprocessor/ExecResult.java =================================================================== --- src/main/java/org/apache/hadoop/hbase/client/coprocessor/ExecResult.java (revision 1096914) +++ src/main/java/org/apache/hadoop/hbase/client/coprocessor/ExecResult.java (working copy) @@ -72,7 +72,7 @@ public void write(DataOutput out) throws IOException { Bytes.writeByteArray(out, regionName); HbaseObjectWritable.writeObject(out, value, - value != null ? value.getClass() : valueType, null); + value != null ? value.getClass() : Writable.class, null); Class alternativeSerializationClass; if(value instanceof Writable){ alternativeSerializationClass = Writable.class;