Skip to content

Commit fe8a1cd

Browse files
maji2014tdas
authored andcommitted
[SPARK-4295][External]Fix exception in SparkSinkSuite
Handle exception in SparkSinkSuite, please refer to [SPARK-4295] Author: maji2014 <[email protected]> Closes #3177 from maji2014/spark-4295 and squashes the following commits: 312620a [maji2014] change a new statement for spark-4295 24c3d21 [maji2014] add log4j.properties for SparkSinkSuite and spark-4295 c807bf6 [maji2014] Fix exception in SparkSinkSuite (cherry picked from commit f8811a5) Signed-off-by: Tathagata Das <[email protected]>
1 parent e9d009d commit fe8a1cd

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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+
18+
# Set everything to be logged to the file streaming/target/unit-tests.log
19+
log4j.rootCategory=INFO, file
20+
# log4j.appender.file=org.apache.log4j.FileAppender
21+
log4j.appender.file=org.apache.log4j.FileAppender
22+
log4j.appender.file.append=false
23+
log4j.appender.file.file=target/unit-tests.log
24+
log4j.appender.file.layout=org.apache.log4j.PatternLayout
25+
log4j.appender.file.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss.SSS} %t %p %c{1}: %m%n
26+
27+
# Ignore messages below warning level from Jetty, because it's a bit verbose
28+
log4j.logger.org.eclipse.jetty=WARN
29+

external/flume-sink/src/test/scala/org/apache/spark/streaming/flume/sink/SparkSinkSuite.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ class SparkSinkSuite extends FunSuite {
159159
channelContext.put("transactionCapacity", 1000.toString)
160160
channelContext.put("keep-alive", 0.toString)
161161
channelContext.putAll(overrides)
162+
channel.setName(scala.util.Random.nextString(10))
162163
channel.configure(channelContext)
163164

164165
val sink = new SparkSink()

0 commit comments

Comments
 (0)