Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
seatunnel-web
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
宋勇
seatunnel-web
Commits
e0fadca7
提交
e0fadca7
authored
4月 13, 2024
作者:
宋勇
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改s3类型上的bucket 赋值
上级
d18b47a1
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
132 行增加
和
125 行删除
+132
-125
CSVClientService.java
...che/seatunnel/datasource/plugin/csv/CSVClientService.java
+2
-1
CSVDatasourceChannel.java
...seatunnel/datasource/plugin/csv/CSVDatasourceChannel.java
+41
-38
ExcelClientService.java
...seatunnel/datasource/plugin/excel/ExcelClientService.java
+2
-1
ExcelDatasourceChannel.java
...unnel/datasource/plugin/excel/ExcelDatasourceChannel.java
+38
-38
pom.xml
...atunnel-datasource-plugins/datasource-jdbc-access/pom.xml
+1
-1
S3ClientService.java
...pache/seatunnel/datasource/plugin/s3/S3ClientService.java
+2
-1
S3DatasourceChannel.java
...e/seatunnel/datasource/plugin/s3/S3DatasourceChannel.java
+38
-38
XMLClientService.java
...che/seatunnel/datasource/plugin/xml/XMLClientService.java
+2
-1
XMLDatasourceChannel.java
...seatunnel/datasource/plugin/xml/XMLDatasourceChannel.java
+6
-6
没有找到文件。
seatunnel-datasource/seatunnel-datasource-plugins/datasource-csv/src/main/java/org/apache/seatunnel/datasource/plugin/csv/CSVClientService.java
浏览文件 @
e0fadca7
...
...
@@ -16,13 +16,14 @@ public class CSVClientService {
private
MinioClient
minioClient
;
public
CSVClientService
(
String
endpoint
,
String
provider
,
String
username
,
String
password
,
Integer
port
)
String
endpoint
,
String
provider
,
String
username
,
String
password
,
Integer
port
,
String
backet
)
throws
MinioException
{
this
.
ENDPOINT
=
endpoint
;
this
.
PROVIDER
=
provider
;
this
.
USERNAME
=
username
;
this
.
PASSWORD
=
password
;
this
.
PORT
=
port
;
this
.
BUCKET
=
backet
;
setMinioClient
(
endpoint
,
provider
,
username
,
password
,
port
);
}
...
...
seatunnel-datasource/seatunnel-datasource-plugins/datasource-csv/src/main/java/org/apache/seatunnel/datasource/plugin/csv/CSVDatasourceChannel.java
浏览文件 @
e0fadca7
...
...
@@ -17,6 +17,7 @@
package
org
.
apache
.
seatunnel
.
datasource
.
plugin
.
csv
;
import
org.apache.hadoop.conf.Configuration
;
import
org.apache.seatunnel.api.configuration.util.OptionRule
;
import
org.apache.seatunnel.common.utils.SeaTunnelException
;
import
org.apache.seatunnel.datasource.plugin.api.DataSourceChannel
;
...
...
@@ -96,14 +97,14 @@ public class CSVDatasourceChannel implements DataSourceChannel {
database
);
}
}
catch
(
ErrorResponseException
|
InsufficientDataException
|
InternalException
|
InvalidKeyException
|
InvalidResponseException
|
IOException
|
NoSuchAlgorithmException
|
ServerException
|
XmlParserException
e
)
{
|
InsufficientDataException
|
InternalException
|
InvalidKeyException
|
InvalidResponseException
|
IOException
|
NoSuchAlgorithmException
|
ServerException
|
XmlParserException
e
)
{
throw
new
RuntimeException
(
e
);
}
});
...
...
@@ -137,14 +138,14 @@ public class CSVDatasourceChannel implements DataSourceChannel {
database
);
}
}
catch
(
ErrorResponseException
|
InsufficientDataException
|
InternalException
|
InvalidKeyException
|
InvalidResponseException
|
IOException
|
NoSuchAlgorithmException
|
ServerException
|
XmlParserException
e
)
{
|
InsufficientDataException
|
InternalException
|
InvalidKeyException
|
InvalidResponseException
|
IOException
|
NoSuchAlgorithmException
|
ServerException
|
XmlParserException
e
)
{
throw
new
RuntimeException
(
e
);
}
});
...
...
@@ -178,14 +179,14 @@ public class CSVDatasourceChannel implements DataSourceChannel {
});
return
db
;
}
catch
(
ServerException
|
ErrorResponseException
|
InsufficientDataException
|
IOException
|
NoSuchAlgorithmException
|
InvalidKeyException
|
InvalidResponseException
|
XmlParserException
|
InternalException
e
)
{
|
ErrorResponseException
|
InsufficientDataException
|
IOException
|
NoSuchAlgorithmException
|
InvalidKeyException
|
InvalidResponseException
|
XmlParserException
|
InternalException
e
)
{
throw
new
RuntimeException
(
e
);
}
// throw new UnsupportedOperationException("getDatabases is not supported for S3
...
...
@@ -199,6 +200,8 @@ public class CSVDatasourceChannel implements DataSourceChannel {
throw
new
SeaTunnelException
(
"requestParmas 为空!"
);
}
try
{
createS3Client
(
requestParams
);
return
true
;
}
catch
(
Exception
ex
)
{
...
...
@@ -282,14 +285,14 @@ public class CSVDatasourceChannel implements DataSourceChannel {
System
.
out
.
println
(
all
+
"=================================================================="
);
}
catch
(
ErrorResponseException
|
InsufficientDataException
|
InternalException
|
InvalidKeyException
|
InvalidResponseException
|
IOException
|
NoSuchAlgorithmException
|
ServerException
|
XmlParserException
e
)
{
|
InsufficientDataException
|
InternalException
|
InvalidKeyException
|
InvalidResponseException
|
IOException
|
NoSuchAlgorithmException
|
ServerException
|
XmlParserException
e
)
{
throw
new
RuntimeException
(
e
);
}
return
all
;
...
...
@@ -297,16 +300,16 @@ public class CSVDatasourceChannel implements DataSourceChannel {
public
CSVClientService
createS3Client
(
Map
<
String
,
String
>
requestParams
)
{
int
i
=
requestParams
.
get
(
"fs.s3a.endpoint"
).
lastIndexOf
(
":"
);
String
endpoint
=
requestParams
.
get
(
"fs.s3a.endpoint"
)
+
""
;
String
endpoint
=
requestParams
.
get
(
"fs.s3a.endpoint"
);
Integer
port
=
Integer
.
valueOf
(
requestParams
.
get
(
"fs.s3a.endpoint"
).
substring
(
i
+
1
).
replace
(
"/"
,
""
));
String
provider
=
requestParams
.
get
(
"fs.s3a.aws.credentials.provider"
)
+
""
;
String
username
=
requestParams
.
get
(
"access_key"
)
+
""
;
String
password
=
requestParams
.
get
(
"secret_key"
)
+
""
;
// String bucket = requestParams.get("bucket") + ""
;
String
provider
=
requestParams
.
get
(
"fs.s3a.aws.credentials.provider"
);
String
username
=
requestParams
.
get
(
"access_key"
);
String
password
=
requestParams
.
get
(
"secret_key"
);
String
bucket
=
requestParams
.
get
(
"bucket"
)
;
try
{
s3ClientService
=
new
CSVClientService
(
endpoint
,
provider
,
username
,
password
,
port
);
s3ClientService
=
new
CSVClientService
(
endpoint
,
provider
,
username
,
password
,
port
,
bucket
);
return
s3ClientService
;
}
catch
(
Exception
e
)
{
throw
new
SeaTunnelException
(
"创建Mqtt客户端错误!"
);
...
...
seatunnel-datasource/seatunnel-datasource-plugins/datasource-excel/src/main/java/org/apache/seatunnel/datasource/plugin/excel/ExcelClientService.java
浏览文件 @
e0fadca7
...
...
@@ -16,13 +16,14 @@ public class ExcelClientService {
private
MinioClient
minioClient
;
public
ExcelClientService
(
String
endpoint
,
String
provider
,
String
username
,
String
password
,
Integer
port
)
String
endpoint
,
String
provider
,
String
username
,
String
password
,
Integer
port
,
String
bucket
)
throws
MinioException
{
this
.
ENDPOINT
=
endpoint
;
this
.
PROVIDER
=
provider
;
this
.
USERNAME
=
username
;
this
.
PASSWORD
=
password
;
this
.
PORT
=
port
;
this
.
BUCKET
=
bucket
;
setMinioClient
(
endpoint
,
provider
,
username
,
password
,
port
);
}
...
...
seatunnel-datasource/seatunnel-datasource-plugins/datasource-excel/src/main/java/org/apache/seatunnel/datasource/plugin/excel/ExcelDatasourceChannel.java
浏览文件 @
e0fadca7
...
...
@@ -96,14 +96,14 @@ public class ExcelDatasourceChannel implements DataSourceChannel {
database
);
}
}
catch
(
ErrorResponseException
|
InsufficientDataException
|
InternalException
|
InvalidKeyException
|
InvalidResponseException
|
IOException
|
NoSuchAlgorithmException
|
ServerException
|
XmlParserException
e
)
{
|
InsufficientDataException
|
InternalException
|
InvalidKeyException
|
InvalidResponseException
|
IOException
|
NoSuchAlgorithmException
|
ServerException
|
XmlParserException
e
)
{
throw
new
RuntimeException
(
e
);
}
});
...
...
@@ -137,14 +137,14 @@ public class ExcelDatasourceChannel implements DataSourceChannel {
database
);
}
}
catch
(
ErrorResponseException
|
InsufficientDataException
|
InternalException
|
InvalidKeyException
|
InvalidResponseException
|
IOException
|
NoSuchAlgorithmException
|
ServerException
|
XmlParserException
e
)
{
|
InsufficientDataException
|
InternalException
|
InvalidKeyException
|
InvalidResponseException
|
IOException
|
NoSuchAlgorithmException
|
ServerException
|
XmlParserException
e
)
{
throw
new
RuntimeException
(
e
);
}
});
...
...
@@ -178,14 +178,14 @@ public class ExcelDatasourceChannel implements DataSourceChannel {
});
return
db
;
}
catch
(
ServerException
|
ErrorResponseException
|
InsufficientDataException
|
IOException
|
NoSuchAlgorithmException
|
InvalidKeyException
|
InvalidResponseException
|
XmlParserException
|
InternalException
e
)
{
|
ErrorResponseException
|
InsufficientDataException
|
IOException
|
NoSuchAlgorithmException
|
InvalidKeyException
|
InvalidResponseException
|
XmlParserException
|
InternalException
e
)
{
throw
new
RuntimeException
(
e
);
}
// throw new UnsupportedOperationException("getDatabases is not supported for S3
...
...
@@ -282,14 +282,14 @@ public class ExcelDatasourceChannel implements DataSourceChannel {
System
.
out
.
println
(
all
+
"=================================================================="
);
}
catch
(
ErrorResponseException
|
InsufficientDataException
|
InternalException
|
InvalidKeyException
|
InvalidResponseException
|
IOException
|
NoSuchAlgorithmException
|
ServerException
|
XmlParserException
e
)
{
|
InsufficientDataException
|
InternalException
|
InvalidKeyException
|
InvalidResponseException
|
IOException
|
NoSuchAlgorithmException
|
ServerException
|
XmlParserException
e
)
{
throw
new
RuntimeException
(
e
);
}
return
all
;
...
...
@@ -297,16 +297,16 @@ public class ExcelDatasourceChannel implements DataSourceChannel {
public
ExcelClientService
createS3Client
(
Map
<
String
,
String
>
requestParams
)
{
int
i
=
requestParams
.
get
(
"fs.s3a.endpoint"
).
lastIndexOf
(
":"
);
String
endpoint
=
requestParams
.
get
(
"fs.s3a.endpoint"
)
+
""
;
String
endpoint
=
requestParams
.
get
(
"fs.s3a.endpoint"
);
Integer
port
=
Integer
.
valueOf
(
requestParams
.
get
(
"fs.s3a.endpoint"
).
substring
(
i
+
1
).
replace
(
"/"
,
""
));
String
provider
=
requestParams
.
get
(
"fs.s3a.aws.credentials.provider"
)
+
""
;
String
username
=
requestParams
.
get
(
"access_key"
)
+
""
;
String
password
=
requestParams
.
get
(
"secret_key"
)
+
""
;
// String bucket = requestParams.get("bucket") + ""
;
String
provider
=
requestParams
.
get
(
"fs.s3a.aws.credentials.provider"
);
String
username
=
requestParams
.
get
(
"access_key"
);
String
password
=
requestParams
.
get
(
"secret_key"
);
String
bucket
=
requestParams
.
get
(
"bucket"
)
;
try
{
s3ClientService
=
new
ExcelClientService
(
endpoint
,
provider
,
username
,
password
,
port
);
s3ClientService
=
new
ExcelClientService
(
endpoint
,
provider
,
username
,
password
,
port
,
bucket
);
return
s3ClientService
;
}
catch
(
Exception
e
)
{
throw
new
SeaTunnelException
(
"创建Mqtt客户端错误!"
);
...
...
seatunnel-datasource/seatunnel-datasource-plugins/datasource-jdbc-access/pom.xml
浏览文件 @
e0fadca7
...
...
@@ -22,7 +22,7 @@
<version>
1.0.0-SNAPSHOT
</version>
</parent>
<artifactId>
datasource-jdbc-
A
ccess
</artifactId>
<artifactId>
datasource-jdbc-
a
ccess
</artifactId>
<properties>
<mysql-connector.version>
8.0.28
</mysql-connector.version>
...
...
seatunnel-datasource/seatunnel-datasource-plugins/datasource-s3/src/main/java/org/apache/seatunnel/datasource/plugin/s3/S3ClientService.java
浏览文件 @
e0fadca7
...
...
@@ -16,13 +16,14 @@ public class S3ClientService {
private
MinioClient
minioClient
;
public
S3ClientService
(
String
endpoint
,
String
provider
,
String
username
,
String
password
,
Integer
port
)
String
endpoint
,
String
provider
,
String
username
,
String
password
,
Integer
port
,
String
bucket
)
throws
MinioException
{
this
.
ENDPOINT
=
endpoint
;
this
.
PROVIDER
=
provider
;
this
.
USERNAME
=
username
;
this
.
PASSWORD
=
password
;
this
.
PORT
=
port
;
this
.
BUCKET
=
bucket
;
setMinioClient
(
endpoint
,
provider
,
username
,
password
,
port
);
}
...
...
seatunnel-datasource/seatunnel-datasource-plugins/datasource-s3/src/main/java/org/apache/seatunnel/datasource/plugin/s3/S3DatasourceChannel.java
浏览文件 @
e0fadca7
...
...
@@ -107,14 +107,14 @@ public class S3DatasourceChannel implements DataSourceChannel {
database
);
}
}
catch
(
ErrorResponseException
|
InsufficientDataException
|
InternalException
|
InvalidKeyException
|
InvalidResponseException
|
IOException
|
NoSuchAlgorithmException
|
ServerException
|
XmlParserException
e
)
{
|
InsufficientDataException
|
InternalException
|
InvalidKeyException
|
InvalidResponseException
|
IOException
|
NoSuchAlgorithmException
|
ServerException
|
XmlParserException
e
)
{
throw
new
RuntimeException
(
e
);
}
});
...
...
@@ -148,14 +148,14 @@ public class S3DatasourceChannel implements DataSourceChannel {
database
);
}
}
catch
(
ErrorResponseException
|
InsufficientDataException
|
InternalException
|
InvalidKeyException
|
InvalidResponseException
|
IOException
|
NoSuchAlgorithmException
|
ServerException
|
XmlParserException
e
)
{
|
InsufficientDataException
|
InternalException
|
InvalidKeyException
|
InvalidResponseException
|
IOException
|
NoSuchAlgorithmException
|
ServerException
|
XmlParserException
e
)
{
throw
new
RuntimeException
(
e
);
}
});
...
...
@@ -189,14 +189,14 @@ public class S3DatasourceChannel implements DataSourceChannel {
});
return
db
;
}
catch
(
ServerException
|
ErrorResponseException
|
InsufficientDataException
|
IOException
|
NoSuchAlgorithmException
|
InvalidKeyException
|
InvalidResponseException
|
XmlParserException
|
InternalException
e
)
{
|
ErrorResponseException
|
InsufficientDataException
|
IOException
|
NoSuchAlgorithmException
|
InvalidKeyException
|
InvalidResponseException
|
XmlParserException
|
InternalException
e
)
{
throw
new
RuntimeException
(
e
);
}
// throw new UnsupportedOperationException("getDatabases is not supported for S3
...
...
@@ -293,14 +293,14 @@ public class S3DatasourceChannel implements DataSourceChannel {
System
.
out
.
println
(
all
+
"=================================================================="
);
}
catch
(
ErrorResponseException
|
InsufficientDataException
|
InternalException
|
InvalidKeyException
|
InvalidResponseException
|
IOException
|
NoSuchAlgorithmException
|
ServerException
|
XmlParserException
e
)
{
|
InsufficientDataException
|
InternalException
|
InvalidKeyException
|
InvalidResponseException
|
IOException
|
NoSuchAlgorithmException
|
ServerException
|
XmlParserException
e
)
{
throw
new
RuntimeException
(
e
);
}
return
all
;
...
...
@@ -308,16 +308,16 @@ public class S3DatasourceChannel implements DataSourceChannel {
public
S3ClientService
createS3Client
(
Map
<
String
,
String
>
requestParams
)
{
int
i
=
requestParams
.
get
(
"fs.s3a.endpoint"
).
lastIndexOf
(
":"
);
String
endpoint
=
requestParams
.
get
(
"fs.s3a.endpoint"
)
+
""
;
String
endpoint
=
requestParams
.
get
(
"fs.s3a.endpoint"
);
Integer
port
=
Integer
.
valueOf
(
requestParams
.
get
(
"fs.s3a.endpoint"
).
substring
(
i
+
1
).
replace
(
"/"
,
""
));
String
provider
=
requestParams
.
get
(
"fs.s3a.aws.credentials.provider"
)
+
""
;
String
username
=
requestParams
.
get
(
"access_key"
)
+
""
;
String
password
=
requestParams
.
get
(
"secret_key"
)
+
""
;
// String bucket = requestParams.get("bucket") + ""
;
String
provider
=
requestParams
.
get
(
"fs.s3a.aws.credentials.provider"
);
String
username
=
requestParams
.
get
(
"access_key"
);
String
password
=
requestParams
.
get
(
"secret_key"
);
String
bucket
=
requestParams
.
get
(
"bucket"
)
;
try
{
s3ClientService
=
new
S3ClientService
(
endpoint
,
provider
,
username
,
password
,
port
);
s3ClientService
=
new
S3ClientService
(
endpoint
,
provider
,
username
,
password
,
port
,
bucket
);
return
s3ClientService
;
}
catch
(
Exception
e
)
{
throw
new
SeaTunnelException
(
"创建Mqtt客户端错误!"
);
...
...
seatunnel-datasource/seatunnel-datasource-plugins/datasource-xml/src/main/java/org/apache/seatunnel/datasource/plugin/xml/XMLClientService.java
浏览文件 @
e0fadca7
...
...
@@ -16,13 +16,14 @@ public class XMLClientService {
private
MinioClient
minioClient
;
public
XMLClientService
(
String
endpoint
,
String
provider
,
String
username
,
String
password
,
Integer
port
)
String
endpoint
,
String
provider
,
String
username
,
String
password
,
Integer
port
,
String
bucket
)
throws
MinioException
{
this
.
ENDPOINT
=
endpoint
;
this
.
PROVIDER
=
provider
;
this
.
USERNAME
=
username
;
this
.
PASSWORD
=
password
;
this
.
PORT
=
port
;
this
.
BUCKET
=
bucket
;
setMinioClient
(
endpoint
,
provider
,
username
,
password
,
port
);
}
...
...
seatunnel-datasource/seatunnel-datasource-plugins/datasource-xml/src/main/java/org/apache/seatunnel/datasource/plugin/xml/XMLDatasourceChannel.java
浏览文件 @
e0fadca7
...
...
@@ -297,16 +297,16 @@ public class XMLDatasourceChannel implements DataSourceChannel {
public
XMLClientService
createS3Client
(
Map
<
String
,
String
>
requestParams
)
{
int
i
=
requestParams
.
get
(
"fs.s3a.endpoint"
).
lastIndexOf
(
":"
);
String
endpoint
=
requestParams
.
get
(
"fs.s3a.endpoint"
)
+
""
;
String
endpoint
=
requestParams
.
get
(
"fs.s3a.endpoint"
)
;
Integer
port
=
Integer
.
valueOf
(
requestParams
.
get
(
"fs.s3a.endpoint"
).
substring
(
i
+
1
).
replace
(
"/"
,
""
));
String
provider
=
requestParams
.
get
(
"fs.s3a.aws.credentials.provider"
)
+
""
;
String
username
=
requestParams
.
get
(
"access_key"
)
+
""
;
String
password
=
requestParams
.
get
(
"secret_key"
)
+
""
;
// String bucket = requestParams.get("bucket") + ""
;
String
provider
=
requestParams
.
get
(
"fs.s3a.aws.credentials.provider"
)
;
String
username
=
requestParams
.
get
(
"access_key"
)
;
String
password
=
requestParams
.
get
(
"secret_key"
)
;
String
bucket
=
requestParams
.
get
(
"bucket"
)
;
try
{
s3ClientService
=
new
XMLClientService
(
endpoint
,
provider
,
username
,
password
,
port
);
s3ClientService
=
new
XMLClientService
(
endpoint
,
provider
,
username
,
password
,
port
,
bucket
);
return
s3ClientService
;
}
catch
(
Exception
e
)
{
throw
new
SeaTunnelException
(
"创建Mqtt客户端错误!"
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论