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/02/11 03:31:58 UTC
[iotdb] branch master updated: fix some typos in TsFile module (#5034)
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 1940f5e fix some typos in TsFile module (#5034)
1940f5e is described below
commit 1940f5e4f5186c1effc93e845773689a64c7009b
Author: zhengwen zhu <ah...@gmail.com>
AuthorDate: Fri Feb 11 11:31:21 2022 +0800
fix some typos in TsFile module (#5034)
---
.../org/apache/iotdb/tsfile/common/conf/TSFileConfig.java | 2 +-
.../apache/iotdb/tsfile/encoding/decoder/FloatDecoder.java | 12 ++++++------
.../apache/iotdb/tsfile/encoding/decoder/PlainDecoder.java | 2 +-
.../main/java/org/apache/iotdb/tsfile/utils/BytesUtils.java | 4 ++--
.../java/org/apache/iotdb/tsfile/utils/StringContainer.java | 4 ++--
.../iotdb/tsfile/v2/file/metadata/MetadataIndexNodeV2.java | 2 +-
6 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/common/conf/TSFileConfig.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/common/conf/TSFileConfig.java
index d13f817..060aba9 100644
--- a/tsfile/src/main/java/org/apache/iotdb/tsfile/common/conf/TSFileConfig.java
+++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/common/conf/TSFileConfig.java
@@ -25,7 +25,7 @@ import org.apache.iotdb.tsfile.fileSystem.FSType;
import java.io.Serializable;
import java.nio.charset.Charset;
-/** TSFileConfig is a configure class. Every variables is public and has default value. */
+/** TSFileConfig is a configuration class. Every variable is public and has default value. */
public class TSFileConfig implements Serializable {
/** encoding configuration */
diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/FloatDecoder.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/FloatDecoder.java
index f5690ac..eb627a5 100644
--- a/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/FloatDecoder.java
+++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/FloatDecoder.java
@@ -41,7 +41,7 @@ public class FloatDecoder extends Decoder {
private static final Logger logger = LoggerFactory.getLogger(FloatDecoder.class);
private Decoder decoder;
- /** maxPointValue = 10^(maxPointNumer). maxPointNumber can be read from the stream. */
+ /** maxPointValue = 10^(maxPointNumber). maxPointNumber can be read from the stream. */
private double maxPointValue;
/** flag that indicates whether we have read maxPointNumber and calculated maxPointValue. */
@@ -115,27 +115,27 @@ public class FloatDecoder extends Decoder {
@Override
public Binary readBinary(ByteBuffer buffer) {
- throw new TsFileDecodingException("Method readBinary is not supproted by FloatDecoder");
+ throw new TsFileDecodingException("Method readBinary is not supported by FloatDecoder");
}
@Override
public boolean readBoolean(ByteBuffer buffer) {
- throw new TsFileDecodingException("Method readBoolean is not supproted by FloatDecoder");
+ throw new TsFileDecodingException("Method readBoolean is not supported by FloatDecoder");
}
@Override
public short readShort(ByteBuffer buffer) {
- throw new TsFileDecodingException("Method readShort is not supproted by FloatDecoder");
+ throw new TsFileDecodingException("Method readShort is not supported by FloatDecoder");
}
@Override
public int readInt(ByteBuffer buffer) {
- throw new TsFileDecodingException("Method readInt is not supproted by FloatDecoder");
+ throw new TsFileDecodingException("Method readInt is not supported by FloatDecoder");
}
@Override
public long readLong(ByteBuffer buffer) {
- throw new TsFileDecodingException("Method readLong is not supproted by FloatDecoder");
+ throw new TsFileDecodingException("Method readLong is not supported by FloatDecoder");
}
@Override
diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/PlainDecoder.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/PlainDecoder.java
index 30c3bad..4af1779 100644
--- a/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/PlainDecoder.java
+++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/encoding/decoder/PlainDecoder.java
@@ -78,7 +78,7 @@ public class PlainDecoder extends Decoder {
@Override
public BigDecimal readBigDecimal(ByteBuffer buffer) {
- throw new TsFileDecodingException("Method readBigDecimal is not supproted by PlainDecoder");
+ throw new TsFileDecodingException("Method readBigDecimal is not supported by PlainDecoder");
}
@Override
diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/utils/BytesUtils.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/utils/BytesUtils.java
index eebda60..cd05f10 100644
--- a/tsfile/src/main/java/org/apache/iotdb/tsfile/utils/BytesUtils.java
+++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/utils/BytesUtils.java
@@ -28,9 +28,9 @@ import java.io.InputStream;
import java.util.List;
/**
- * BytesUtils is a utility class. It provide conversion among byte array and other type including
+ * BytesUtils is a utility class. It provides conversion among byte array and other type including
* integer, long, float, boolean, double and string. <br>
- * It also provide other usable function as follow:<br>
+ * It also provide other usable function as follows:<br>
* reading function which receives InputStream. <br>
* concat function to join a list of byte array to one.<br>
* get and set one bit in a byte array.
diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/utils/StringContainer.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/utils/StringContainer.java
index 1ebecf2..bf74245 100644
--- a/tsfile/src/main/java/org/apache/iotdb/tsfile/utils/StringContainer.java
+++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/utils/StringContainer.java
@@ -22,8 +22,8 @@ import java.util.ArrayList;
import java.util.List;
/**
- * this class is used to contact String effectively.It contains a StringBuider and initialize it
- * until {@code toString} is called. Note:it's not thread safety
+ * this class is used to concatenate Strings effectively.It contains a StringBuilder and initialize
+ * it until {@code toString} is called. Note:it's not thread safety
*/
public class StringContainer {
diff --git a/tsfile/src/main/java/org/apache/iotdb/tsfile/v2/file/metadata/MetadataIndexNodeV2.java b/tsfile/src/main/java/org/apache/iotdb/tsfile/v2/file/metadata/MetadataIndexNodeV2.java
index 11d0d1d..a249385 100644
--- a/tsfile/src/main/java/org/apache/iotdb/tsfile/v2/file/metadata/MetadataIndexNodeV2.java
+++ b/tsfile/src/main/java/org/apache/iotdb/tsfile/v2/file/metadata/MetadataIndexNodeV2.java
@@ -32,8 +32,8 @@ public class MetadataIndexNodeV2 {
private MetadataIndexNodeV2() {}
public static MetadataIndexNode deserializeFrom(ByteBuffer buffer) {
- List<MetadataIndexEntry> children = new ArrayList<>();
int size = ReadWriteIOUtils.readInt(buffer);
+ List<MetadataIndexEntry> children = new ArrayList<>(size);
for (int i = 0; i < size; i++) {
children.add(MetadataIndexEntryV2.deserializeFrom(buffer));
}