Skip to content

Commit 83333c2

Browse files
author
Vatsal Mevada
committed
Merge branch 'master' into SNAP-3104
# Conflicts: # cluster/src/main/scala/io/snappydata/gemxd/ClusterCallbacksImpl.scala # core/src/main/scala/io/snappydata/util/ServiceUtils.scala
2 parents 9b5c851 + c60f1e9 commit 83333c2

File tree

204 files changed

+94095
-76548
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

204 files changed

+94095
-76548
lines changed

LICENSE

+80,536-74,857
Large diffs are not rendered by default.

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -102,21 +102,21 @@ SnappyData artifacts are hosted in Maven Central. You can add a Maven dependency
102102
```
103103
groupId: io.snappydata
104104
artifactId: snappydata-cluster_2.11
105-
version: 1.1.1
105+
version: 1.2.0
106106
```
107107

108108
### Using SBT Dependency
109109

110110
If you are using SBT, add this line to your **build.sbt** for core SnappyData artifacts:
111111

112112
```
113-
libraryDependencies += "io.snappydata" % "snappydata-core_2.11" % "1.1.1"
113+
libraryDependencies += "io.snappydata" % "snappydata-core_2.11" % "1.2.0"
114114
```
115115

116116
For additions related to SnappyData cluster, use:
117117

118118
```
119-
libraryDependencies += "io.snappydata" % "snappydata-cluster_2.11" % "1.1.1"
119+
libraryDependencies += "io.snappydata" % "snappydata-cluster_2.11" % "1.2.0"
120120
```
121121

