kasakrisz commented on code in PR #6145:
URL: https://github.com/apache/hive/pull/6145#discussion_r2451854853
##########
streaming/src/test/org/apache/hive/streaming/TestStreaming.java:
##########
@@ -406,27 +394,27 @@ public void testNoBuckets() throws Exception {
Assert.assertTrue(rs.get(4),
rs.get(4).startsWith("{\"writeid\":3,\"bucketid\":536870912,\"rowid\":1}\ta7\tb8"));
Assert.assertTrue(rs.get(4),
rs.get(4).endsWith("streamingnobuckets/delta_0000002_0000003/bucket_00000"));
- queryTable(driver, "update default.streamingnobuckets set a=0, b=0 where
a='a7'");
- queryTable(driver, "delete from default.streamingnobuckets where a='a1'");
+ runQuery(driver, "update default.streamingnobuckets set a=0, b=0 where
a='a7'");
+ runQuery(driver, "delete from default.streamingnobuckets where a='a1'");
rs = queryTable(driver, "select a, b from default.streamingnobuckets order
by a, b");
int row = 0;
Assert.assertEquals("at row=" + row, "0\t0", rs.get(row++));
Assert.assertEquals("at row=" + row, "a3\tb4", rs.get(row++));
Assert.assertEquals("at row=" + row, "a5\tb6", rs.get(row++));
- Assert.assertEquals("at row=" + row, "foo\tbar", rs.get(row++));
+ Assert.assertEquals("at row=" + row, "foo\tbar", rs.get(row));
Review Comment:
nit.:
This would be easier to understand
```
rs.get(0)
rs.get(1)
...
```
##########
streaming/src/test/org/apache/hive/streaming/TestStreaming.java:
##########
@@ -2908,7 +2807,7 @@ public void testErrorHandling()
connection.close();
Exception expectedEx = null;
GetOpenTxnsInfoResponse r = msClient.showTxns();
- Assert.assertEquals("HWM didn'table match", 17,
r.getTxn_high_water_mark());
+ Assert.assertEquals("HWM didn'table match", 9, r.getTxn_high_water_mark());
Review Comment:
type: `didn'table`
##########
streaming/src/test/org/apache/hive/streaming/TestStreaming.java:
##########
@@ -1826,31 +1754,29 @@ public void testTransactionBatchAbort() throws
Exception {
connection.close();
checkNothingWritten(partLoc);
-
}
@Test(expected = ClassCastException.class)
public void testFileSystemError() throws Exception {
// Bad file system object, ClassCastException should occur during record
writer init
- conf.set("fs.raw.impl", Object.class.getName());
+ conf.set("fs.raw.impl", TestStreaming.class.getName());
StrictDelimitedInputWriter writer = StrictDelimitedInputWriter.newBuilder()
- .withFieldDelimiter(',')
- .build();
+ .withFieldDelimiter(',')
+ .build();
HiveStreamingConnection connection = HiveStreamingConnection.newBuilder()
- .withDatabase(dbName)
- .withTable(tblName)
- .withStaticPartitionValues(partitionVals)
- .withAgentInfo("UT_" + Thread.currentThread().getName())
- .withRecordWriter(writer)
- .withHiveConf(conf)
- .connect();
+ .withDatabase(dbName)
+ .withTable(tblName)
+ .withStaticPartitionValues(partitionVals)
+ .withAgentInfo("UT_" + Thread.currentThread().getName())
+ .withRecordWriter(writer)
+ .withHiveConf(conf)
+ .connect();
Review Comment:
The indentation changed. Was this intentional?
##########
streaming/src/test/org/apache/hive/streaming/TestStreaming.java:
##########
@@ -1939,16 +1867,18 @@ public void testMultipleTransactionBatchCommits()
throws Exception {
connection.write("3,Hello streaming - once again".getBytes());
connection.commitTransaction();
- checkDataWritten2(partLoc, 1, 20, 2, validationQuery, false, "1\tHello
streaming",
- "2\tWelcome to streaming", "3\tHello streaming - once again");
+ checkDataWritten(partLoc, 1, 20, 2, validationQuery,
+ "1\tHello streaming", "2\tWelcome to streaming",
Review Comment:
nit. How about moving each record to a new line?
```
"1\tHello streaming",
"2\tWelcome to streaming",
"3\tHello streaming - once again"
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]