Skip to content
This repository was archived by the owner on May 9, 2024. It is now read-only.

Commit a2eb3b9

Browse files
committed
Merge remote-tracking branch 'upstream/master' into topic/streaming-bp/rate-controller
2 parents 475e346 + 15724fa commit a2eb3b9

File tree

279 files changed

+7910
-5468
lines changed

Some content is hidden

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

279 files changed

+7910
-5468
lines changed

R/pkg/R/DataFrame.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1566,7 +1566,7 @@ setMethod("fillna",
15661566
#' @return a local R data.frame representing the contingency table. The first column of each row
15671567
#' will be the distinct values of `col1` and the column names will be the distinct values
15681568
#' of `col2`. The name of the first column will be `$col1_$col2`. Pairs that have no
1569-
#' occurrences will have `null` as their counts.
1569+
#' occurrences will have zero as their counts.
15701570
#'
15711571
#' @rdname statfunctions
15721572
#' @export

R/pkg/R/deserialize.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,11 @@ readList <- function(con) {
102102

103103
readRaw <- function(con) {
104104
dataLen <- readInt(con)
105-
data <- readBin(con, raw(), as.integer(dataLen), endian = "big")
105+
readBin(con, raw(), as.integer(dataLen), endian = "big")
106106
}
107107

108108
readRawLen <- function(con, dataLen) {
109-
data <- readBin(con, raw(), as.integer(dataLen), endian = "big")
109+
readBin(con, raw(), as.integer(dataLen), endian = "big")
110110
}
111111

112112
readDeserialize <- function(con) {

R/pkg/R/sparkR.R

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,13 @@ sparkR.init <- function(
104104
return(get(".sparkRjsc", envir = .sparkREnv))
105105
}
106106

107-
sparkMem <- Sys.getenv("SPARK_MEM", "1024m")
108107
jars <- suppressWarnings(normalizePath(as.character(sparkJars)))
109108

110109
# Classpath separator is ";" on Windows
111110
# URI needs four /// as from http://stackoverflow.com/a/18522792
112111
if (.Platform$OS.type == "unix") {
113-
collapseChar <- ":"
114112
uriSep <- "//"
115113
} else {
116-
collapseChar <- ";"
117114
uriSep <- "////"
118115
}
119116

R/pkg/inst/tests/test_mllib.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ test_that("glm and predict", {
3535

3636
test_that("predictions match with native glm", {
3737
training <- createDataFrame(sqlContext, iris)
38-
model <- glm(Sepal_Width ~ Sepal_Length, data = training)
38+
model <- glm(Sepal_Width ~ Sepal_Length + Species, data = training)
3939
vals <- collect(select(predict(model, training), "prediction"))
40-
rVals <- predict(glm(Sepal.Width ~ Sepal.Length, data = iris), iris)
41-
expect_true(all(abs(rVals - vals) < 1e-9), rVals - vals)
40+
rVals <- predict(glm(Sepal.Width ~ Sepal.Length + Species, data = iris), iris)
41+
expect_true(all(abs(rVals - vals) < 1e-6), rVals - vals)
4242
})

bin/pyspark

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,4 @@ fi
8282

8383
export PYSPARK_DRIVER_PYTHON
8484
export PYSPARK_DRIVER_PYTHON_OPTS
85-
exec "$SPARK_HOME"/bin/spark-submit pyspark-shell-main "$@"
85+
exec "$SPARK_HOME"/bin/spark-submit pyspark-shell-main --name "PySparkShell" "$@"

bin/pyspark2.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ set PYTHONPATH=%SPARK_HOME%\python\lib\py4j-0.8.2.1-src.zip;%PYTHONPATH%
3535
set OLD_PYTHONSTARTUP=%PYTHONSTARTUP%
3636
set PYTHONSTARTUP=%SPARK_HOME%\python\pyspark\shell.py
3737

38-
call %SPARK_HOME%\bin\spark-submit2.cmd pyspark-shell-main %*
38+
call %SPARK_HOME%\bin\spark-submit2.cmd pyspark-shell-main --name "PySparkShell" %*

conf/log4j.properties.template

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@ log4j.logger.org.spark-project.jetty=WARN
1010
log4j.logger.org.spark-project.jetty.util.component.AbstractLifeCycle=ERROR
1111
log4j.logger.org.apache.spark.repl.SparkIMain$exprTyper=INFO
1212
log4j.logger.org.apache.spark.repl.SparkILoop$SparkILoopInterpreter=INFO
13+
14+
# SPARK-9183: Settings to avoid annoying messages when looking up nonexistent UDFs in SparkSQL with Hive support
15+
log4j.logger.org.apache.hadoop.hive.metastore.RetryingHMSHandler=FATAL
16+
log4j.logger.org.apache.hadoop.hive.ql.exec.FunctionRegistry=ERROR

core/src/main/java/org/apache/spark/util/collection/unsafe/sort/UnsafeExternalSorter.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,11 @@ private long getMemoryUsage() {
150150
return sorter.getMemoryUsage() + (allocatedPages.size() * (long) PAGE_SIZE);
151151
}
152152

153+
@VisibleForTesting
154+
public int getNumberOfAllocatedPages() {
155+
return allocatedPages.size();
156+
}
157+
153158
public long freeMemory() {
154159
long memoryFreed = 0;
155160
for (MemoryBlock block : allocatedPages) {
@@ -257,7 +262,7 @@ public void insertRecord(
257262
currentPagePosition,
258263
lengthInBytes);
259264
currentPagePosition += lengthInBytes;
260-
265+
freeSpaceInCurrentPage -= totalSpaceRequired;
261266
sorter.insertRecord(recordAddress, prefix);
262267
}
263268

core/src/main/resources/org/apache/spark/log4j-defaults-repl.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@ log4j.logger.org.spark-project.jetty=WARN
1010
log4j.logger.org.spark-project.jetty.util.component.AbstractLifeCycle=ERROR
1111
log4j.logger.org.apache.spark.repl.SparkIMain$exprTyper=INFO
1212
log4j.logger.org.apache.spark.repl.SparkILoop$SparkILoopInterpreter=INFO
13+
14+
# SPARK-9183: Settings to avoid annoying messages when looking up nonexistent UDFs in SparkSQL with Hive support
15+
log4j.logger.org.apache.hadoop.hive.metastore.RetryingHMSHandler=FATAL
16+
log4j.logger.org.apache.hadoop.hive.ql.exec.FunctionRegistry=ERROR

core/src/main/resources/org/apache/spark/log4j-defaults.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@ log4j.logger.org.spark-project.jetty=WARN
1010
log4j.logger.org.spark-project.jetty.util.component.AbstractLifeCycle=ERROR
1111
log4j.logger.org.apache.spark.repl.SparkIMain$exprTyper=INFO
1212
log4j.logger.org.apache.spark.repl.SparkILoop$SparkILoopInterpreter=INFO
13+
14+
# SPARK-9183: Settings to avoid annoying messages when looking up nonexistent UDFs in SparkSQL with Hive support
15+
log4j.logger.org.apache.hadoop.hive.metastore.RetryingHMSHandler=FATAL
16+
log4j.logger.org.apache.hadoop.hive.ql.exec.FunctionRegistry=ERROR

0 commit comments

Comments
 (0)