Skip to content

Commit

Permalink
[RFC-15] Fix partition key in metadata table when bootstrapping from …
Browse files Browse the repository at this point in the history
…file system
  • Loading branch information
Ryan Pifer committed Dec 28, 2020
1 parent 11661dc commit db3cea9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,8 @@ private Map<String, List<FileStatus>> getPartitionsToFilesMapping(JavaSparkConte

if (p.getRight().length > filesInDir.size()) {
// Is a partition. Add all data files to result.
partitionToFileStatus.put(p.getLeft().getName(), filesInDir);
String partitionName = FSUtils.getRelativePartitionPath(new Path(datasetMetaClient.getBasePath()), p.getLeft());
partitionToFileStatus.put(partitionName, filesInDir);
} else {
// Add sub-dirs to the queue
pathsToList.addAll(Arrays.stream(p.getRight())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.EnumSource;
import org.junit.jupiter.params.provider.ValueSource;

public class TestHoodieBackedMetadata extends HoodieClientTestHarness {
Expand Down Expand Up @@ -406,6 +405,7 @@ public void testRollbackUnsyncedCommit() throws Exception {
//@ParameterizedTest
//@EnumSource(HoodieTableType.class)
//public void testSync(HoodieTableType tableType) throws Exception {
@Test
public void testSync() throws Exception {
//FIXME(metadata): This is broken for MOR, until HUDI-1434 is fixed
init(HoodieTableType.COPY_ON_WRITE);
Expand Down

0 comments on commit db3cea9

Please sign in to comment.