Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
messageflow
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
虞诚毅
messageflow
Commits
7dae5edc
Commit
7dae5edc
authored
Aug 21, 2018
by
shentao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2018/8/21 消息流版本控制,最新版
parent
a6a94c6b
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
229 additions
and
12 deletions
+229
-12
src/main/java/com/zhiwei/messageflow/DirectES4RedisTask.java
+3
-3
src/main/java/com/zhiwei/messageflow/DirectES4RedisThread.java
+1
-1
src/main/java/com/zhiwei/messageflow/ES4RedisTask.java
+9
-4
src/main/java/com/zhiwei/messageflow/ES4RedisThreadNew.java
+2
-2
src/main/java/com/zhiwei/messageflow/mongo/dao/KeywordNewDao.java
+9
-0
src/main/java/com/zhiwei/messageflow/mongo/dao/impl/KeywordNewDaoImpl.java
+8
-0
src/main/resources/application.properties
+1
-1
src/main/resources/application.properties.new8091
+96
-0
src/main/resources/application.properties.test10001
+96
-0
src/main/resources/redis.properties
+4
-0
src/main/resources/redis.properties.6380
+0
-1
No files found.
src/main/java/com/zhiwei/messageflow/DirectES4RedisTask.java
View file @
7dae5edc
...
...
@@ -60,6 +60,7 @@ public class DirectES4RedisTask {
* 设定文件
* @return boolean 返回类型
*/
@SuppressWarnings
(
"unchecked"
)
public
boolean
directTask
(
Project
project
,
List
<
DirectGroup
>
dgList
,
int
count
)
throws
JsonParseException
,
JsonMappingException
,
IOException
{
try
{
...
...
@@ -83,7 +84,7 @@ public class DirectES4RedisTask {
newRsidMap
.
putAll
(
rsidMap
);
// 项目关键词组列表
List
<
KeywordNew
>
keywordNews
=
keywordNewDao
.
getKeywordNewByProject
(
project
.
getProjectName
());
List
<
KeywordNew
>
keywordNews
=
keywordNewDao
.
get
Direct
KeywordNewByProject
(
project
.
getProjectName
());
for
(
DirectGroup
directGroup
:
dgList
)
{
//判断渠道组是否需要读取
...
...
@@ -109,8 +110,7 @@ public class DirectES4RedisTask {
// 获取该渠道组对应关键词组的关键词,如没有则按全量
List
<
String
>
allkeywords
=
new
ArrayList
<>();
for
(
KeywordNew
keywordNew
:
keywordNews
)
{
if
(
null
!=
keywordNew
.
getDxIsUsed
()
&&
keywordNew
.
getDxIsUsed
()
&&
null
!=
keywordNew
.
getQdList
()
&&
!
keywordNew
.
getQdList
().
isEmpty
())
{
// 判断是否定向监测启用
if
(
null
!=
keywordNew
.
getQdList
()
&&
!
keywordNew
.
getQdList
().
isEmpty
())
{
// 判断是否定向监测启用
if
(
keywordNew
.
getQdList
().
contains
(
directGroup
.
getName
()))
{
// qdList中有渠道的name
allkeywords
.
addAll
(
keywordNew
.
getKeyWords
());
}
...
...
src/main/java/com/zhiwei/messageflow/DirectES4RedisThread.java
View file @
7dae5edc
...
...
@@ -24,7 +24,7 @@ public class DirectES4RedisThread extends Thread {
// 定向渠道组list
private
List
<
DirectGroup
>
dgList
;
// 单个平台单个关键词组每次查询数量
private
static
final
int
count
=
30
0
;
private
static
final
int
count
=
2
0
;
private
DirectES4RedisTask
directES4RedisTask
;
...
...
src/main/java/com/zhiwei/messageflow/ES4RedisTask.java
View file @
7dae5edc
...
...
@@ -144,7 +144,10 @@ public class ES4RedisTask {
*/
List
<
String
>
allkeywords
=
new
ArrayList
<>();
for
(
KeywordNew
kwn
:
keywordNews
)
{
if
(!
kwn
.
getPtList
().
contains
(
platformName
))
{
// 滤过非选配词组
if
(
null
==
kwn
.
getPtList
())
{
// 滤过非选配词组
continue
;
}
if
(
kwn
.
getPtList
().
isEmpty
()||!
kwn
.
getPtList
().
contains
(
platformName
))
{
// 滤过非选配词组
continue
;
}
if
(
null
==
kwn
.
getKeyWords
()
||
kwn
.
getKeyWords
().
isEmpty
())
{
// 滤过空词组
...
...
@@ -189,11 +192,13 @@ public class ES4RedisTask {
// 遍历关键词组
for
(
KeywordNew
kwn
:
keywordNews
)
{
if
(!
kwn
.
getPtList
().
contains
(
platformName
))
{
// 滤过非选配词组
if
(
null
==
kwn
.
getPtList
())
{
// 滤过非选配词组
continue
;
}
if
(
null
==
kwn
.
getKeyWords
()
||
kwn
.
getKeyWords
().
isEmpty
())
{
// 滤过空关键词组
if
(
kwn
.
getPtList
().
isEmpty
()||!
kwn
.
getPtList
().
contains
(
platformName
))
{
// 滤过非选配词组
continue
;
}
if
(
null
==
kwn
.
getKeyWords
()
||
kwn
.
getKeyWords
().
isEmpty
())
{
// 滤过空词组
continue
;
}
...
...
src/main/java/com/zhiwei/messageflow/ES4RedisThreadNew.java
View file @
7dae5edc
...
...
@@ -29,8 +29,8 @@ public class ES4RedisThreadNew extends Thread {
private
ES4RedisTask
es4RedisTask
;
// 单个平台单个关键词组每次查询数量
private
static
final
int
count
=
300
;
//
private static final int count = 10;
//
private static final int count = 300;
private
static
final
int
count
=
10
;
// private static final int max_Thread_num = 40;
// private static int Thread_num = 0;
...
...
src/main/java/com/zhiwei/messageflow/mongo/dao/KeywordNewDao.java
View file @
7dae5edc
...
...
@@ -14,4 +14,13 @@ public interface KeywordNewDao {
* @return
*/
List
<
KeywordNew
>
getKeywordNewByProject
(
String
projectName
);
/**
* 获取定向关键词组
* @Title: getDirectKeywordNewByProject
* @Description: 获取定向关键词组
* @param @param projectName
* @param @return 设定文件
* @return List<KeywordNew> 返回类型
*/
List
<
KeywordNew
>
getDirectKeywordNewByProject
(
String
projectName
);
}
src/main/java/com/zhiwei/messageflow/mongo/dao/impl/KeywordNewDaoImpl.java
View file @
7dae5edc
...
...
@@ -27,4 +27,12 @@ public class KeywordNewDaoImpl implements KeywordNewDao {
return
primaryMongoTemplate
.
find
(
query
,
KeywordNew
.
class
);
}
@Override
public
List
<
KeywordNew
>
getDirectKeywordNewByProject
(
String
projectName
)
{
Query
query
=
new
Query
();
query
.
addCriteria
(
Criteria
.
where
(
"project"
).
is
(
projectName
));
query
.
addCriteria
(
Criteria
.
where
(
"dxIsUsed"
).
is
(
true
));
return
primaryMongoTemplate
.
find
(
query
,
KeywordNew
.
class
);
}
}
src/main/resources/application.properties
View file @
7dae5edc
...
...
@@ -2,7 +2,7 @@
#spring.data.mongodb.uri=115.236.59.91:27017
#\u5185\u7F6Etomcat\u7AEF\u53E3\u53F7
server.port
=
809
1
server.port
=
1000
1
#\uFFFD\u009C\u008D\uFFFD\u008A\uFFFD\u7AEF\uFFFD\u0095\uFFFD\uFFFD\u008D\uFFFD\uFFFD\u0093
spring.data.mongodb.primary.database
=
qbjcPhoenix
...
...
src/main/resources/application.properties.new8091
0 → 100644
View file @
7dae5edc
##�\u009C\u008D�\u008A�端uri
#spring.data.mongodb.uri=115.236.59.91:27017
#\u5185\u7F6Etomcat\u7AEF\u53E3\u53F7
server.port=8091
#�\u009C\u008D�\u008A�端�\u0095��\u008D��\u0093
spring.data.mongodb.primary.database=qbjcPhoenix
#�\u009C\u008D�\u008A�ip
spring.data.mongodb.primary.host=192.168.0.101
#�\u009C\u008D�\u008A�port
spring.data.mongodb.primary.port=30000
spring.data.mongodb.primary.username=stno
spring.data.mongodb.primary.password=stno1q2w3e4r
spring.data.mongodb.primary.authenticationDatabase=admin
#�\u009C\u008D�\u008A�端�\u0095��\u008D��\u0093
spring.data.mongodb.secondary.database=eventMuseum
#�\u009C\u008D�\u008A�ip
spring.data.mongodb.secondary.host=192.168.0.101
#�\u009C\u008D�\u008A�port
spring.data.mongodb.secondary.port=30000
spring.data.mongodb.secondary.username=stno
spring.data.mongodb.secondary.password=stno1q2w3e4r
spring.data.mongodb.secondary.authenticationDatabase=admin
#�\u009C\u008D�\u008A�端�\u0095��\u008D��\u0093
spring.data.mongodb.thirdary.database=WechatPublic
#�\u009C\u008D�\u008A�ip
spring.data.mongodb.thirdary.host=192.168.0.101
#�\u009C\u008D�\u008A�port
spring.data.mongodb.thirdary.port=30000
spring.data.mongodb.thirdary.username=stno
spring.data.mongodb.thirdary.password=stno1q2w3e4r
spring.data.mongodb.thirdary.authenticationDatabase=admin
#spring.data.mongodb.option.min-connection-per-host=0
#spring.data.mongodb.option.max-connection-per-host=100
#spring.data.mongodb.option.threads-allowed-to-block-for-connection-multiplier=5
#spring.data.mongodb.option.server-selection-timeout=30000
#spring.data.mongodb.option.max-wait-time=120000
#spring.data.mongodb.option.max-connection-idle-time=0
#spring.data.mongodb.option.max-connection-life-time=0
#spring.data.mongodb.option.connect-timeout=10000
#spring.data.mongodb.option.socket-timeout=0
#
#spring.data.mongodb.option.socket-keep-alive=false
#spring.data.mongodb.option.ssl-enabled=false
#spring.data.mongodb.option.ssl-invalid-host-name-allowed=false
#spring.data.mongodb.option.always-use-m-beans=false
#
#spring.data.mongodb.option.heartbeat-socket-timeout=20000
#spring.data.mongodb.option.heartbeat-connect-timeout=20000
#spring.data.mongodb.option.min-heartbeat-frequency=500
#spring.data.mongodb.option.heartbeat-frequency=10000
#spring.data.mongodb.option.local-threshold=15
##�\u009C��\u009C�ip
#spring.data.mongodb.host=192.168.0.241
##�\u009C��\u009C�port
#spring.data.mongodb.port=27017
##�\u009C��\u009C��\u0095��\u008D��\u0093
#spring.data.mongodb.database=qbjcPhoenix
#�\u0085��\u0096�\u0095��\u008D��\u0093
#spring.data.mongodb.database=eventMuseum
#spring.data.mongodb.database=WechatPublic
#tag�\u0094�uri
#spring.data.mongodb.uri=1.119.44.206:30000
#spring.data.mongodb.uri=192.168.0.245:27017
#tag�\u0095��\u008D��\u0093
#spring.data.mongodb.database=Testqbjc
#spring.data.mongodb.database=weibotag
#mongo.connectionsPerHost=200
#mongo.threadsAllowedToBlockForConnectionMultiplier=10
#
#mongo.connectTimeout=30000
#
#mongo.maxWaitTime=50000
#mongo.autoConnectRetry=true
#mongo.socketKeepAlive=true
#
#mongo.socketTimeout=120000
#mongo.slaveOk=true
\ No newline at end of file
src/main/resources/application.properties.test10001
0 → 100644
View file @
7dae5edc
##\uFFFD\u009C\u008D\uFFFD\u008A\uFFFD\u7AEFuri
#spring.data.mongodb.uri=115.236.59.91:27017
#\u5185\u7F6Etomcat\u7AEF\u53E3\u53F7
server.port=10001
#\uFFFD\u009C\u008D\uFFFD\u008A\uFFFD\u7AEF\uFFFD\u0095\uFFFD\uFFFD\u008D\uFFFD\uFFFD\u0093
spring.data.mongodb.primary.database=qbjcPhoenix
#\uFFFD\u009C\u008D\uFFFD\u008A\uFFFDip
spring.data.mongodb.primary.host=192.168.0.101
#\uFFFD\u009C\u008D\uFFFD\u008A\uFFFDport
spring.data.mongodb.primary.port=30000
spring.data.mongodb.primary.username=stno
spring.data.mongodb.primary.password=stno1q2w3e4r
spring.data.mongodb.primary.authenticationDatabase=admin
#\uFFFD\u009C\u008D\uFFFD\u008A\uFFFD\u7AEF\uFFFD\u0095\uFFFD\uFFFD\u008D\uFFFD\uFFFD\u0093
spring.data.mongodb.secondary.database=eventMuseum
#\uFFFD\u009C\u008D\uFFFD\u008A\uFFFDip
spring.data.mongodb.secondary.host=192.168.0.101
#\uFFFD\u009C\u008D\uFFFD\u008A\uFFFDport
spring.data.mongodb.secondary.port=30000
spring.data.mongodb.secondary.username=stno
spring.data.mongodb.secondary.password=stno1q2w3e4r
spring.data.mongodb.secondary.authenticationDatabase=admin
#\uFFFD\u009C\u008D\uFFFD\u008A\uFFFD\u7AEF\uFFFD\u0095\uFFFD\uFFFD\u008D\uFFFD\uFFFD\u0093
spring.data.mongodb.thirdary.database=WechatPublic
#\uFFFD\u009C\u008D\uFFFD\u008A\uFFFDip
spring.data.mongodb.thirdary.host=192.168.0.101
#\uFFFD\u009C\u008D\uFFFD\u008A\uFFFDport
spring.data.mongodb.thirdary.port=30000
spring.data.mongodb.thirdary.username=stno
spring.data.mongodb.thirdary.password=stno1q2w3e4r
spring.data.mongodb.thirdary.authenticationDatabase=admin
#spring.data.mongodb.option.min-connection-per-host=0
#spring.data.mongodb.option.max-connection-per-host=100
#spring.data.mongodb.option.threads-allowed-to-block-for-connection-multiplier=5
#spring.data.mongodb.option.server-selection-timeout=30000
#spring.data.mongodb.option.max-wait-time=120000
#spring.data.mongodb.option.max-connection-idle-time=0
#spring.data.mongodb.option.max-connection-life-time=0
#spring.data.mongodb.option.connect-timeout=10000
#spring.data.mongodb.option.socket-timeout=0
#
#spring.data.mongodb.option.socket-keep-alive=false
#spring.data.mongodb.option.ssl-enabled=false
#spring.data.mongodb.option.ssl-invalid-host-name-allowed=false
#spring.data.mongodb.option.always-use-m-beans=false
#
#spring.data.mongodb.option.heartbeat-socket-timeout=20000
#spring.data.mongodb.option.heartbeat-connect-timeout=20000
#spring.data.mongodb.option.min-heartbeat-frequency=500
#spring.data.mongodb.option.heartbeat-frequency=10000
#spring.data.mongodb.option.local-threshold=15
##\uFFFD\u009C\uFFFD\uFFFD\u009C\uFFFDip
#spring.data.mongodb.host=192.168.0.241
##\uFFFD\u009C\uFFFD\uFFFD\u009C\uFFFDport
#spring.data.mongodb.port=27017
##\uFFFD\u009C\uFFFD\uFFFD\u009C\uFFFD\uFFFD\u0095\uFFFD\uFFFD\u008D\uFFFD\uFFFD\u0093
#spring.data.mongodb.database=qbjcPhoenix
#\uFFFD\u0085\uFFFD\uFFFD\u0096\uFFFD\u0095\uFFFD\uFFFD\u008D\uFFFD\uFFFD\u0093
#spring.data.mongodb.database=eventMuseum
#spring.data.mongodb.database=WechatPublic
#tag\uFFFD\u0094\uFFFDuri
#spring.data.mongodb.uri=1.119.44.206:30000
#spring.data.mongodb.uri=192.168.0.245:27017
#tag\uFFFD\u0095\uFFFD\uFFFD\u008D\uFFFD\uFFFD\u0093
#spring.data.mongodb.database=Testqbjc
#spring.data.mongodb.database=weibotag
#mongo.connectionsPerHost=200
#mongo.threadsAllowedToBlockForConnectionMultiplier=10
#
#mongo.connectTimeout=30000
#
#mongo.maxWaitTime=50000
#mongo.autoConnectRetry=true
#mongo.socketKeepAlive=true
#
#mongo.socketTimeout=120000
#mongo.slaveOk=true
\ No newline at end of file
src/main/resources/redis.properties
View file @
7dae5edc
...
...
@@ -2,6 +2,10 @@ redis.maxTotal=2048
redis.maxIdle
=
200
redis.maxWaitMillis
=
1000
redis.testOnBorrow
=
true
redis.maxTotal
=
2048
redis.maxIdle
=
200
redis.maxWaitMillis
=
1000
redis.testOnBorrow
=
true
redis.testOnReturn
=
true
redis.ip
=
192.168.0.202
#redis.ip = 202.107.192.94
...
...
src/main/resources/redis.properties.6380
View file @
7dae5edc
...
...
@@ -12,7 +12,6 @@ redis.port=6380
#redis.password=fjouero&^%^%^$*()*)))*^$$KDFJDKJF9ruorudlfdljfldjf
redis.keyMaxSize=5000
redis.DIRECTKEY=Direct:
redis.selectDB=12
#redis.selectDB=2
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment