Skip to content

Commit 03a1fef

Browse files
wangzelin19961202ob-robot
authored andcommitted
2 parents 3cdcdf3 + 7613abd commit 03a1fef

File tree

11 files changed

+45
-17
lines changed

11 files changed

+45
-17
lines changed

.secignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
##########################################################
2+
# OBFlow Secret Scan Ignore List #
3+
##########################################################
4+
# Above the segmentation lines there are suspected privacy information #
5+
# Please use the file name as the first line and the igored information #
6+
# should be started with tab. #
7+
# Under the segmentation lines there are the folders which you need to ignore #
8+
##########################################################
9+
**
10+
http://license.coscl.org.cn/MulanPSL2
11+
https://open.oceanbase.com/
12+
https://open.oceanbase.com
13+
https://github.com/oceanbase/oceanbase
14+
https://github.com/oceanbase/oceanbase/issues
15+
https://open.oceanbase.com
16+
https://www.contributor-covenant.org/*
17+
http://reveng.sourceforge.net/crc-catalogue/17plus.htm
18+
http://murmurhash.googlepages.com/
19+
**/*.cpp
20+
http://www.gnu.org/licenses/
21+
--------------------------------------------------------
22+
# Should use GLOB wildcard to config and analysis the ignored folder
23+
# The root patch should start with '/'
24+
/README.md
25+
/.git/hooks/fsmonitor-watchman.sample
26+
/pom.xml
27+
/example/simple-table-demo/pom.xml
28+
/example/simple-kv-demo/pom.xml
29+
/CONTRIBUTING.md
30+
/src/test/java/com/alipay/oceanbase/rpc/location/model/ObUserAuthTest.java
31+
/src/main/java/com/alipay/oceanbase/rpc/util/Base64.java
32+
/.oceanbase-common/**
33+
/src/main/resources/oceanbase-table-client/log/log4j/**
34+
--------------------------------------------------------
35+
# Config the ignored fold to escape the Chinese scan by GLOB wildcard

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ The code demo:
5252
```
5353
**NOTE:**
5454
1. param_url is generated by ConfigServer (link TODO).
55-
2. More example [Demo](https://github.com/oceanbase/obkv-table-client-java/tree/master/example)
55+
2. More example [Demo](https://github.com/oceanbase/obkv-table-client-java/tree/master/example)
56+
5657
## Documentation
5758

5859
- English [Coming soon]

src/main/java/com/alipay/oceanbase/rpc/bolt/protocol/ObTablePacket.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ public ByteBuf getPacketContentBuf() {
137137
* Release byte buf.
138138
*/
139139
public void releaseByteBuf() {
140-
// http://netty.io/wiki/reference-counted-objects.html
141140
if (packetContentBuf != null) {
142141
packetContentBuf.release();
143142
}

src/main/java/com/alipay/oceanbase/rpc/protocol/payload/impl/ObObjType.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,6 @@ public Comparable parseToComparable(Object o, ObCollationType ct)
885885
}
886886
},
887887

