From commits-return-25025-archive-asf-public=cust-asf.ponee.io@accumulo.apache.org Mon Jun 7 12:22:40 2021 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mxout1-he-de.apache.org (mxout1-he-de.apache.org [95.216.194.37]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id 0D34518068A for ; Mon, 7 Jun 2021 14:22:40 +0200 (CEST) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-he-de.apache.org (ASF Mail Server at mxout1-he-de.apache.org) with SMTP id 77CD76078C for ; Mon, 7 Jun 2021 12:22:39 +0000 (UTC) Received: (qmail 80994 invoked by uid 500); 7 Jun 2021 12:22:38 -0000 Mailing-List: contact commits-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list commits@accumulo.apache.org Received: (qmail 80925 invoked by uid 99); 7 Jun 2021 12:22:38 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jun 2021 12:22:38 +0000 Received: by gitbox.apache.org (ASF Mail Server at gitbox.apache.org, from userid 33) id 963B081A86; Mon, 7 Jun 2021 12:22:38 +0000 (UTC) Date: Mon, 07 Jun 2021 12:22:38 +0000 To: "commits@accumulo.apache.org" Subject: [accumulo] branch main updated: Modify default compaction planner opts to include internal type (#2140) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Message-ID: <162306855835.13747.5346587097602210246@gitbox.apache.org> From: dlmarion@apache.org X-Git-Host: gitbox.apache.org X-Git-Repo: accumulo X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Oldrev: 3dc2bb736995ef9a4bd78eedaeda2e2c59585338 X-Git-Newrev: 7cc8607a7ba36d8637034fbaa45a340d6f42ba1f X-Git-Rev: 7cc8607a7ba36d8637034fbaa45a340d6f42ba1f X-Git-NotificationType: ref_changed_plus_diff X-Git-Multimail-Version: 1.5.dev Auto-Submitted: auto-generated This is an automated email from the ASF dual-hosted git repository. dlmarion pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/accumulo.git The following commit(s) were added to refs/heads/main by this push: new 7cc8607 Modify default compaction planner opts to include internal type (#2140) 7cc8607 is described below commit 7cc8607a7ba36d8637034fbaa45a340d6f42ba1f Author: Dave Marion AuthorDate: Mon Jun 7 08:22:28 2021 -0400 Modify default compaction planner opts to include internal type (#2140) Modify default compaction planner opts to include internal type. This was causing CompactionIT to fail as seen in #2137 Co-authored-by: Christopher Tubbs --- .../accumulo/core/spi/compaction/DefaultCompactionPlanner.java | 7 +++++-- .../org/apache/accumulo/tserver/compactions/CompactionManager.java | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/apache/accumulo/core/spi/compaction/DefaultCompactionPlanner.java b/core/src/main/java/org/apache/accumulo/core/spi/compaction/DefaultCompactionPlanner.java index 2e1ae90..2cd1b96 100644 --- a/core/src/main/java/org/apache/accumulo/core/spi/compaction/DefaultCompactionPlanner.java +++ b/core/src/main/java/org/apache/accumulo/core/spi/compaction/DefaultCompactionPlanner.java @@ -161,8 +161,11 @@ public class DefaultCompactionPlanner implements CompactionPlanner { CompactionExecutorId ceid; - Objects.requireNonNull(executorConfig.type, - "'type' is a required and must be 'internal' or 'external'"); + // If not supplied, GSON will leave type null. Default to internal + if (executorConfig.type == null) { + executorConfig.type = "internal"; + } + switch (executorConfig.type) { case "internal": Preconditions.checkArgument(null == executorConfig.queue, diff --git a/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/CompactionManager.java b/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/CompactionManager.java index a15684e..ae567b8 100644 --- a/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/CompactionManager.java +++ b/server/tserver/src/main/java/org/apache/accumulo/tserver/compactions/CompactionManager.java @@ -148,7 +148,7 @@ public class CompactionManager { Map defaultServiceConfigs = Map.of(defaultServicePrefix + "planner", DefaultCompactionPlanner.class.getName(), defaultServicePrefix + "planner.opts.executors", - "[{'name':'deprecated','numThreads':" + numThreads + "}]"); + "[{'name':'deprecated', 'numThreads':" + numThreads + "}]"); configsCopy.putAll(defaultServiceConfigs);