Skip to content

Commit 7bb70f1

Browse files
committed
Merge branch 'master' into configTimeout-6980
Conflicts: core/src/main/scala/org/apache/spark/deploy/Client.scala core/src/main/scala/org/apache/spark/deploy/client/AppClient.scala core/src/main/scala/org/apache/spark/deploy/master/Master.scala core/src/main/scala/org/apache/spark/deploy/master/ui/ApplicationPage.scala core/src/main/scala/org/apache/spark/deploy/master/ui/MasterPage.scala core/src/main/scala/org/apache/spark/deploy/master/ui/MasterWebUI.scala core/src/main/scala/org/apache/spark/deploy/rest/StandaloneRestServer.scala core/src/main/scala/org/apache/spark/deploy/worker/ui/WorkerPage.scala core/src/test/scala/org/apache/spark/rpc/akka/AkkaRpcEnvSuite.scala
2 parents dbd5f73 + 184de91 commit 7bb70f1

File tree

308 files changed

+9915
-4809
lines changed

Some content is hidden

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

308 files changed

+9915
-4809
lines changed

.rat-excludes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,8 @@ local-1430917381535_2
8686
DESCRIPTION
8787
NAMESPACE
8888
test_support/*
89+
.*Rd
90+
help/*
91+
html/*
92+
INDEX
8993
.lintr

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -948,6 +948,6 @@ The following components are provided under the MIT License. See project link fo
948948
(MIT License) SLF4J LOG4J-12 Binding (org.slf4j:slf4j-log4j12:1.7.5 - http://www.slf4j.org)
949949
(MIT License) pyrolite (org.spark-project:pyrolite:2.0.1 - http://pythonhosted.org/Pyro4/)
950950
(MIT License) scopt (com.github.scopt:scopt_2.10:3.2.0 - https://github.com/scopt/scopt)
951-
(The MIT License) Mockito (org.mockito:mockito-all:1.8.5 - http://www.mockito.org)
951+
(The MIT License) Mockito (org.mockito:mockito-core:1.9.5 - http://www.mockito.org)
952952
(MIT License) jquery (https://jquery.org/license/)
953953
(MIT License) AnchorJS (https://github.com/bryanbraun/anchorjs)

R/pkg/R/DataFrame.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ setMethod("isLocal",
169169
#'}
170170
setMethod("showDF",
171171
signature(x = "DataFrame"),
172-
function(x, numRows = 20) {
173-
s <- callJMethod(x@sdf, "showString", numToInt(numRows))
172+
function(x, numRows = 20, truncate = TRUE) {
173+
s <- callJMethod(x@sdf, "showString", numToInt(numRows), truncate)
174174
cat(s)
175175
})
176176

R/pkg/R/client.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ generateSparkSubmitArgs <- function(args, sparkHome, jars, sparkSubmitOpts, pack
5757
}
5858

5959
launchBackend <- function(args, sparkHome, jars, sparkSubmitOpts, packages) {
60-
sparkSubmitBin <- determineSparkSubmitBin()
60+
sparkSubmitBinName <- determineSparkSubmitBin()
6161
if (sparkHome != "") {
6262
sparkSubmitBin <- file.path(sparkHome, "bin", sparkSubmitBinName)
6363
} else {

R/pkg/R/sparkR.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ sparkR.init <- function(
132132
sparkHome = sparkHome,
133133
jars = jars,
134134
sparkSubmitOpts = Sys.getenv("SPARKR_SUBMIT_ARGS", "sparkr-shell"),
135-
sparkPackages = sparkPackages)
135+
packages = sparkPackages)
136136
# wait atmost 100 seconds for JVM to launch
137137
wait <- 0.1
138138
for (i in 1:25) {
Binary file not shown.

R/pkg/inst/tests/jarTest.R

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
library(SparkR)
18+
19+
sc <- sparkR.init()
20+
21+
helloTest <- SparkR:::callJStatic("sparkR.test.hello",
22+
"helloWorld",
23+
"Dave")
24+
25+
basicFunction <- SparkR:::callJStatic("sparkR.test.basicFunction",
26+
"addStuff",
27+
2L,
28+
2L)
29+
30+
sparkR.stop()
31+
output <- c(helloTest, basicFunction)
32+
writeLines(output)

R/pkg/inst/tests/test_binaryFile.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ test_that("saveAsObjectFile()/objectFile() works with multiple paths", {
8282
saveAsObjectFile(rdd2, fileName2)
8383

8484
rdd <- objectFile(sc, c(fileName1, fileName2))
85-
expect_true(count(rdd) == 2)
85+
expect_equal(count(rdd), 2)
8686

8787
unlink(fileName1, recursive = TRUE)
8888
unlink(fileName2, recursive = TRUE)

R/pkg/inst/tests/test_binary_function.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ test_that("union on two RDDs", {
3838
union.rdd <- unionRDD(rdd, text.rdd)
3939
actual <- collect(union.rdd)
4040
expect_equal(actual, c(as.list(nums), mockFile))
41-
expect_true(getSerializedMode(union.rdd) == "byte")
41+
expect_equal(getSerializedMode(union.rdd), "byte")
4242

4343
rdd<- map(text.rdd, function(x) {x})
4444
union.rdd <- unionRDD(rdd, text.rdd)
4545
actual <- collect(union.rdd)
4646
expect_equal(actual, as.list(c(mockFile, mockFile)))
47-
expect_true(getSerializedMode(union.rdd) == "byte")
47+
expect_equal(getSerializedMode(union.rdd), "byte")
4848

4949
unlink(fileName)
5050
})

R/pkg/inst/tests/test_includeJAR.R

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
context("include an external JAR in SparkContext")
18+
19+
runScript <- function() {
20+
sparkHome <- Sys.getenv("SPARK_HOME")
21+
jarPath <- paste("--jars",
22+
shQuote(file.path(sparkHome, "R/lib/SparkR/test_support/sparktestjar_2.10-1.0.jar")))
23+
scriptPath <- file.path(sparkHome, "R/lib/SparkR/tests/jarTest.R")
24+
submitPath <- file.path(sparkHome, "bin/spark-submit")
25+
res <- system2(command = submitPath,
26+
args = c(jarPath, scriptPath),
27+
stdout = TRUE)
28+
tail(res, 2)
29+
}
30+
31+
test_that("sparkJars tag in SparkContext", {
32+
testOutput <- runScript()
33+
helloTest <- testOutput[1]
34+
expect_equal(helloTest, "Hello, Dave")
35+
basicFunction <- testOutput[2]
36+
expect_equal(basicFunction, "4")
37+
})

0 commit comments

Comments
 (0)