Reidddddd commented on a change in pull request #2591:
URL: https://github.com/apache/hbase/pull/2591#discussion_r514092739



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSplit.java
##########
@@ -184,9 +184,24 @@ public TableSplit(final byte [] tableName, byte[] 
startRow, byte[] endRow,
    * @param startRow The start row of the split.
    * @param endRow The end row of the split.
    * @param location The location of the region.
+   * @param encodedRegionName The region ID.
+   * @param length Size of region in bytes
    */
   public TableSplit(TableName tableName, byte[] startRow, byte[] endRow,
-      final String location) {
+    final String location, final String encodedRegionName, long length) {
+    this(tableName, null, startRow, endRow, location, encodedRegionName, 
length);

Review comment:
       can't we ignore the scan assignment, just using `this.scan = ""` anyway, 
instead of the following:
   ```
       try {
         this.scan =
           (null == scan) ? "" : TableMapReduceUtil.convertScanToString(scan);
       } catch (IOException e) {
         LOG.warn("Failed to convert Scan to String", e);
       }
   ```
   I also prefer not to add a new constructor.

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableSplit.java
##########
@@ -184,9 +184,24 @@ public TableSplit(final byte [] tableName, byte[] 
startRow, byte[] endRow,
    * @param startRow The start row of the split.
    * @param endRow The end row of the split.
    * @param location The location of the region.
+   * @param encodedRegionName The region ID.
+   * @param length Size of region in bytes
    */
   public TableSplit(TableName tableName, byte[] startRow, byte[] endRow,
-      final String location) {
+    final String location, final String encodedRegionName, long length) {
+    this(tableName, null, startRow, endRow, location, encodedRegionName, 
length);

Review comment:
       iff we make sure the scan is useless here 




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to