You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by ni...@apache.org on 2019/08/05 12:15:46 UTC
[kylin] branch master updated: KYLIN-4107 Fix bug of
StorageCleanupJob fails to delete Hive tables with "Argument list too long"
error
This is an automated email from the ASF dual-hosted git repository.
nic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kylin.git
The following commit(s) were added to refs/heads/master by this push:
new d2c3cd3 KYLIN-4107 Fix bug of StorageCleanupJob fails to delete Hive tables with "Argument list too long" error
d2c3cd3 is described below
commit d2c3cd342777320185604969d5977bbb75d3058c
Author: weibinzhu <co...@126.com>
AuthorDate: Sun Jul 28 14:54:43 2019 +0800
KYLIN-4107 Fix bug of StorageCleanupJob fails to delete Hive tables with "Argument list too long" error
---
.../src/main/java/org/apache/kylin/rest/job/StorageCleanupJob.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/server-base/src/main/java/org/apache/kylin/rest/job/StorageCleanupJob.java b/server-base/src/main/java/org/apache/kylin/rest/job/StorageCleanupJob.java
index c8e73de..2183785 100755
--- a/server-base/src/main/java/org/apache/kylin/rest/job/StorageCleanupJob.java
+++ b/server-base/src/main/java/org/apache/kylin/rest/job/StorageCleanupJob.java
@@ -30,6 +30,7 @@ import java.util.regex.Pattern;
import javax.annotation.Nullable;
+import com.google.common.collect.Lists;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.OptionBuilder;
import org.apache.commons.cli.Options;
@@ -378,7 +379,10 @@ public class StorageCleanupJob extends AbstractApplication {
if (delete) {
try {
- deleteHiveTables(allHiveTablesNeedToBeDeleted, segmentId2JobId);
+ List<List<String>> tablesList = Lists.partition(allHiveTablesNeedToBeDeleted, 20);
+ for (List<String> tables: tablesList) {
+ deleteHiveTables(tables, segmentId2JobId);
+ }
} catch (IOException e) {
logger.error("Error during deleting Hive tables", e);
}