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
5a2d7476
Commit
5a2d7476
authored
Nov 18, 2019
by
王建成
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
655c5792
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
112 additions
and
67 deletions
+112
-67
src/main/resources/conf.properties
+1
-1
src/main/scala/com/hikcreate/data/common/Sparking.scala
+2
-2
src/main/scala/com/hikcreate/data/constant/ApolloConst.scala
+1
-1
src/main/scala/com/hikcreate/data/sync/SysncHiveBatch.scala
+85
-61
src/test/scala/Test1.scala
+23
-2
No files found.
src/main/resources/conf.properties
View file @
5a2d7476
kafka.bootstrap.servers
=
39.100.49.76:9092
#kafka.bootstrap.servers=10.197.236.154:9092
kafka.zookerper.servers
=
10.197.236.
154
:2181
kafka.zookerper.servers
=
10.197.236.
211
:2181
#,10.197.236.169:2181,10.197.236.184:2181/kafka
#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
...
...
src/main/scala/com/hikcreate/data/common/Sparking.scala
View file @
5a2d7476
...
...
@@ -18,8 +18,8 @@ trait Sparking {
.
set
(
"spark.extraListeners"
,
classOf
[
LifecycleListener
].
getName
)
.
set
(
"hive.exec.dynamici.partition"
,
"true"
)
.
set
(
"hive.exec.dynamic.partition.mode"
,
"nonstrict"
)
//
.setAppName("test")
//
.setMaster("local[*]")
.
setAppName
(
"test"
)
.
setMaster
(
"local[*]"
)
def
getKafkaParams
(
servers
:
String
,
groupId
:
String
)
:
Map
[
String
,
Object
]
=
{
Map
[
String
,
Object
](
...
...
src/main/scala/com/hikcreate/data/constant/ApolloConst.scala
View file @
5a2d7476
...
...
@@ -8,7 +8,7 @@ object ApolloConst {
val
config
:
Config
=
ConfigService
.
getConfig
(
"application"
)
val
queueSize
:
Int
=
config
.
getIntProperty
(
"queue.size"
,
20
)
var
hdfsUrl
:
String
=
config
.
getProperty
(
"hdfs.url"
,
null
)
var
windowTime
:
Long
=
config
.
getLongProperty
(
"window.time"
,
1L
)
var
compactTopic
:
Seq
[
String
]
=
config
.
getProperty
(
"compact.kafka.topic"
,
null
).
split
(
","
)
...
...
src/main/scala/com/hikcreate/data/sync/SysncHiveBatch.scala
View file @
5a2d7476
This diff is collapsed.
Click to expand it.
src/test/scala/Test1.scala
View file @
5a2d7476
import
com.hikcreate.data.util.Tools
import
scala.collection.mutable
object
Test1
{
def
main
(
args
:
Array
[
String
])
:
Unit
=
{
val
a
=
Tools
.
getAddressAndLocationCode
(
120.485443
,
30.183996
)
println
(
a
.
_1
+
"----"
+
a
.
_2
)
// val a = Tools.getAddressAndLocationCode(120.485443,30.183996)
// println(a._1+"----"+a._2)
// var eventtype="0x2"
// eventtype = eventtype.replace("x","x0")
// println(eventtype)
val
list
=
(
1
to
(
20
)).
toList
val
queue
=
mutable
.
Queue
[
Int
]()
(
1
to
(
20
)).
foreach
(
i
=>
queue
.
enqueue
(
i
))
val
i
=
queue
.
dequeue
()
println
(
i
)
println
(
queue
)
queue
.
enqueue
(
i
)
println
(
queue
)
// val dequeue = queue
// println(dequeue._1)
// println(queue)
//val queue1 = queue.enqueue(dequeue._1)
//println(queue1)
}
...
...
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