xushiyan commented on a change in pull request #3744:
URL: https://github.com/apache/hudi/pull/3744#discussion_r726681254
##########
File path:
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/client/functional/TestHoodieBackedMetadata.java
##########
@@ -315,12 +314,13 @@ public void
testTableOperationsWithRestore(HoodieTableType tableType) throws Exc
newCommitTime = "006";
client.startCommitWithTime(newCommitTime);
records = dataGen.generateUpdates(newCommitTime, 5);
- writeStatuses = client.upsert(jsc.parallelize(records, 1),
newCommitTime).collect();
+ writeStatuses = client.upsert(jsc().parallelize(records, 1),
newCommitTime).collect();
assertNoWriteErrors(writeStatuses);
validateMetadata(client);
// Compaction
if (metaClient.getTableType() == HoodieTableType.MERGE_ON_READ) {
+ LOG.warn(getDirectoryTree(basePath(), ".crc"));
newCommitTime = "007";
client.scheduleCompactionAtInstant(newCommitTime, Option.empty());
client.compact(newCommitTime);
Review comment:
ditto
##########
File path:
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/client/functional/TestHoodieBackedMetadata.java
##########
@@ -283,28 +281,29 @@ public void
testTableOperationsWithRestore(HoodieTableType tableType) throws Exc
validateMetadata(client);
records = dataGen.generateInserts(newCommitTime, 20);
- writeStatuses = client.insert(jsc.parallelize(records, 1),
newCommitTime).collect();
+ writeStatuses = client.insert(jsc().parallelize(records, 1),
newCommitTime).collect();
assertNoWriteErrors(writeStatuses);
validateMetadata(client);
// Write 3 (updates)
newCommitTime = "003";
client.startCommitWithTime(newCommitTime);
records = dataGen.generateUniqueUpdates(newCommitTime, 10);
- writeStatuses = client.upsert(jsc.parallelize(records, 1),
newCommitTime).collect();
+ writeStatuses = client.upsert(jsc().parallelize(records, 1),
newCommitTime).collect();
assertNoWriteErrors(writeStatuses);
validateMetadata(client);
// Write 4 (updates and inserts)
newCommitTime = "004";
client.startCommitWithTime(newCommitTime);
records = dataGen.generateUpdates(newCommitTime, 10);
- writeStatuses = client.upsert(jsc.parallelize(records, 1),
newCommitTime).collect();
+ writeStatuses = client.upsert(jsc().parallelize(records, 1),
newCommitTime).collect();
assertNoWriteErrors(writeStatuses);
validateMetadata(client);
// Compaction
if (metaClient.getTableType() == HoodieTableType.MERGE_ON_READ) {
+ LOG.warn(getDirectoryTree(basePath(), ".crc"));
newCommitTime = "005";
client.scheduleCompactionAtInstant(newCommitTime, Option.empty());
client.compact(newCommitTime);
Review comment:
@nsivabalan this is flaky due to these 2 lines do not work:
`scheduleCompactionAtInstant()` may not be able to request a compaction
successfully then the `compact()` will fail. Think this is just inappropriate
use of compaction scheduling.
--
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]