forked from ClickHouse/graphouse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
126 lines (111 loc) · 3.67 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
buildscript {
repositories {
mavenCentral()
mavenLocal()
}
}
project.repositories {
mavenCentral()
mavenLocal()
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'application'
group = 'ru.yandex'
version = '1.1-SNAPSHOT'
sourceCompatibility = 1.8
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'
javadoc.options.encoding = 'UTF-8'
dependencies {
compile 'ru.yandex.clickhouse:clickhouse-jdbc:0.1.37'
compile 'com.google.guava:guava:21.0'
compile 'com.google.code.gson:gson:2.3.1'
compile 'org.springframework:spring-jdbc:4.1.6.RELEASE'
compile 'org.springframework:spring-context:4.1.6.RELEASE'
compile 'org.apache.logging.log4j:log4j-api:2.3'
compile 'org.apache.logging.log4j:log4j-core:2.3'
compile 'org.apache.logging.log4j:log4j-web:2.3'
compile 'commons-dbcp:commons-dbcp:1.4'
compile 'org.eclipse.jetty:jetty-server:9.2.10.v20150310'
compile 'org.eclipse.jetty:jetty-servlet:9.2.10.v20150310'
compile 'com.beust:jcommander:1.60'
testCompile group: 'junit', name: 'junit', version: '4.8.1'
testCompile group: 'com.mockrunner', name: 'mockrunner-jdbc', version: '1.1.2'
}
project.sourceSets {
script {
resources {
srcDir 'src/main/script'
}
}
}
mainClassName = 'ru.yandex.market.graphouse.GraphouseMain'
task insertPerfTest(type: CreateStartScripts) {
mainClassName = 'ru.yandex.market.graphouse.perf.InsertTest'
applicationName = 'inputPerfTest'
outputDir = new File(project.buildDir, 'scripts')
classpath = jar.outputs.files + project.configurations.runtime
applicationDefaultJvmArgs = [
'-Xmx1g',
]
doLast {
delete windowsScript
}
}
applicationDistribution.into("bin") {
from(insertPerfTest)
fileMode = 0755
}
distributions {
main {
contents {
from('src/main/script/log4j2.xml') {
into 'conf'
}
from('src/main/script/graphouse.vmoptions') {
into 'conf'
}
from('src/main/resources/graphouse-default.properties') {
rename('graphouse-default.properties', 'graphouse.properties')
into 'conf'
}
from('src/main/pySources/graphouse.py') {
into 'bin'
}
from('src/main/pySources/graphouse_api.py') {
into 'bin'
}
from('LICENSE') {
into ''
}
//Creating empty dir
into('') {
def logDirBase = new File("$buildDir/tmp/logDirBase")
new File(logDirBase.absolutePath + '/log').mkdirs()
from { logDirBase }
}
}
}
}
applicationDefaultJvmArgs = [
'-Dapp.home=GRAPHOUSE_APP_HOME',
'-Dlog4j.configurationFile=GRAPHOUSE_APP_HOME/conf/log4j2.xml',
'-verbose:gc', '-XX:+PrintGC', '-XX:+PrintGCDetails', '-XX:+PrintGCTimeStamps', '-XX:+PrintGCDateStamps',
'-XX:+UseGCLogFileRotation', '-XX:NumberOfGCLogFiles=7', '-XX:GCLogFileSize=50M',
'-Xloggc:GRAPHOUSE_APP_HOME/log/graphouse.gc.log',
'-XX:+HeapDumpOnOutOfMemoryError', '-XX:HeapDumpPath=GRAPHOUSE_APP_HOME/log/',
'-showversion', '-server', '-XX:+UseCompressedOops',
'-Dsun.net.inetaddr.ttl=60', '-Dsun.net.inetaddr.negative.ttl=0'
]
startScripts {
doLast {
unixScript.text = unixScript.text.replace('GRAPHOUSE_APP_HOME', '\$APP_HOME')
unixScript.text = unixScript.text.replace(
'APP_HOME="`pwd -P`"',
'APP_HOME="`pwd -P`"\n' +
'GRAPHOUSE_OPTS=$(<$APP_HOME/conf/graphouse.vmoptions)'
)
delete windowsScript
}
}