888-
// https://dev.mysql.com/doc/refman/5.7/en/datetime.html
889888
// The DATETIME type is used for values that contain both date and time parts.
890889
// MySQL retrieves and displays DATETIME values in 'YYYY-MM-DD HH:MM:SS' format. The supported range is '1000-01-01 00:00:00' to '9999-12-31 23:59:59'.
891890
ObDateTimeType(17) {
@@ -940,7 +939,6 @@ public Timestamp parseToComparable(Object o, ObCollationType ct)
940939
*/
941940
@Override
942941
public byte[] encode(Object obj) {
943-
// TODO 为什么是 Long
944942
return Serialization.encodeVi64(((Date) obj).getTime() * 1000L);
945943
}
946944

@@ -987,7 +985,6 @@ public Timestamp parseToComparable(Object o, ObCollationType ct)
987985
*/
988986
@Override
989987
public byte[] encode(Object obj) {
990-
// TODO 为什么是 Int
991988
return Serialization.encodeVi32((int) ((Date) obj).getTime());
992989
}
993990

src/main/java/com/alipay/oceanbase/rpc/protocol/payload/impl/execute/ObTableOperation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
public class ObTableOperation extends AbstractPayload {
3636

3737
private ObTableOperationType operationType;
38-
private ObITableEntity entity; // TODO 我是如何知道类型的?
38+
private ObITableEntity entity;
3939

4040
/*
4141
* Encode.

src/main/java/com/alipay/oceanbase/rpc/table/ObTable.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -566,9 +566,9 @@ public ObTable build() throws Exception {
566566
* consistency, while each thread call invokeSync for data access, ensuring the sequential consistency.
567567
* <p>
568568
* Thread safety:
569-
* (1) init and close require external synchronization or locking, which should be called only once.
570-
* (2) getConnection from the pool is synchronized, thus thread-safe, .
571-
* (3) ObTableConnection is shared and thread-safe, granted by underlying library.
569+
* (1) init and close require external synchronization or locking, which should be called only once.
570+
* (2) getConnection from the pool is synchronized, thus thread-safe, .
571+
* (3) ObTableConnection is shared and thread-safe, granted by underlying library.
572572
*/
573573
private static class ObTableConnectionPool {
574574
private final int obTableConnectionPoolSize;

src/main/java/com/alipay/oceanbase/rpc/util/CRC64.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ public class CRC64 implements Checksum {
3131
*
3232
* poly=0x42f0e1eba9ea3693 init=0x0 refin=false refout=false xorout=0x0
3333
*
34-
* @url http://en.wikipedia.org/wiki/Cyclic_redundancy_check
3534
* @url http://reveng.sourceforge.net/crc-catalogue/17plus.htm
3635
*/
3736
private static final long[] CRC_TABLE = new long[] { 0x0000000000000000L, 0x42F0E1EBA9EA3693L,

src/main/java/com/alipay/oceanbase/rpc/util/NamePattern.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ public String wrapValue(int value) {
116116
secondValue = value % valueRangeSecond;
117117
}
118118

119-
// 技术上没必要控制得如此严格
120-
// 但是为了统一 DB 层库表分布的元数据,需要控制一下
119+
// 统一 DB 层库表分布的元数据
121120
if (value < minValue || value > maxValue) {
122121
throw new IllegalArgumentException("NamePattern value out of bound. value: " + value
123122
+ ", minValue: " + minValue + ", maxValue: "

src/main/java/com/alipay/oceanbase/rpc/util/hash/ObHashSortUtf8mb4.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2914,7 +2914,6 @@ private static boolean enoughBytesRemaining(ObMbContext ctx, int n) {
29142914
}
29152915

29162916
/*
2917-
* Please refer to : https://en.wikipedia.org/wiki/UTF-8
29182917
* The following table shows how the Unicode code points map to UTF-8 multi-byte byte sequences,
29192918
* and their equivalent binary values.
29202919
* <p>
@@ -2926,8 +2925,8 @@ private static boolean enoughBytesRemaining(ObMbContext ctx, int n) {
29262925
* U+010000-U+10FFFF 000zzzzz yyyyyyyy xxxxxxxx 11110zzz 10zzyyyy 10yyyyxx 10xxxxxx
29272926
* <p>
29282927
* The basic rules are as follows:
2929-
* (1) If a byte starts with a 0 bit, it's a single byte value less than 128.
2930-
* (2) If it starts with 11, it's the first byte of a multi-byte sequence
2928+
* (1) If a byte starts with a 0 bit, it's a single byte value less than 128.
2929+
* (2) If it starts with 11, it's the first byte of a multi-byte sequence
29312930
* and the number of 1 bits at the start indicates how many bytes there are in total,
29322931
* eg., 110xxxxx has two bytes, 1110xxxx has three and 11110xxx has four.
29332932
* (3) If it starts with 10, it's a continuation byte.

src/test/java/com/alipay/oceanbase/rpc/hbase/ObHTableOperationRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public ObTableAbstractOperationRequest obTableOperationRequest() {
123123
ObTableOperationType.INSERT, new Object[] { rowKey, qualifierName, timestamp },
124124
V_COLUMNS, new Object[] { value }, 10 * 1000);
125125
break;
126-
case DEL: // TODO 如何 DEL?
126+
case DEL:
127127
request = ObTableOperationRequest.getInstance(getTargetTableName(),
128128
ObTableOperationType.DEL, new Object[] { rowKey, qualifierName, timestamp },
129129
null, null, 10 * 1000);

0 commit comments

Comments
 (0)