Skip to content

Commit dd0b307

Browse files
committed
feat: Support L5 ID to use the colon parameter format.
Signed-off-by: Yang Yu <yuyang_733@163.com>
1 parent 2b43a87 commit dd0b307

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/main/java/org/apache/hadoop/fs/CosNativeFileSystemStore.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,15 @@ private void initCOSClient(URI uri, Configuration conf) throws IOException {
186186
if (useL5Id) {
187187
String l5Id = conf.get(CosNConfigKeys.COSN_L5_KEY);
188188
if (null != l5Id) {
189-
int l5modId = Integer.parseInt(l5Id.split(",")[0]);
190-
int l5cmdId = Integer.parseInt(l5Id.split(",")[1]);
189+
int l5modId;
190+
int l5cmdId;
191+
if (l5Id.contains(":")) {
192+
l5modId = Integer.parseInt(l5Id.split(":")[0]);
193+
l5cmdId = Integer.parseInt(l5Id.split(":")[1]);
194+
} else {
195+
l5modId = Integer.parseInt(l5Id.split(",")[0]);
196+
l5cmdId = Integer.parseInt(l5Id.split(",")[1]);
197+
}
191198

192199
Class<?> l5EndpointResolverClass;
193200
try {

0 commit comments

Comments
 (0)