Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdst
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
1
议题
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdst
提交
7babb601
提交
7babb601
编写于
1月 12, 2021
作者:
hebao@lab.ibiz5.com
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cassandra配置调整及报表相关接口文件定义
上级
e640ff99
变更
6
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
40 行增加
和
12 行删除
+40
-12
application-boot.yml
ibzdst-boot/src/main/resources/application-boot.yml
+5
-10
ExecResultRepository.java
.../cn/ibizlab/core/extensions/cql/ExecResultRepository.java
+2
-0
DACoreService.java
...ava/cn/ibizlab/core/extensions/service/DACoreService.java
+8
-0
ResultsMQMsgConsumeListener.java
...lab/core/extensions/util/ResultsMQMsgConsumeListener.java
+3
-1
CassandraConfig.java
...ain/java/cn/ibizlab/core/util/config/CassandraConfig.java
+3
-1
DACoreResource.java
...n/java/cn/ibizlab/api/rest/extensions/DACoreResource.java
+19
-0
未找到文件。
ibzdst-boot/src/main/resources/application-boot.yml
浏览文件 @
7babb601
...
...
@@ -23,22 +23,17 @@ spring:
caffeine
:
spec
:
initialCapacity=5,maximumSize=50000,expireAfterWrite=3600s
cassandra
:
host
:
172.16.100.243
cluster
:
name
:
cluster
port
:
9042
keyspace
:
ibzdst
class
:
SimpleStrategy
replication_factor
:
3
#cassandra:
# host: 172.16.100.243
# keyspace: ibzdst
rocketmq
:
producer
:
isOnOff
:
on
namesrvAddr
:
172.16.1
80.24
3:9876
namesrvAddr
:
172.16.1
70.16
3:9876
consumer
:
isOnOff
:
on
namesrvAddr
:
172.16.1
80.24
3:9876
namesrvAddr
:
172.16.1
70.16
3:9876
logging
:
config
:
classpath:logback-spring.xml
\ No newline at end of file
ibzdst-core/src/main/java/cn/ibizlab/core/extensions/cql/ExecResultRepository.java
浏览文件 @
7babb601
...
...
@@ -6,6 +6,7 @@ import com.datastax.driver.core.schemabuilder.SchemaBuilder;
import
com.datastax.driver.mapping.Mapper
;
import
com.datastax.driver.mapping.MappingManager
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnExpression
;
import
org.springframework.stereotype.Repository
;
import
java.sql.Timestamp
;
...
...
@@ -17,6 +18,7 @@ import static com.datastax.driver.core.querybuilder.QueryBuilder.*;
@Slf4j
@Repository
@ConditionalOnExpression
(
"!''.equals('${cassandra.host:}')"
)
public
class
ExecResultRepository
{
private
Mapper
<
ExecResult
>
mapper
;
...
...
ibzdst-core/src/main/java/cn/ibizlab/core/extensions/service/DACoreService.java
0 → 100644
浏览文件 @
7babb601
package
cn
.
ibizlab
.
core
.
extensions
.
service
;
import
org.springframework.stereotype.Service
;
@Service
public
class
DACoreService
{
}
ibzdst-core/src/main/java/cn/ibizlab/core/extensions/util/ResultsMQMsgConsumeListener.java
浏览文件 @
7babb601
...
...
@@ -11,6 +11,7 @@ import org.apache.rocketmq.client.consumer.listener.MessageListenerConcurrently;
import
org.apache.rocketmq.common.message.MessageExt
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
...
...
@@ -24,7 +25,8 @@ public class ResultsMQMsgConsumeListener implements MessageListenerConcurrently
@Value
(
"${rocketmq.producer.resultsTopic:DSTRESULTSMSG}"
)
private
String
resultsTopic
;
@Autowired
@Autowired
(
required
=
false
)
@Lazy
private
ExecResultRepository
execResultRepository
;
@Override
public
ConsumeConcurrentlyStatus
consumeMessage
(
List
<
MessageExt
>
list
,
ConsumeConcurrentlyContext
consumeConcurrentlyContext
)
{
...
...
ibzdst-core/src/main/java/cn/ibizlab/core/util/config/CassandraConfig.java
浏览文件 @
7babb601
...
...
@@ -14,6 +14,7 @@ import com.datastax.driver.core.policies.RetryPolicy;
import
com.datastax.driver.core.policies.TokenAwarePolicy
;
import
com.datastax.driver.mapping.*
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnExpression
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.util.StringUtils
;
...
...
@@ -27,11 +28,12 @@ import static com.datastax.driver.core.schemabuilder.SchemaBuilder.createKeyspac
import
static
com
.
datastax
.
driver
.
mapping
.
NamingConventions
.*;
@Configuration
@ConditionalOnExpression
(
"!''.equals('${cassandra.host:}')"
)
public
class
CassandraConfig
{
@Bean
public
Cluster
cluster
(
@Value
(
"${cassandra.host
:172.16.100.243
}"
)
String
host
,
@Value
(
"${cassandra.host}"
)
String
host
,
@Value
(
"${cassandra.cluster.name:cluster}"
)
String
clusterName
,
@Value
(
"${cassandra.options.maxrequestsperconnection:64}"
)
int
maxRequestsPerConnection
,
@Value
(
"${cassandra.options.newconnectionthreshold:100}"
)
int
newConnectionThreshold
,
...
...
ibzdst-provider/ibzdst-provider-api/src/main/java/cn/ibizlab/api/rest/extensions/DACoreResource.java
0 → 100644
浏览文件 @
7babb601
package
cn
.
ibizlab
.
api
.
rest
.
extensions
;
import
cn.ibizlab.core.extensions.service.DACoreService
;
import
io.swagger.annotations.Api
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@Slf4j
@Api
(
tags
=
{
"接口"
})
@RestController
(
"api-dacore"
)
@RequestMapping
(
""
)
public
class
DACoreResource
{
@Autowired
private
DACoreService
daCoreService
;
}
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录