You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2022/04/19 08:34:00 UTC
[iotdb] branch master updated: Optimize dependencies management to reduce the lib size (#5582)
This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 3d93a7764f Optimize dependencies management to reduce the lib size (#5582)
3d93a7764f is described below
commit 3d93a7764fdcf605d2b50b650a50feef9e00e896
Author: Haonan <hh...@outlook.com>
AuthorDate: Tue Apr 19 16:33:54 2022 +0800
Optimize dependencies management to reduce the lib size (#5582)
---
LICENSE | 1 +
cross-tests/pom.xml | 2 ++
influxdb-protocol/pom.xml | 2 +-
server/pom.xml | 1 +
.../apache/iotdb/db/utils/EnvironmentUtils.java | 0
.../org/apache/iotdb/db/utils/SchemaTestUtils.java | 0
.../iotdb/tsfile/encoding/decoder/FreqDecoder.java | 26 +++++++++++--------
.../iotdb/tsfile/encoding/encoder/FreqEncoder.java | 26 +++++++++++--------
.../apache/iotdb/tsfile/utils/BitConstructor.java | 30 ++++++++++++----------
9 files changed, 52 insertions(+), 36 deletions(-)
diff --git a/LICENSE b/LICENSE
index d84f2bd354..e7cbf55047 100644
--- a/LICENSE
+++ b/LICENSE
@@ -234,3 +234,4 @@ The following files include code modified from Michael Burman's gorilla-tsc proj
Copyright: 2016-2018 Michael Burman and/or other contributors
Project page: https://github.com/burmanm/gorilla-tsc
License: http://www.apache.org/licenses/LICENSE-2.0
+
diff --git a/cross-tests/pom.xml b/cross-tests/pom.xml
index a25770cace..b040d53215 100644
--- a/cross-tests/pom.xml
+++ b/cross-tests/pom.xml
@@ -56,10 +56,12 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>1.9.0</version>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
+ <scope>test</scope>
</dependency>
</dependencies>
<build>
diff --git a/influxdb-protocol/pom.xml b/influxdb-protocol/pom.xml
index b7541d235e..82344019d1 100644
--- a/influxdb-protocol/pom.xml
+++ b/influxdb-protocol/pom.xml
@@ -66,7 +66,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>${junit.version}</version>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
diff --git a/server/pom.xml b/server/pom.xml
index eab0492825..e6c9c29adf 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -237,6 +237,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.iotdb</groupId>
diff --git a/server/src/main/java/org/apache/iotdb/db/utils/EnvironmentUtils.java b/server/src/test/java/org/apache/iotdb/db/utils/EnvironmentUtils.java
similarity index 100%
rename from server/src/main/java/org/apache/iotdb/db/utils/EnvironmentUtils.java
rename to server/src/test/java/org/apache/iotdb/db/utils/EnvironmentUtils.java
diff --git a/server/src/main/java/org/apache/iotdb/db/utils/SchemaTestUtils.java b/server/src/test/java/org/apache/iotdb/db/utils/SchemaTestUtils.java
similarity index 100%
rename from server/src/main/java/org/apache/iotdb/db/utils/SchemaTestUtils.java
rename to server/src/test/java/org/apache/iotdb/db/utils/SchemaTestUtils.java
diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/FreqDecoder.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/FreqDecoder.java
index 3797681738..e4df75cb9d 100644
--- a/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/FreqDecoder.java
+++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/FreqDecoder.java
@@ -1,18 +1,22 @@
/*
- * Copyright 2021 The Apache Software Foundation.
+ * 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
*
- * Licensed 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
*
- * 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.
+ * 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.tsfile.encoding.decoder;
import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding;
diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/FreqEncoder.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/FreqEncoder.java
index 39e5c4e6be..dafa96384d 100644
--- a/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/FreqEncoder.java
+++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/encoder/FreqEncoder.java
@@ -1,18 +1,22 @@
/*
- * Copyright 2021 The Apache Software Foundation.
+ * 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
*
- * Licensed 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
*
- * 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.
+ * 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.tsfile.encoding.encoder;
import org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding;
diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/utils/BitConstructor.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/utils/BitConstructor.java
index 444927f6cb..307797bb37 100644
--- a/tsfile/src/main/java/org/apache/iotdb/tsfile/utils/BitConstructor.java
+++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/utils/BitConstructor.java
@@ -1,18 +1,22 @@
/*
- * Copyright 2021 The Apache Software Foundation.
+ * 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
*
- * Licensed 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
*
- * 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.
+ * 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.tsfile.utils;
import org.eclipse.collections.impl.list.mutable.primitive.ByteArrayList;
@@ -81,8 +85,8 @@ public class BitConstructor {
if (cnt == 0) {
data.addAll(bytes);
} else {
- for (int i = 0; i < bytes.length; i++) {
- add(bytes[i], 8);
+ for (byte aByte : bytes) {
+ add(aByte, 8);
}
}
}