Skip to content

Commit 3f0fb8d

Browse files
committed
Doc: update documents
1 parent 90a155b commit 3f0fb8d

File tree

5 files changed

+68
-8
lines changed

5 files changed

+68
-8
lines changed

CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
# Changelog
2+
3+
## [0.51.2-public] - 2024-12-20
4+
### Features
5+
- **Authorization** Introduced the `credential-java` authorization package, now supporting authentication with `AlibabaCloudCredentialsProvider`.
6+
- **StreamUploadSession** Added awareness for Slot updates and automatic retry logic.
7+
- **table-api** Introduced the `TableRetryHandler` class, adding retry logic to the `table-api`.
8+
- **udf** The `InputSplitter` now includes the method `setLimit`.
9+
10+
### Changes
11+
- **TypeInfo** The `StructTypeInfo` class now includes the method `getTypeName(boolean quote)`. In version `0.51.0-public (rc0)`, `StructTypeInfo` defaulted to quoting field names with backticks. We suspect that this change may affect users, so we decided to revert to the original behavior (not quoting by default). Users can now call `getTypeName(true)` when quoting is needed.
12+
13+
### Fixes
14+
- **TypeInfo** Field names will now be correctly escaped when quoted with backticks.
15+
- **MCQA2** Fixed an issue where the `getRawTaskResults` interface call in MCQA2 jobs could not retrieve results.
16+
17+
218
## [0.51.0-public] - 2024-12-05
319
### Features
420
- **MapReduce** Supports multi pipeline output.
@@ -63,7 +79,7 @@
6379
- **SQLExecutor** MCQA 2.0 job supports retrieving InstanceProgress information
6480

6581
### Changes
66-
- **Quote** added backticks for quoting names in Struct type TypeInfo and other methods that assemble SQL
82+
- **TypeInfo** added backticks for quoting names in Struct type TypeInfo and other methods that assemble SQL
6783
- **AutoClosable** to remind users to properly close resources, added corresponding `close()` methods to the following resource classes to prompt users to close resources correctly:
6884
- `UpsertStream` in the `odps-sdk-core` package,
6985
- `LocalOutputStreamSet`, `ReduceDriver.ReduceContextImpl`, `MapDriver.DirectMapContextImpl`, `LocalRecordWriter` in the `odps-sdk-impl` package

CHANGELOG_CN.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
11
# 更新日志
2+
3+
## [0.51.2-public] - 2024-12-20
4+
### 功能
5+
- **Authorization** 引入`credential-java`鉴权包,现在能够使用`AlibabaCloudCredentialsProvider`进行鉴权
6+
- **StreamUploadSession** 新增对 Slot 更新的感知和自动重试逻辑
7+
- **table-api** 引入`TableRetryHandler`类,为`table-api`添加重试逻辑
8+
- **udf**`InputSplitter`新增方法 `setLimit`
9+
10+
### 变更
11+
- **TypeInfo** `StructTypeInfo` 新增方法 `getTypeName(boolean quote)`,在 `0.51.0-public (rc0)` 版本,`StructTypeInfo` 默认会对字段名使用反引号进行 quote,我们怀疑这项变更对用户有影响,因此决定恢复原行为(默认不进行quote)
12+
而是当用户需要 quote 时,可以调用 `getTypeName(true)`
13+
14+
### 修复
15+
- **TypeInfo** 当对字段使用反引号进行 quote 时,现在会正确对字段名进行转义
16+
- **MCQA2** 修复了 MCQA2 作业调用 `getRawTaskResults` 接口取不到结果的问题
17+
18+
219
## [0.51.0-public] - 2024-12-05
320

421
### 功能
@@ -58,7 +75,7 @@
5875
- **SQLExecutor** MCQA 2.0 作业支持获取 InstanceProgress 信息
5976

6077
### 变更
61-
- **Quote** 对 Struct 类型的 TypeInfo,和其他拼装 SQL 的方法,使用反引号对名字进行 quote
78+
- **TypeInfo** 对 Struct 类型的 TypeInfo,和其他拼装 SQL 的方法,使用反引号对名字进行 quote
6279
- **AutoClosable** 为了提醒用户正确关闭资源,对下列资源类,增加了相应的 `close()` 方法,以提醒用户正确关闭资源。
6380
- `odps-sdk-core` 包下的 `UpsertStream`
6481
- `odps-sdk-impl` 包下的 `LocalOutputStreamSet``ReduceDriver.ReduceContextImpl``MapDriver.DirectMapContextImpl``LocalRecordWriter`

docs/docs/changelog.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@ sidebar_position: 6
44
---
55

66
# 更新日志
7+
## [0.51.2-public] - 2024-12-20
8+
### 功能
9+
- **Authorization** 引入`credential-java`鉴权包,现在能够使用`AlibabaCloudCredentialsProvider`进行鉴权
10+
- **StreamUploadSession** 新增对 Slot 更新的感知和自动重试逻辑
11+
- **table-api** 引入`TableRetryHandler`类,为`table-api`添加重试逻辑
12+
- **udf**`InputSplitter`新增方法 `setLimit`
13+
14+
### 变更
15+
- **TypeInfo** `StructTypeInfo` 新增方法 `getTypeName(boolean quote)`,在 `0.51.0-public (rc0)` 版本,`StructTypeInfo` 默认会对字段名使用反引号进行 quote,我们怀疑这项变更对用户有影响,因此决定恢复原行为(默认不进行quote)
16+
而是当用户需要 quote 时,可以调用 `getTypeName(true)`
17+
18+
### 修复
19+
- **TypeInfo** 当对字段使用反引号进行 quote 时,现在会正确对字段名进行转义
20+
- **MCQA2** 修复了 MCQA2 作业调用 `getRawTaskResults` 接口取不到结果的问题
21+
722
## [0.51.0-public] - 2024-12-05
823

924
### 功能
@@ -63,7 +78,7 @@ sidebar_position: 6
6378
- **SQLExecutor** MCQA 2.0 作业支持获取 InstanceProgress 信息
6479

6580
### 变更
66-
- **Quote** 对 Struct 类型的 TypeInfo,和其他拼装 SQL 的方法,使用反引号对名字进行 quote
81+
- **TypeInfo** 对 Struct 类型的 TypeInfo,和其他拼装 SQL 的方法,使用反引号对名字进行 quote
6782
- **AutoClosable** 为了提醒用户正确关闭资源,对下列资源类,增加了相应的 `close()` 方法,以提醒用户正确关闭资源。
6883
- `odps-sdk-core` 包下的 `UpsertStream`
6984
- `odps-sdk-impl` 包下的 `LocalOutputStreamSet``ReduceDriver.ReduceContextImpl``MapDriver.DirectMapContextImpl``LocalRecordWriter`

docs/docs/core-concept/init-odps-client.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,20 @@ public static Odps buildWithStsToken(String accessId, String accessKey, String s
5151

5252
## 使用阿里云CredentialProvider构建客户端
5353

54-
此方法适用于如ECS实例上的RAM角色授权等场景
54+
此方法适用于如使用默认凭据链,或ECS实例上的RAM角色授权等场景
5555

5656
### 示例代码
57+
使用 [credential-java](https://github.com/aliyun/credentials-java)
58+
```java
59+
public static Odps buildWithCredentialProvider(AlibabaCloudCredentialsProvider credentialProvider) {
60+
Account account = new AklessAccount(credentialProvider);
61+
Odps odps = new Odps(account);
62+
odps.setEndpoint(SAMPLE_ENDPOINT);
63+
return odps;
64+
}
65+
```
5766

67+
使用 aliyun-java-auth 包
5868
```java
5969
public static Odps buildWithCredentialProvider(ICredentialProvider credentialProvider) {
6070
Account account = new AklessAccount(credentialProvider);
@@ -65,8 +75,10 @@ public static Odps buildWithCredentialProvider(ICredentialProvider credentialPro
6575
```
6676

6777
### 说明
68-
69-
CredentialProvider 是阿里云提供的一种无AK认证方式,它实际上提供了一种基于STS Token的生成和自动轮换机制。阿里云的`aliyun-java-auth`包提供了多种`ICredentialProvider`的实现,例如`DefaultCredentialProvider``RamRoleArnCredentialProvider`,用户可以根据需要选择不同的实现。
78+
CredentialProvider 是阿里云提供的一种无AK认证方式,它实际上提供了一种基于STS Token的生成和自动轮换机制。
79+
阿里云的`credential-java`包提供了`AlibabaCloudCredentialsProvider`接口和多种实现,
80+
阿里云的`aliyun-java-auth`包提供了`ICredentialProvider`接口和多种实现,
81+
用户可以根据需要选择不同的实现。
7082

7183
## 使用双重签名认证构建客户端
7284

@@ -115,5 +127,5 @@ String bearerToken = sm.generateAuthorizationToken(policy, "BEARER");
115127
- [阿里云MaxCompute官方文档](https://help.aliyun.com/zh/maxcompute)
116128
- [阿里云RAM用户指南](https://help.aliyun.com/zh/maxcompute/getting-started/prepare-a-ram-user)
117129
- [Policy 权限控制文档](https://help.aliyun.com/zh/maxcompute/user-guide/policy-based-access-control-1)
118-
- [阿里云 CredentialProvider 使用文档](https://help.aliyun.com/zh/sdk/developer-reference/v2-java-integrated-sdk)
130+
- [阿里云 CredentialProvider 使用文档](https://help.aliyun.com/zh/sdk/developer-reference/v2-manage-access-credentials)
119131

docs/docs/quick-start.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ MaxCompute的Java SDK为开发者提供了丰富的Java编程语言接口,允
1616
<dependency>
1717
<groupId>com.aliyun.odps</groupId>
1818
<artifactId>odps-sdk-core</artifactId>
19-
<version>0.51.0-public</version>
19+
<version>0.51.2-public</version>
2020
</dependency>
2121
```
2222
请确保您使用的是[Maven Central Repository](https://mvnrepository.com/artifact/com.aliyun.odps/odps-sdk-core)[阿里云Maven仓库](https://developer.aliyun.com/mvn/)中可用的最新稳定版本。

0 commit comments

Comments
 (0)