bharathv commented on a change in pull request #2591:
URL: https://github.com/apache/hbase/pull/2591#discussion_r514590686
##########
File path:
hbase-server/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableInputFormatScanBase.java
##########
@@ -271,6 +272,11 @@ public void testNumOfSplits(int splitsPerRegion, int
expectedNumOfSplits) throws
TableInputFormat tif = new TableInputFormat();
tif.setConf(job.getConfiguration());
List<InputSplit> splits = tif.getSplits(job);
+ for (InputSplit split : splits) {
+ TableSplit tableSplit = (TableSplit) split;
+ Assert.assertEquals(tableSplit.getScan().getStartRow(),
HConstants.EMPTY_START_ROW);
Review comment:
Remove the other two asserts? They are implied if the scan is "" ?
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSplit.java
##########
@@ -86,7 +86,16 @@ static Version fromCode(int code) {
private byte [] endRow;
private String regionLocation;
private String encodedRegionName = "";
+
+ /** The scan object may be null but the serialized form of scan is never null
Review comment:
nit: new lines missing
```
/**
* .....
*/
```
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSplit.java
##########
@@ -214,6 +223,14 @@ public Scan getScan() throws IOException {
return TableMapReduceUtil.convertStringToScan(this.scan);
}
+ /**
+ * Returns a scan object in the serialized form
+ * @return a serialized scan object
+ */
+ public String getScanAsString() {
Review comment:
Mark this InterfaceAudience.Private? This is a test helper method..
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]