forked from twitter-archive/snowflake
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move config traits to their own files
- Loading branch information
Showing
3 changed files
with
32 additions
and
26 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
src/main/scala/com/twitter/service/snowflake/ReporterConfig.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.twitter.service.snowflake | ||
|
||
trait ReporterConfig { | ||
val scribeCategory: String | ||
val scribeHost: String | ||
val scribePort: Int | ||
val scribeSocketTimeout: Int | ||
val flushQueueLimit: Int | ||
} |
23 changes: 23 additions & 0 deletions
23
src/main/scala/com/twitter/service/snowflake/SnowflakeConfig.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.twitter.service.snowflake | ||
|
||
import com.twitter.ostrich.admin.RuntimeEnvironment | ||
import com.twitter.ostrich.admin.config.ServerConfig | ||
|
||
trait SnowflakeConfig extends ServerConfig[SnowflakeServer] { | ||
val serverPort: Int | ||
val datacenterId: Int | ||
val workerId: Int | ||
val adminPort: Int | ||
val adminBacklog: Int | ||
val workerIdZkPath: String | ||
val zkHostlist: String | ||
val skipSanityChecks: Boolean | ||
val startupSleepMs: Int | ||
val thriftServerThreads: Int | ||
|
||
val reporterConfig: ReporterConfig | ||
|
||
def apply(runtime: RuntimeEnvironment) = { | ||
new SnowflakeServer(this) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters