KiteSoar commented on code in PR #17772:
URL: https://github.com/apache/hudi/pull/17772#discussion_r2661533402


##########
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/execution/TestBoundedInMemoryQueue.java:
##########
@@ -310,7 +311,7 @@ public void testException() throws Exception {
     when(mockHoodieRecordsIterator.hasNext()).thenReturn(true);
     when(mockHoodieRecordsIterator.next()).thenThrow(expectedException);
     BoundedInMemoryQueue<HoodieRecord, Tuple2<HoodieRecord, 
Option<IndexedRecord>>> queue2 =
-        new BoundedInMemoryQueue(memoryLimitInBytes, 
getTransformerInternal(HoodieTestDataGenerator.AVRO_SCHEMA, writeConfig));
+        new BoundedInMemoryQueue(memoryLimitInBytes, 
getTransformerInternal(HoodieSchema.fromAvroSchema(HoodieTestDataGenerator.AVRO_SCHEMA),
 writeConfig));

Review Comment:
   done



##########
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/execution/TestBoundedInMemoryQueue.java:
##########
@@ -274,15 +275,15 @@ public void testException() throws Exception {
     final SizeEstimator<Tuple2<HoodieRecord, Option<IndexedRecord>>> 
sizeEstimator = new DefaultSizeEstimator<>();
     // queue memory limit
     HoodieLazyInsertIterable.HoodieInsertValueGenResult genResult =
-        getTransformerInternal(HoodieTestDataGenerator.AVRO_SCHEMA, 
writeConfig).apply(hoodieRecords.get(0));
-    final long objSize = sizeEstimator.sizeEstimate(new 
Tuple2(genResult.getResult(), 
genResult.getResult().toIndexedRecord(HoodieTestDataGenerator.AVRO_SCHEMA, new 
Properties())));
+        
getTransformerInternal(HoodieSchema.fromAvroSchema(HoodieTestDataGenerator.AVRO_SCHEMA),
 writeConfig).apply(hoodieRecords.get(0));
+    final long objSize = sizeEstimator.sizeEstimate(new 
Tuple2(genResult.getResult(), 
genResult.getResult().toIndexedRecord(HoodieTestDataGenerator.HOODIE_SCHEMA, 
new Properties())));
     final long memoryLimitInBytes = 4 * objSize;
 
     // first let us throw exception from queueIterator reader and test that 
queueing thread
     // stops and throws
     // correct exception back.
     BoundedInMemoryQueue<HoodieRecord, Tuple2<HoodieRecord, 
Option<IndexedRecord>>> queue1 =
-        new BoundedInMemoryQueue(memoryLimitInBytes, 
getTransformerInternal(HoodieTestDataGenerator.AVRO_SCHEMA, writeConfig));
+        new BoundedInMemoryQueue(memoryLimitInBytes, 
getTransformerInternal(HoodieSchema.fromAvroSchema(HoodieTestDataGenerator.AVRO_SCHEMA),
 writeConfig));

Review Comment:
   done



##########
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/execution/TestBoundedInMemoryQueue.java:
##########
@@ -225,11 +226,11 @@ public void testMemoryLimitForBuffering() throws 
Exception {
     final int recordLimit = 5;
     final SizeEstimator<HoodieLazyInsertIterable.HoodieInsertValueGenResult> 
sizeEstimator = new DefaultSizeEstimator<>();
     HoodieLazyInsertIterable.HoodieInsertValueGenResult genResult =
-        getTransformerInternal(HoodieTestDataGenerator.AVRO_SCHEMA, 
writeConfig).apply(hoodieRecords.get(0));
+        
getTransformerInternal(HoodieSchema.fromAvroSchema(HoodieTestDataGenerator.AVRO_SCHEMA),
 writeConfig).apply(hoodieRecords.get(0));
     final long objSize = sizeEstimator.sizeEstimate(genResult);
     final long memoryLimitInBytes = recordLimit * objSize;
     final BoundedInMemoryQueue<HoodieRecord, 
HoodieLazyInsertIterable.HoodieInsertValueGenResult> queue =
-        new BoundedInMemoryQueue(memoryLimitInBytes, 
getTransformerInternal(HoodieTestDataGenerator.AVRO_SCHEMA, writeConfig));
+        new BoundedInMemoryQueue(memoryLimitInBytes, 
getTransformerInternal(HoodieSchema.fromAvroSchema(HoodieTestDataGenerator.AVRO_SCHEMA),
 writeConfig));

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]

Reply via email to