You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "liuxiaocs7 (via GitHub)" <gi...@apache.org> on 2026/06/01 09:57:08 UTC

Re: [PR] HBASE-30183 Refactoring scanner related code in hbase-thrift and hbase-rest [hbase]

liuxiaocs7 commented on code in PR #8284:
URL: https://github.com/apache/hbase/pull/8284#discussion_r3333225933


##########
hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftSpnegoHttpServer.java:
##########
@@ -194,11 +222,16 @@ protected void talkToThriftServer(String url, int customHeaderSize) throws Excep
       }
       TestThriftServer.createTestTables(client);
       TestThriftServer.checkTableList(client);
+
+      TProtocol prop2 = new TBinaryProtocol(tHttpClient2);
+      Hbase.Client client2 = new Hbase.Client(prot, prop2);

Review Comment:
   Should this be `new Hbase.Client(prop2)` instead?



##########
hbase-thrift/src/test/java/org/apache/hadoop/hbase/thrift/TestThriftSpnegoHttpServer.java:
##########
@@ -167,11 +174,32 @@ public void testRunThriftServerWithHeaderBufferLength() throws Exception {
     super.testRunThriftServerWithHeaderBufferLength();
   }
 
+  private void testScanWithDifferentClients(Hbase.Client client, Hbase.Client client2)
+    throws Exception {
+    List<Mutation> mutations = new ArrayList<>(1);
+    mutations
+      .add(new Mutation(false, TestThriftServer.columnAAname, TestThriftServer.valueAname, true));
+    client.mutateRow(TestThriftServer.tableAname, TestThriftServer.rowAname, mutations,
+      Collections.emptyMap());
+
+    int id = client.scannerOpen(TestThriftServer.tableAname, ByteBuffer.allocate(0),
+      Collections.emptyList(), Collections.emptyMap());
+
+    assertThrows(Exception.class, () -> client2.scannerGet(id));
+    assertThrows(Exception.class, () -> client2.scannerClose(id));

Review Comment:
    Could we narrow this assertion?



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

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org