lightzhao commented on code in PR #6100:
URL: https://github.com/apache/seatunnel/pull/6100#discussion_r1439116093
##########
seatunnel-e2e/seatunnel-connector-v2-e2e/connector-hbase-e2e/src/test/java/org/apache/seatunnel/e2e/connector/hbase/HbaseIT.java:
##########
@@ -143,4 +146,32 @@ public void testHbaseSink(TestContainer container) throws
IOException, Interrupt
}
Assertions.assertEquals(results.size(), 5);
}
+
+ @TestTemplate
+ public void testHbaseSinkWithArray(TestContainer container)
+ throws IOException, InterruptedException {
+ Container.ExecResult execResult =
container.executeJob("/fake-to-hbase-array.conf");
+ Assertions.assertEquals(0, execResult.getExitCode());
+ Table hbaseTable = hbaseConnection.getTable(table);
+ Scan scan = new Scan();
+ ArrayList<Result> results = new ArrayList<>();
+ ResultScanner scanner = hbaseTable.getScanner(scan);
+ for (Result result : scanner) {
+ System.out.println("Row Key: " + Bytes.toString(result.getRow()));
Review Comment:
done.
##########
seatunnel-e2e/seatunnel-connector-v2-e2e/connector-hbase-e2e/src/test/java/org/apache/seatunnel/e2e/connector/hbase/HbaseIT.java:
##########
@@ -143,4 +146,32 @@ public void testHbaseSink(TestContainer container) throws
IOException, Interrupt
}
Assertions.assertEquals(results.size(), 5);
}
+
+ @TestTemplate
+ public void testHbaseSinkWithArray(TestContainer container)
+ throws IOException, InterruptedException {
+ Container.ExecResult execResult =
container.executeJob("/fake-to-hbase-array.conf");
+ Assertions.assertEquals(0, execResult.getExitCode());
+ Table hbaseTable = hbaseConnection.getTable(table);
+ Scan scan = new Scan();
+ ArrayList<Result> results = new ArrayList<>();
+ ResultScanner scanner = hbaseTable.getScanner(scan);
+ for (Result result : scanner) {
+ System.out.println("Row Key: " + Bytes.toString(result.getRow()));
+ for (Cell cell : result.listCells()) {
+ String columnFamily =
Bytes.toString(CellUtil.cloneFamily(cell));
+ String columnName =
Bytes.toString(CellUtil.cloneQualifier(cell));
+ String value = Bytes.toString(CellUtil.cloneValue(cell));
+ System.out.println(
+ "Column Family: "
+ + columnFamily
+ + ", Column Name: "
+ + columnName
+ + ", Value: "
+ + value);
Review Comment:
done.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]