122122
You can find more specific SnappyData artifacts [here](http://mvnrepository.com/artifact/io.snappydata)

build.gradle

+30-42
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ allprojects {
7272
apply plugin: "build-time-tracker"
7373

7474
group = 'io.snappydata'
75-
version = '1.1.1'
75+
version = '1.2.0'
7676

7777
// apply compiler options
7878
tasks.withType(JavaCompile) {
@@ -108,7 +108,7 @@ allprojects {
108108
scalaBinaryVersion = '2.11'
109109
scalaVersion = scalaBinaryVersion + '.8'
110110
sparkVersion = '2.1.1'
111-
snappySparkVersion = '2.1.1.7'
111+
snappySparkVersion = '2.1.1.8'
112112
sparkDistName = "spark-${sparkVersion}-bin-hadoop2.7"
113113
sparkCurrentVersion = '2.3.2'
114114
sparkCurrentDistName = "spark-${sparkCurrentVersion}-bin-hadoop2.7"
@@ -117,6 +117,10 @@ allprojects {
117117
junitVersion = '4.12'
118118
mockitoVersion = '1.10.19'
119119
hadoopVersion = '2.7.7'
120+
gcsHadoop2ConnectorVersion = 'hadoop2-2.0.0'
121+
gcsHadoop3ConnectorVersion = 'hadoop3-2.0.0'
122+
sparkAvroVersion = '4.0.0'
123+
sparkXmlVersion = '0.4.1'
120124
scalatestVersion = '2.2.6'
121125
jettyVersion = '9.2.26.v20180806'
122126
guavaVersion = '14.0.1'
@@ -151,7 +155,7 @@ allprojects {
151155
antlr2Version = '2.7.7'
152156

153157
pegdownVersion = '1.6.0'
154-
snappyStoreVersion = '1.6.4'
158+
snappyStoreVersion = '1.6.5'
155159
snappydataVersion = version
156160
pulseVersion = '1.5.1'
157161
zeppelinInterpreterVersion = '0.7.3.6'
@@ -163,12 +167,20 @@ allprojects {
163167
osFamilyName = osName.getFamilyName().replace(' ', '').toLowerCase()
164168
osVersion = System.getProperty('os.version')
165169
buildDate = new Date().format('yyyy-MM-dd HH:mm:ss Z')
170+
buildDateShort = ''
171+
if (rootProject.hasProperty('withDate')) {
172+
buildDateShort = "${new Date().format('yyyyMMdd')}_"
173+
}
174+
devEdition = ''
175+
if (rootProject.hasProperty('dev')) {
176+
devEdition = "-dev"
177+
}
166178
buildNumber = new Date().format('MMddyy')
167179
jdkVersion = System.getProperty('java.version')
168-
sparkJobServerVersion = '0.6.2.10'
180+
sparkJobServerVersion = '0.6.2.11'
169181
eclipseCollectionsVersion = '9.2.0'
170182
fastutilVersion = '8.2.2'
171-
sparkMetricsLibVersion = '2.0.0'
183+
snappySparkMetricsLibVersion = '2.0.0.1'
172184

173185
gitCmd = "git --git-dir=${rootDir}/.git --work-tree=${rootDir}"
174186
gitBranch = "${gitCmd} rev-parse --abbrev-ref HEAD".execute().text.trim()
@@ -568,7 +580,7 @@ subprojects {
568580

569581
// apply default manifest
570582
if (rootProject.hasProperty('enablePublish')) {
571-
createdBy = 'TIBCO Software Inc.'
583+
createdBy = vendorName
572584
}
573585
jar {
574586
manifest {
@@ -914,6 +926,7 @@ task product(type: Zip) {
914926
dependsOn ":snappy-spark:snappy-spark-assembly_${scalaBinaryVersion}:sparkProduct"
915927
dependsOn ':snappy-launcher:jar'
916928
dependsOn ':jdbcJar'
929+
dependsOn ':copyShadowJars'
917930

918931
def clusterProject = project(":snappy-cluster_${scalaBinaryVersion}")
919932
def launcherProject = project(':snappy-launcher')
@@ -1074,6 +1087,11 @@ task product(type: Zip) {
10741087
into "${snappyProductDir}/connectors"
10751088
include "*.jar"
10761089
}
1090+
copy {
1091+
from "${jdbcConnectorProject.projectDir}/../tdv-connector/lib"
1092+
into "${snappyProductDir}/connectors"
1093+
include "csjdbc8.jar"
1094+
}
10771095
}
10781096
if (hasGemFireConnectorProject) {
10791097
copy {
@@ -1200,7 +1218,6 @@ ospackage {
12001218
}
12011219

12021220
buildRpm {
1203-
dependsOn ':packageVSD'
12041221
if (rootProject.hasProperty('enablePublish')) {
12051222
dependsOn ':packageZeppelinInterpreter'
12061223
}
@@ -1216,7 +1233,6 @@ buildRpm {
12161233
}
12171234

12181235
buildDeb {
1219-
dependsOn ':packageVSD'
12201236
if (rootProject.hasProperty('enablePublish')) {
12211237
dependsOn ':packageZeppelinInterpreter'
12221238
}
@@ -1235,13 +1251,11 @@ buildDeb {
12351251
distTar {
12361252
// archiveName = 'TIB_compute-ce_' + version + '_' + osFamilyName + '.tar.gz'
12371253
if (isEnterpriseProduct) {
1238-
archiveName = 'TIB_compute_' + version + '_' + osFamilyName + '.tar.gz'
1254+
archiveName = 'TIB_compute' + devEdition + '_' + version + '_' + buildDateShort + osFamilyName + '.tar.gz'
12391255
} else {
12401256
classifier 'bin'
12411257
}
12421258
dependsOn product
1243-
// also package VSD
1244-
dependsOn ':packageVSD'
12451259
if (rootProject.hasProperty('enablePublish')) {
12461260
dependsOn ':packageZeppelinInterpreter'
12471261
}
@@ -1255,13 +1269,11 @@ distTar {
12551269
distZip {
12561270
// archiveName = 'TIB_compute-ce_' + version + '_' + osFamilyName + '.zip'
12571271
if (isEnterpriseProduct) {
1258-
archiveName = 'TIB_compute_' + version + '_' + osFamilyName + '.zip'
1272+
archiveName = 'TIB_compute' + devEdition + '_' + version + '_' + buildDateShort + osFamilyName + '.zip'
12591273
} else {
12601274
classifier 'bin'
12611275
}
12621276
dependsOn product
1263-
// also package VSD
1264-
dependsOn ':packageVSD'
12651277
if (rootProject.hasProperty('enablePublish')) {
12661278
dependsOn ':packageZeppelinInterpreter'
12671279
}
@@ -1332,7 +1344,6 @@ task distInstallers {
13321344
task distProduct {
13331345
dependsOn product, distTar, distZip
13341346
dependsOn distInstallers
1335-
dependsOn copyShadowJars
13361347
}
13371348

13381349
task generateSources {
@@ -1372,6 +1383,7 @@ task buildAll {
13721383
dependsOn getTasksByName('assemble', true).collect { it.path }
13731384
dependsOn getTasksByName('product', true).collect { it.path }
13741385
dependsOn getTasksByName('testClasses', true).collect { it.path }
1386+
dependsOn copyShadowJars
13751387
mustRunAfter cleanAll
13761388
}
13771389
task buildDtests {
@@ -1386,7 +1398,9 @@ task checkAll {
13861398
if (rootProject.hasProperty('spark')) {
13871399
dependsOn ':snappy-spark:check'
13881400
}
1389-
dependsOn ":snappy-cluster_${scalaBinaryVersion}:check"
1401+
if (!rootProject.hasProperty('cluster.skip')) {
1402+
dependsOn ":snappy-cluster_${scalaBinaryVersion}:check"
1403+
}
13901404
dependsOn ":snappy-examples_${scalaBinaryVersion}:check"
13911405
if (!rootProject.hasProperty('aqp.skip') && hasAqpProject && isEnterpriseProduct) {
13921406
dependsOn ":snappy-aqp_${scalaBinaryVersion}:check"
@@ -1489,37 +1503,11 @@ task packagePulse { doLast {
14891503
}
14901504
} }
14911505

1492-
task packageVSD { doLast {
1493-
String thirdparty = System.env.THIRDPARTYDIR
1494-
String vsdDir = ''
1495-
1496-
if (thirdparty == null || thirdparty.length() == 0) {
1497-
vsdDir = "${projectDir}/../thirdparty/vsd"
1498-
} else {
1499-
vsdDir = "${thirdparty}/vsd"
1500-
}
1501-
1502-
String vsdDistDir = "${vsdDir}/70/vsd"
1503-
if (file(vsdDistDir).canWrite()) {
1504-
println ''
1505-
println "Copying VSD from ${vsdDistDir} to ${snappyProductDir}/vsd"
1506-
println ''
1507-
delete "${snappyProductDir}/vsd"
1508-
copy {
1509-
from vsdDistDir
1510-
into "${snappyProductDir}/vsd"
1511-
}
1512-
} else {
1513-
println "Skipping VSD due to unwritable ${vsdDistDir}"
1514-
}
1515-
} }
1516-
15171506
task sparkPackage {
15181507
dependsOn ":snappy-core_${scalaBinaryVersion}:sparkPackage"
15191508
}
15201509

15211510
packagePulse.mustRunAfter product
1522-
packageVSD.mustRunAfter product
15231511
packageZeppelinInterpreter.mustRunAfter product
15241512

15251513
distTar.mustRunAfter clean, cleanAll, product

cluster/bin/snappy

+16-7
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,10 @@ elif [ -z "$SNAPPY_NO_QUICK_LAUNCH" -a $# -ge 2 \
7676
. "${SPARK_HOME}"/bin/load-snappy-env.sh
7777

7878
HOSTNAME_FOR_CLIENTS=
79+
IMPLICIT_AWS_CLIENT_BIND_ADDRESS=
7980
if [ "$2" = "start" ]; then
8081
# set hostname-for-clients and SPARK_PUBLIC_DNS in AWS (only supported for Linux)
81-
if [ -z "$SPARK_PUBLIC_DNS" ]; then
82+
if [ -z "$SPARK_PUBLIC_DNS" -o -n "$IMPLICIT_CLIENT_BIND_ADDRESS" ]; then
8283
CHECK_AWS=1
8384
if [ -r /sys/hypervisor/uuid ]; then
8485
if ! grep -q '^ec2' /sys/hypervisor/uuid; then
@@ -93,19 +94,27 @@ elif [ -z "$SNAPPY_NO_QUICK_LAUNCH" -a $# -ge 2 \
9394
CHECK_AWS=
9495
fi
9596
if [ -n "$CHECK_AWS" ]; then
96-
SPARK_PUBLIC_DNS="$(curl -s --connect-timeout 3 http://169.254.169.254/latest/meta-data/public-ipv4 | head -1)"
97-
if [ -n "$SPARK_PUBLIC_DNS" ]; then
98-
if ! echo $"${@// /\\ }" | grep -q 'hostname-for-clients='; then
99-
HOSTNAME_FOR_CLIENTS="-hostname-for-clients=$SPARK_PUBLIC_DNS"
97+
if [ -z "$SPARK_PUBLIC_DNS" ]; then
98+
SPARK_PUBLIC_DNS="$(curl -s --connect-timeout 3 http://169.254.169.254/latest/meta-data/public-ipv4 | head -1)"
99+
if [ -n "$SPARK_PUBLIC_DNS" ]; then
100+
if ! echo $"${@// /\\ }" | grep -q 'hostname-for-clients='; then
101+
HOSTNAME_FOR_CLIENTS="-hostname-for-clients=$SPARK_PUBLIC_DNS"
102+
fi
103+
export SPARK_PUBLIC_DNS
100104
fi
101-
export SPARK_PUBLIC_DNS
102105
fi
106+
if [ -n "$IMPLICIT_CLIENT_BIND_ADDRESS" ]; then
107+
IMPLICIT_AWS_CLIENT_BIND_ADDRESS="-client-bind-address=0.0.0.0"
108+
fi
109+
elif [ -n "$IMPLICIT_CLIENT_BIND_ADDRESS" ]; then
110+
IMPLICIT_AWS_CLIENT_BIND_ADDRESS="-client-bind-address=${IMPLICIT_CLIENT_BIND_ADDRESS}"
103111
fi
104112
fi
105113
fi
106114

107115
JARS="`echo "${SPARK_HOME}"/jars/snappydata-launcher* "${SPARK_HOME}"/jars/gemfire-shared* "${SPARK_HOME}"/jars/jna-4.* | sed 's/ /:/g'`"
108-
exec $RUNNER $JAVA_ARGS -Xverify:none -cp "$JARS" io.snappydata.tools.QuickLauncher "$@" $HOSTNAME_FOR_CLIENTS
116+
exec $RUNNER $JAVA_ARGS -Xverify:none -cp "$JARS" io.snappydata.tools.QuickLauncher "$@" $HOSTNAME_FOR_CLIENTS $IMPLICIT_AWS_CLIENT_BIND_ADDRESS
117+
IMPLICIT_CLIENT_BIND_ADDRESS=
109118
else
110119
# use full snappy launcher
111120
exec "$SPARK_HOME"/bin/spark-class $JAVA_ARGS io.snappydata.tools.SnappyUtilLauncher "$@"

cluster/bin/snappy-scala

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/usr/bin/env bash
2+
3+
#
4+
# Copyright (c) 2017-2019 TIBCO Software Inc. All rights reserved.
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License"); you
7+
# may not use this file except in compliance with the License. You
8+
# may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15+
# implied. See the License for the specific language governing
16+
# permissions and limitations under the License. See accompanying
17+
# LICENSE file.
18+
#
19+
20+
function absPath() {
21+
perl -MCwd -le 'print Cwd::abs_path(shift)' "$1"
22+
}
23+
bin="$(dirname "$(absPath "$0")")"
24+
25+
export SNAPPY_SCRIPT_NAME=snappy-scala
26+
exec "$bin/snappy" "$@"

cluster/build.gradle

+33
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,39 @@ dependencies {
133133
exclude(group: 'org.apache.directory.server', module: 'apacheds-kerberos-codec')
134134
}
135135

136+
compile "io.snappydata:spark-metrics:${snappySparkMetricsLibVersion}"
137+
138+
compile (group: 'com.databricks', name:'spark-xml_2.11', version: sparkXmlVersion) {
139+
//exclude(group: 'org.scala-lang', module: 'scala-library')
140+
}
141+
compile (group: 'com.databricks', name:'spark-avro_2.11', version: sparkAvroVersion) {
142+
//exclude(group: 'org.scala-lang', module: 'scala-library')
143+
//exclude(group: 'org.apache.avro', module: 'avro')
144+
}
145+
compile(group:'com.google.cloud.bigdataoss', name:'gcs-connector', version: gcsHadoop2ConnectorVersion, classifier: 'shaded')
146+
147+
compile(group: 'org.apache.hadoop', name: 'hadoop-azure', version: hadoopVersion) {
148+
// exclude some dependencies like in hadoop-aws to avoid conflicts with other deps
149+
exclude(group: 'asm', module: 'asm')
150+
exclude(group: 'org.codehaus.jackson', module: 'jackson-mapper-asl')
151+
exclude(group: 'org.ow2.asm', module: 'asm')
152+
exclude(group: 'org.apache.zookeeper', module: 'zookeeper')
153+
exclude(group: 'org.jboss.netty', module: 'netty')
154+
exclude(group: 'jline', module: 'jline')
155+
exclude(group: 'commons-logging', module: 'commons-logging')
156+
exclude(group: 'org.mockito', module: 'mockito-all')
157+
exclude(group: 'org.mortbay.jetty', module: 'servlet-api-2.5')
158+
exclude(group: 'javax.servlet', module: 'servlet-api')
159+
exclude(group: 'junit', module: 'junit')
160+
exclude(group: 'com.google.guava', module: 'guava')
161+
exclude(group: 'com.sun.jersey')
162+
exclude(group: 'com.sun.jersey.jersey-test-framework')
163+
exclude(group: 'com.sun.jersey.contribs')
164+
exclude(group: 'com.google.protobuf', module: 'protobuf-java')
165+
exclude(group: 'com.jcraft', module: 'jsch')
166+
exclude(group: 'org.apache.directory.server', module: 'apacheds-kerberos-codec')
167+
}
168+
136169
testCompile project(':dunit')
137170
testCompile "it.unimi.dsi:fastutil:${fastutilVersion}"
138171
testCompile "org.scalatest:scalatest_${scalaBinaryVersion}:${scalatestVersion}"

cluster/conf/leads.template

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#
3838
# IV) Start the SnappyData Zeppelin interpreter on the Lead node
3939
#
40-
# lead1 -dir=/tmp/data/server -spark.ui.port=3333 -spark.executor.cores=16 -zeppelin.interpreter.enable=true -classpath=<Path to jar of Zeppelin Interpreter for SnappyData>
40+
# lead1 -dir=/tmp/data/server -spark.ui.port=3333 -spark.executor.cores=16 -zeppelin.interpreter.enable=true
4141
#
4242
# For more options, see http://snappydatainc.github.io/snappydata/configuration/#configuration
4343
localhost

cluster/conf/locators.template

+3
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@
5252
#
5353
# <private hostname/IP> -client-bind-address=<private hostname/IP> -hostname-for-clients=<public hostname/IP for clients>
5454
#
55+
# NOTE: For AWS environment, the cluster launch script (snappy-start-all.sh) automatically appends above two properties with
56+
# appropriate values to the locator's configuration, so that users do not have to specify them here explicitly.
57+
#
5558
# III) Logging to different directory
5659
# Specify the startup directory where the logs and configuration files for that locator instance
5760
# are managed.

cluster/conf/servers.template

+4
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@
3939
#
4040
# <private hostname/IP> -client-bind-address=<private hostname/IP> -client-port=1555 -hostname-for-clients=<public hostname/IP for clients>
4141
#
42+
# NOTE: For AWS environment, the cluster launch script (snappy-start-all.sh) automatically appends above two properties
43+
# viz. -client-bind-address and -hostname-for-clients with appropriate values to the server's configuration, so that
44+
# users do not have to specify them here explicitly.
45+
#
4246
# For more configuration options,
4347
# see http://snappydatainc.github.io/snappydata/configuration/#configuration
4448
localhost

cluster/sbin/snappy-nodes.sh

+7-3
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,8 @@ function execute() {
201201
202202
# set the default client-bind-address and locator's peer-discovery-address
203203
if [ -z "${clientBindAddress}" -a "${componentType}" != "lead" ]; then
204-
args="${args} -client-bind-address=${host}"
205-
clientBindAddress="${host}"
204+
preCommand="${preCommand}export IMPLICIT_CLIENT_BIND_ADDRESS=$host; "
205+
export IMPLICIT_CLIENT_BIND_ADDRESS="${host}"
206206
fi
207207
if [ -z "$(echo $args $"${@// /\\ }" | grep 'peer-discovery-address=')" -a "${componentType}" = "locator" ]; then
208208
args="${args} -peer-discovery-address=${host}"
@@ -243,7 +243,11 @@ function execute() {
243243
-*) postArgs="$postArgs $arg"
244244
esac
245245
done
246-
if [ "$host" != "localhost" ]; then
246+
THIS_HOST_IP=
247+
if [ "$(echo `uname -s`)" == "Linux" ]; then
248+
THIS_HOST_IP="$(echo `hostname -I` | grep "$host")"
249+
fi
250+
if [ "$host" != "localhost" -a -z "$THIS_HOST_IP" ]; then
247251
if [ "$dirfolder" != "" ]; then
248252
# Create the directory for the snappy component if the folder is a default folder
249253
(ssh $SPARK_SSH_OPTS "$host" \

0 commit comments

Comments
 (0)