Skip to content

Commit fe8767f

Browse files
whyberthuaiyuan.why
authored andcommitted
update version to 5.13.13
1 parent bc7121b commit fe8767f

File tree

7 files changed

+36
-12
lines changed

7 files changed

+36
-12
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@
99
- 阿里云表格存储是阿里云自主研发的NoSQL数据存储服务,提供海量结构化数据的存储和实时访问。
1010

1111
## 版本
12-
- 当前版本:5.13.12
12+
- 当前版本:5.13.13
1313

1414
## 运行环境
1515
- JDK 6及其以上
1616

1717
## 安装
1818
#### Maven方式
19-
下载[最新版JAR包](https://search.maven.org/remotecontent?filepath=com/aliyun/openservices/tablestore/5.13.6/tablestore-5.13.6.jar)或者通过Maven:
19+
下载[最新版JAR包](https://search.maven.org/remotecontent?filepath=com/aliyun/openservices/tablestore/5.13.13/tablestore-5.13.13.jar)或者通过Maven:
2020
```xml
2121
<dependency>
2222
<groupId>com.aliyun.openservices</groupId>
2323
<artifactId>tablestore</artifactId>
24-
<version>5.13.12</version>
24+
<version>5.13.13</version>
2525
</dependency>
2626
```
2727

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.aliyun.openservices</groupId>
55
<artifactId>tablestore</artifactId>
6-
<version>5.13.12</version>
6+
<version>5.13.13</version>
77
<packaging>jar</packaging>
88
<name>AliCloud TableStore SDK for Java</name>
99
<url>http://www.aliyun.com</url>

src/main/java/com/alicloud/openservices/tablestore/core/protocol/timeseries/TimeseriesResponseFactory.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -288,12 +288,7 @@ public static ScanTimeseriesDataResponse createScanTimeseriesDataResponse(
288288
List<PlainBufferRow> pbRows = inputStream.readRowsWithHeader();
289289
List<TimeseriesRow> rows = new ArrayList<TimeseriesRow>(pbRows.size());
290290
for (int i = 0; i < pbRows.size(); i++) {
291-
if (i > 0) {
292-
// reuse timeseries key
293-
rows.add(parseRowFromPlainbuffer(pbRows.get(i), rows.get(0).getTimeseriesKey()));
294-
} else {
295-
rows.add(parseRowFromPlainbuffer(pbRows.get(i)));
296-
}
291+
rows.add(parseRowFromPlainbuffer(pbRows.get(i)));
297292
}
298293
response.setRows(rows);
299294
} catch (IOException e) {

src/main/java/com/alicloud/openservices/tablestore/model/timeseries/ScanTimeseriesDataResponse.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
public class ScanTimeseriesDataResponse extends Response {
99

10+
public static String _VERSION_ = "20230111";
11+
1012
private List<TimeseriesRow> rows = new ArrayList<TimeseriesRow>();
1113
private byte[] nextToken;
1214

src/main/java/com/alicloud/openservices/tablestore/tunnel/pipeline/ProcessDataPipeline.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public ProcessRecordsInput doProcess(ReadRecordsRequest readRecordsRequest) thro
145145
} else {
146146
LOG.info("GetRecords, Num: {}, LoopTimes: {}, TotalBytes: {}, Channel connect: {}, Latency: {} ms, Next Token: {}",
147147
totalRecordsCount, times, totalBytes, connect, System.currentTimeMillis() - beginTs, resp.getNextToken());
148-
return new ProcessRecordsInput(totalRecords, resp.getNextToken(), resp.getRequestId());
148+
return new ProcessRecordsInput(totalRecords, resp.getNextToken(), resp.getRequestId(), connect.getChannelId());
149149
}
150150
} catch (Exception e) {
151151
throw new StageException(this, readRecordsRequest, e.getMessage(), e);

src/main/java/com/alicloud/openservices/tablestore/tunnel/worker/ProcessRecordsInput.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,30 @@
33
import java.util.List;
44

55
import com.alicloud.openservices.tablestore.model.StreamRecord;
6+
import org.slf4j.Logger;
7+
import org.slf4j.LoggerFactory;
68

79
public class ProcessRecordsInput {
10+
private static final Logger LOG = LoggerFactory.getLogger(ProcessRecordsInput.class);
11+
812
private List<StreamRecord> records;
913
private String nextToken;
1014
private String traceId;
15+
private String channelId;
1116

1217
public ProcessRecordsInput(List<StreamRecord> records, String nextToken, String traceId) {
1318
this.records = records;
1419
this.nextToken = nextToken;
1520
this.traceId = traceId;
1621
}
1722

23+
public ProcessRecordsInput(List<StreamRecord> records, String nextToken, String traceId, String channelId) {
24+
this.records = records;
25+
this.nextToken = nextToken;
26+
this.traceId = traceId;
27+
this.channelId = channelId;
28+
}
29+
1830
public List<StreamRecord> getRecords() {
1931
return records;
2032
}
@@ -39,6 +51,18 @@ public void setTraceId(String traceId) {
3951
this.traceId = traceId;
4052
}
4153

54+
public String getChannelId() {
55+
return channelId;
56+
}
57+
58+
public String getPartitionId() {
59+
String[] splits = channelId.split("_");
60+
if (splits.length != 2) {
61+
LOG.info("invalid channel id {}", channelId);
62+
}
63+
return splits[0];
64+
}
65+
4266
@Override
4367
public String toString() {
4468
//TODO

src/test/java/com/alicloud/openservices/tablestore/tunnel/functiontest/TestTunnelWorkerSimplePerf.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,16 @@ public PerfElement(long timestamp, long speed, long totalCount) {
3030

3131
private static final Gson GSON = new Gson();
3232
private static final int CAL_INTERVAL_MILLIS = 5000;
33+
3334
static class PerfProcessor implements IChannelProcessor {
3435
private static final AtomicLong counter = new AtomicLong(0);
3536
private static final AtomicLong latestTs = new AtomicLong(0);
3637
private static final AtomicLong allCount = new AtomicLong(0);
3738

3839
@Override
3940
public void process(ProcessRecordsInput input) {
41+
System.out.println(input.getChannelId());
42+
System.out.println(input.getPartitionId());
4043
counter.addAndGet(input.getRecords().size());
4144
allCount.addAndGet(input.getRecords().size());
4245
if (System.currentTimeMillis() - latestTs.get() > CAL_INTERVAL_MILLIS) {
@@ -62,7 +65,7 @@ public static void main(String[] args) {
6265
TunnelClient client = new TunnelClient(Endpoint, AccessId, AccessKey, InstanceName);
6366
TunnelWorkerConfig config = new TunnelWorkerConfig(new PerfProcessor());
6467
config.setHeartbeatIntervalInSec(15);
65-
TunnelWorker worker = new TunnelWorker("265c97a9-2c41-4cb5-abdf-8b9966c4f0b8", client, config);
68+
TunnelWorker worker = new TunnelWorker("0edc3bb4-ae62-4fe6-ae17-796d6801b476", client, config);
6669
try {
6770
worker.connectAndWorking();
6871
} catch (Exception e) {

0 commit comments

Comments
 (0)