SteNicholas commented on a change in pull request #2111:
URL: https://github.com/apache/hudi/pull/2111#discussion_r501739942
##########
File path:
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/table/action/commit/TestUpsertPartitioner.java
##########
@@ -286,8 +303,48 @@ public void testUpsertPartitionerWithSmallInsertHandling()
throws Exception {
"Bucket 3 is INSERT");
assertEquals(4, insertBuckets.size(), "Total of 4 insert buckets");
- weights = new Double[] { 0.08, 0.31, 0.31, 0.31};
- cumulativeWeights = new Double[] { 0.08, 0.39, 0.69, 1.0};
+ weights = new Double[] {0.08, 0.31, 0.31, 0.31};
+ cumulativeWeights = new Double[] {0.08, 0.39, 0.69, 1.0};
+ assertInsertBuckets(weights, cumulativeWeights, insertBuckets);
+ }
+
+ @Test
+ public void testInsertPartitionerWithSmallInsertHandling() throws Exception {
+ final String testPartitionPath = "2016/09/26";
+ // Inserts .. Check updates go together & inserts subsplit, after
expanding smallest file
+ UpsertPartitioner partitioner = getInsertPartitioner(1000 * 1024, 400, 800
* 1024, testPartitionPath, false);
+ List<InsertBucketCumulativeWeightPair> insertBuckets =
partitioner.getInsertBuckets(testPartitionPath);
+
+ assertEquals(3, partitioner.numPartitions(), "Should have 3 partitions");
Review comment:
@leesf I didn't get the point you mentioned. Do you mean that this
should add comments to describe how to get 3 expected partitions?
----------------------------------------------------------------
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]