Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
operating-vehicle
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杜发飞
operating-vehicle
Commits
da710836
Commit
da710836
authored
Nov 05, 2019
by
王建成
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
c8e64ee4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
13 deletions
+23
-13
pom.xml
+11
-1
src/main/resources/conf.properties
+9
-10
src/main/scala/com/hikcreate/data/constant/Const.scala
+2
-1
src/main/scala/com/hikcreate/data/sync/SysncHiveBatch.scala
+0
-0
src/main/scala/com/hikcreate/data/util/Tools.scala
+1
-1
No files found.
pom.xml
View file @
da710836
...
...
@@ -6,7 +6,7 @@
<groupId>
groupId
</groupId>
<artifactId>
operating-vehicle
</artifactId>
<version>
1.
2
-SNAPSHOT
</version>
<version>
1.
3
-SNAPSHOT
</version>
<repositories>
<repository>
...
...
@@ -27,6 +27,16 @@
<dependencies>
<dependency>
<groupId>
com.ctrip.framework.apollo
</groupId>
<artifactId>
apollo-client
</artifactId>
<version>
1.3.0
</version>
</dependency>
<dependency>
<groupId>
com.ctrip.framework.apollo
</groupId>
<artifactId>
apollo-core
</artifactId>
<version>
1.3.0
</version>
</dependency>
<dependency>
<groupId>
org.apache.spark
</groupId>
<artifactId>
spark-core_${scala.binary.version}
</artifactId>
<version>
${spark.version}
</version>
...
...
src/main/resources/conf.properties
View file @
da710836
...
...
@@ -2,21 +2,20 @@ kafka.bootstrap.servers=39.100.49.76:9092
#kafka.zookerper.servers=172.26.111.183:2181,172.26.111.178:2181,172.26.111.186:2181/tbd_kafka
kafka.zookerper.servers
=
10.197.236.211:2181
window.time
=
5
compact.kafka.topic
=
transport_basedata_operation,tbd-transport-data-gathering
application.kafka.topic
=
tbd-transport-data-gathering
basicsInfo.kafka.topic
=
transport_basedata_operation
hive.group.id
=
hive
ignite.group.id
=
ignite3
basics.group.id
=
basics2
hdfs.url
=
hdfs://10.197.236.211:8020
hive.driver
=
org.apache.hive.jdbc.HiveDriver
hive.url
=
jdbc:hive2://hadoop02:10000/ods
hive.username
=
hive
hive.password
=
hive
areaCodeAndAddress.Url
=
http://10.197.236.100:40612/bcpbase/geocode/regeo
warnTypes
=
0x0064,0x0065,0x0066
hive.unknown.table
=
unknown_mes
hive.unknown.table
=
KAFKA_UNKNOWN_I
###链路管理类
hive.UP_CONNECT_REQ.table
=
KAFKA_UP_CONNECT_I
hive.UP_DISCONNECT_REQ.table
=
KAFKA_UP_DISCONNECT_INFORM_I
...
...
@@ -46,8 +45,8 @@ hive.UP_PREVENTION_EXG_MSG_DEVICE_PARAM.table=KAFKA_UP_PREVENTION_EXG_MSG_DEVICE
###智能视频报警交互消息类
hive.UP_PREVENTION_MSG_FILE_COMPLETE.table
=
KAFKA_UP_PREVENTION_MSG_FILE_COMPLETE_I
#基础信息hive表
hive.KAFKA_base_into_platform_info.table
=
KAFKA_base_into_platform_info_I
hive.KAFKA_base_into_enterprise_info.table
=
KAFKA_base_into_enterprise_info_I
hive.KAFKA_base_into_vehicle_info.table
=
KAFKA_base_into_vehicle_info_I
hive.KAFKA_base_data_display_config.table
=
KAFKA_base_data_display_config_I
hive.KAFKA_base_warning_type.table
=
KAFKA_base_warning_type_I
\ No newline at end of file
hive.KAFKA_base_into_platform_info.table
=
kafka_base_into_platform_info_i
hive.KAFKA_base_into_enterprise_info.table
=
kafka_base_into_enterprise_info_i
hive.KAFKA_base_into_vehicle_info.table
=
kafka_base_into_vehicle_info_i
hive.KAFKA_base_data_display_config.table
=
kafka_base_data_display_config_i
hive.KAFKA_base_warning_type.table
=
kafka_base_warning_type_i
\ No newline at end of file
src/main/scala/com/hikcreate/data/constant/Const.scala
View file @
da710836
...
...
@@ -9,7 +9,7 @@ object Const {
val
windowTime
:
Int
=
Config
.
getInt
(
"window.time"
)
val
bootstrap
:
String
=
Config
.
getString
(
"kafka.bootstrap.servers"
)
val
zkKafka
:
String
=
Config
.
getString
(
"kafka.zookerper.servers"
)
val
compactTopic
:
Array
[
String
]
=
Config
.
getString
(
"compact.kafka.topic"
).
split
(
","
)
val
applicationTopic
:
Array
[
String
]
=
Config
.
getString
(
"application.kafka.topic"
).
split
(
","
)
val
basicsInfoTopic
:
Array
[
String
]
=
Config
.
getString
(
"basicsInfo.kafka.topic"
).
split
(
","
)
val
hiveGroupId
:
String
=
Config
.
getString
(
"hive.group.id"
)
...
...
@@ -23,6 +23,7 @@ object Const {
val
hivePassword
:
String
=
Config
.
getString
(
"hive.password"
)
val
areaCodeAndAddressUrl
:
String
=
Config
.
getString
(
"areaCodeAndAddress.Url"
)
val
unKnownTable
:
String
=
Config
.
getString
(
"hive.unknown.table"
)
val
hdfsUrl
:
String
=
Config
.
getString
(
"hdfs.url"
)
val
warnTypes
:
Array
[
String
]
=
Config
.
getString
(
"warnTypes"
).
split
(
","
)
...
...
src/main/scala/com/hikcreate/data/sync/SysncHiveBatch.scala
View file @
da710836
This diff is collapsed.
Click to expand it.
src/main/scala/com/hikcreate/data/util/Tools.scala
View file @
da710836
...
...
@@ -77,7 +77,7 @@ object Tools extends Logging{
val
startTime
=
DateTime
.
now
()
val
response
=
Http
(
Const
.
areaCodeAndAddressUrl
).
postData
(
json
.
toJSONString
).
header
(
"content-type"
,
"application/json"
).
asString
val
endTime
=
DateTime
.
now
()
println
(
"经纬度列表size:"
+
buffer
.
size
+
"===》http response time :"
+
new
Duration
(
startTime
,
endTime
).
getMillis
)
//
println("经纬度列表size:"+buffer.size+"===》http response time :"+new Duration(startTime,endTime).getMillis)
val
body
=
JSON
.
parseObject
(
response
.
body
)
val
items
=
body
.
getJSONObject
(
"result"
).
getJSONArray
(
"regeoItems"
)
(
0
until
items
.
size
()).
map
{
index
=>
...
...
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