Skip to content

Commit

Permalink
[HUDI-7362] Fix hudi partition base path scheme to s3 (#10596)
Browse files Browse the repository at this point in the history
  • Loading branch information
parisni authored and yihua committed May 3, 2024
1 parent d1b1b1e commit 68eee61
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public void addPartitionsToTable(String tableName, List<String> partitionsToAdd)
Table table = getTable(awsGlue, databaseName, tableName);
StorageDescriptor sd = table.storageDescriptor();
List<PartitionInput> partitionInputs = partitionsToAdd.stream().map(partition -> {
String fullPartitionPath = FSUtils.getPartitionPath(getBasePath(), partition).toString();
String fullPartitionPath = FSUtils.getPartitionPath(s3aToS3(getBasePath()), partition).toString();
List<String> partitionValues = partitionValueExtractor.extractPartitionValuesInPath(partition);
StorageDescriptor partitionSD = sd.copy(copySd -> copySd.location(fullPartitionPath));
return PartitionInput.builder().values(partitionValues).storageDescriptor(partitionSD).build();
Expand Down Expand Up @@ -189,7 +189,7 @@ public void updatePartitionsToTable(String tableName, List<String> changedPartit
Table table = getTable(awsGlue, databaseName, tableName);
StorageDescriptor sd = table.storageDescriptor();
List<BatchUpdatePartitionRequestEntry> updatePartitionEntries = changedPartitions.stream().map(partition -> {
String fullPartitionPath = FSUtils.getPartitionPath(getBasePath(), partition).toString();
String fullPartitionPath = FSUtils.getPartitionPath(s3aToS3(getBasePath()), partition).toString();
List<String> partitionValues = partitionValueExtractor.extractPartitionValuesInPath(partition);
StorageDescriptor partitionSD = sd.copy(copySd -> copySd.location(fullPartitionPath));
PartitionInput partitionInput = PartitionInput.builder().values(partitionValues).storageDescriptor(partitionSD).build();
Expand Down

0 comments on commit 68eee61

Please sign in to comment.