This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new b2edc8051e9 Revert "[enhancement](export) filter empty partition
before export table to r…" (#35317)
b2edc8051e9 is described below
commit b2edc8051e97e078fa745bd8d7c4830f8b7d07aa
Author: Mingyu Chen <[email protected]>
AuthorDate: Thu May 23 23:45:10 2024 +0800
Revert "[enhancement](export) filter empty partition before export table to
r…" (#35317)
This reverts commit 172c7603e138966366ac63a492dec6b8a32c9ef6.
---
.../main/java/org/apache/doris/load/ExportJob.java | 25 ++++++++--------------
1 file changed, 9 insertions(+), 16 deletions(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/load/ExportJob.java
b/fe/fe-core/src/main/java/org/apache/doris/load/ExportJob.java
index bd5262a8af4..f4cc1b7c997 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/load/ExportJob.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/load/ExportJob.java
@@ -511,23 +511,15 @@ public class ExportJob implements Writable {
// get partitions
// user specifies partitions, already checked in ExportCommand
if (!this.partitionNames.isEmpty()) {
- this.partitionNames.forEach(partitionName -> {
- Partition partition = table.getPartition(partitionName);
- if (partition.hasData()) {
- partitions.add(partition);
- }
- });
+ this.partitionNames.forEach(partitionName ->
partitions.add(table.getPartition(partitionName)));
} else {
- table.getPartitions().forEach(partition -> {
- if (partition.hasData()) {
- partitions.add(partition);
- }
- });
- }
- if (partitions.size() >
Config.maximum_number_of_export_partitions) {
- throw new UserException("The partitions number of this export
job is larger than the maximum number"
- + " of partitions allowed by a export job");
+ if (table.getPartitions().size() >
Config.maximum_number_of_export_partitions) {
+ throw new UserException("The partitions number of this
export job is larger than the maximum number"
+ + " of partitions allowed by a export job");
+ }
+ partitions.addAll(table.getPartitions());
}
+
// get tablets
for (Partition partition : partitions) {
// Partition data consistency is not need to verify partition
version.
@@ -597,7 +589,8 @@ public class ExportJob implements Writable {
List<Long> tabletsList = new
ArrayList<>(flatTabletIdList.subList(start, start + tabletsNum));
List<List<Long>> tablets = new ArrayList<>();
for (int i = 0; i < tabletsList.size(); i +=
MAXIMUM_TABLETS_OF_OUTFILE_IN_EXPORT) {
- int end = Math.min(i + MAXIMUM_TABLETS_OF_OUTFILE_IN_EXPORT,
tabletsList.size());
+ int end = i + MAXIMUM_TABLETS_OF_OUTFILE_IN_EXPORT <
tabletsList.size()
+ ? i + MAXIMUM_TABLETS_OF_OUTFILE_IN_EXPORT :
tabletsList.size();
tablets.add(new ArrayList<>(tabletsList.subList(i, end)));
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]