This is an automated email from the ASF dual-hosted git repository.
jackietien pushed a commit to branch dev/1.3
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/dev/1.3 by this push:
new 9353c596b67 [To dev/1.3] Update License file (#16395)
9353c596b67 is described below
commit 9353c596b67dfa371d903d732e5b8bbc05eeb290
Author: Jackie Tien <[email protected]>
AuthorDate: Thu Sep 11 14:13:48 2025 +0800
[To dev/1.3] Update License file (#16395)
---
LICENSE | 33 +++++++++
.../apache/iotdb/cli/IoTDBSyntaxHighlighter.java | 80 ----------------------
.../java/org/apache/iotdb/metrics/type/Timer.java | 16 +++--
3 files changed, 43 insertions(+), 86 deletions(-)
diff --git a/LICENSE b/LICENSE
index 6e1d4e59d3d..3f3de45e81a 100644
--- a/LICENSE
+++ b/LICENSE
@@ -211,6 +211,16 @@ The following files include code modified from Apache
HBase project.
./iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/StateMachineProcedure.java
./iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/TimeoutExecutorThread.java
./iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/StoppableThread.java
+./iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/CompletedProcedureRecycler.java
+./iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/RootProcedureStack.java
+./iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/scheduler/AbstractProcedureScheduler.java
+./iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/scheduler/ProcedureScheduler.java
+./iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/scheduler/SimpleProcedureScheduler.java
+./iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/ratis/metrics/RefCountingMap.java
+./iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/quotas/DataNodeThrottleQuotaManager.java
+./iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/quotas/DefaultOperationQuota.java
+./iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/quotas/NoopOperationQuota.java
+./iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/rescon/quotas/QuotaLimiter.java
Project page: https://github.com/apache/hbase
License: https://github.com/apache/hbase/blob/master/LICENSE.txt
@@ -257,6 +267,17 @@ The following files include code modified from Trino
project.
./iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceState.java
./iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceStateMachine.java
./iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/planner/LocalExecutionPlanner.java
+iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/common/QueryId.java
+iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/FutureStateChange.java
+iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/QueryIdGenerator.java
+iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentInstanceFailureInfo.java
+iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/fragment/FragmentState.java
+iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/ExchangeOperator.java
+iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/queue/multilevelqueue/DriverTaskHandle.java
+iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/queue/multilevelqueue/MultilevelPriorityQueue.java
+iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/schedule/queue/multilevelqueue/Priority.java
+iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/SetThreadName.java
+iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/stats/CpuTimer.java
Trino is open source software licensed under the Apache License 2.0 and
supported by the Trino Software Foundation.
Project page: https://github.com/trinodb/trino
@@ -270,3 +291,15 @@ The following files include code modified from Apache
Kafka project.
Project page: https://github.com/apache/kafka
License: https://github.com/apache/kafka/blob/trunk/LICENSE
+
+--------------------------------------------------------------------------------
+
+The following files include code modified from Dropwizard Metrics project.
+
+./iotdb-core/metrics/core/src/main/java/org/apache/iotdb/metrics/core/utils/IoTDBCachedGauge.java
+./iotdb-core/metrics/core/src/main/java/org/apache/iotdb/metrics/core/utils/IoTDBMetricObjNameFactory.java
+./iotdb-core/metrics/core/src/main/java/org/apache/iotdb/metrics/core/utils/IoTDBMovingAverage.java
+
+Copyright (c) 2010-2013 Coda Hale, Yammer.com, 2014-2021 Dropwizard Team
+Project page: https://github.com/dropwizard/metrics
+License: https://github.com/dropwizard/metrics/blob/release/4.2.x/LICENSE
diff --git
a/iotdb-client/cli/src/main/java/org/apache/iotdb/cli/IoTDBSyntaxHighlighter.java
b/iotdb-client/cli/src/main/java/org/apache/iotdb/cli/IoTDBSyntaxHighlighter.java
deleted file mode 100644
index a9e66f1f506..00000000000
---
a/iotdb-client/cli/src/main/java/org/apache/iotdb/cli/IoTDBSyntaxHighlighter.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.iotdb.cli;
-
-import org.apache.iotdb.cli.utils.JlineUtils;
-import org.apache.iotdb.db.qp.sql.SqlLexer;
-
-import org.antlr.v4.runtime.CharStream;
-import org.antlr.v4.runtime.CharStreams;
-import org.antlr.v4.runtime.Token;
-import org.jline.reader.Highlighter;
-import org.jline.reader.LineReader;
-import org.jline.utils.AttributedString;
-import org.jline.utils.AttributedStringBuilder;
-import org.jline.utils.AttributedStyle;
-
-import java.util.regex.Pattern;
-
-import static org.jline.utils.AttributedStyle.DEFAULT;
-import static org.jline.utils.AttributedStyle.GREEN;
-
-public class IoTDBSyntaxHighlighter implements Highlighter {
-
- private static final AttributedStyle KEYWORD_STYLE =
DEFAULT.foreground(GREEN);
-
- @Override
- public AttributedString highlight(LineReader reader, String buffer) {
- CharStream stream = CharStreams.fromString(buffer);
- SqlLexer tokenSource = new SqlLexer(stream);
- tokenSource.removeErrorListeners();
- AttributedStringBuilder builder = new AttributedStringBuilder();
- while (true) {
- Token token = tokenSource.nextToken();
- int type = token.getType();
- if (type == Token.EOF) {
- break;
- }
- String text = token.getText();
-
- if (isKeyword(text)) {
- builder.styled(KEYWORD_STYLE, text);
- } else {
- builder.append(text);
- }
- }
-
- return builder.toAttributedString();
- }
-
- @Override
- public void setErrorPattern(Pattern errorPattern) {
- // This method is not needed.
- }
-
- @Override
- public void setErrorIndex(int errorIndex) {
- // This method is not needed.
- }
-
- private boolean isKeyword(String token) {
- return JlineUtils.SQL_KEYWORDS.contains(token.toUpperCase());
- }
-}
diff --git
a/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/type/Timer.java
b/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/type/Timer.java
index 0f7478991f1..95f5953c9f9 100644
---
a/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/type/Timer.java
+++
b/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/type/Timer.java
@@ -22,24 +22,28 @@ package org.apache.iotdb.metrics.type;
import java.util.Map;
import java.util.concurrent.TimeUnit;
+import static java.util.concurrent.TimeUnit.MICROSECONDS;
+import static java.util.concurrent.TimeUnit.MILLISECONDS;
+import static java.util.concurrent.TimeUnit.NANOSECONDS;
+
public interface Timer extends IMetric {
/** Update time of timer. */
void update(long duration, TimeUnit unit);
/** Update timer by millisecond. */
- default void updateMillis(long durationMillis) {
- update(durationMillis, TimeUnit.MILLISECONDS);
+ default void updateMillis(long duration) {
+ update(duration, MILLISECONDS);
}
/** Update timer by microseconds. */
- default void updateMicros(long durationMicros) {
- update(durationMicros, TimeUnit.MICROSECONDS);
+ default void updateMicros(long duration) {
+ update(duration, MICROSECONDS);
}
/** Update timer by nanoseconds. */
- default void updateNanos(long durationNanos) {
- update(durationNanos, TimeUnit.NANOSECONDS);
+ default void updateNanos(long duration) {
+ update(duration, NANOSECONDS);
}
/** Take snapshot of timer. */