apurtell commented on a change in pull request #1655:
URL: https://github.com/apache/hbase/pull/1655#discussion_r420353851



##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CustomizedScanInfoBuilder.java
##########
@@ -80,4 +93,19 @@ public KeepDeletedCells getKeepDeletedCells() {
     return keepDeletedCells != null ? keepDeletedCells : 
scanInfo.getKeepDeletedCells();
   }
 
+  @Override
+  public int getMinVersions() {
+    return minVersions != null ? minVersions : scanInfo.getMinVersions();
+  }
+
+  @Override
+  public void setMinVersions(int minVersions) {
+    this.minVersions = minVersions;
+  }
+
+  @Override
+  public Scan getScan() {
+    return scan;

Review comment:
       Changes made on the returned scan object will be effective and visible 
beyond the caller. Clone and return?

##########
File path: 
hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionCoprocessorHost.java
##########
@@ -74,4 +105,73 @@ public void testLoadDuplicateCoprocessor() throws Exception 
{
     // Two duplicate coprocessors loaded
     assertEquals(2, host.coprocEnvironments.size());
   }
-}
\ No newline at end of file
+

Review comment:
       Nice additional tests.

##########
File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CustomizedScanInfoBuilder.java
##########
@@ -34,8 +36,18 @@
 
   private KeepDeletedCells keepDeletedCells = null;
 
+  private Integer minVersions;
+
+  private final Scan scan;
+
   public CustomizedScanInfoBuilder(ScanInfo scanInfo) {
     this.scanInfo = scanInfo;
+    this.scan = new Scan();
+  }
+  public CustomizedScanInfoBuilder(ScanInfo scanInfo, Scan scan) throws 
IOException {

Review comment:
       The Scan constructor throws IOE now?? Not an issue for this patch, though




----------------------------------------------------------------
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]


Reply via email to