Skip to content

Commit 9b618fb

Browse files
harishreedharantdas
authored andcommitted
[SPARK-8483] [STREAMING] Remove commons-lang3 dependency from Flume Si…
…nk. Also bump Flume version to 1.6.0 Author: Hari Shreedharan <hshreedharan@apache.org> Closes apache#6910 from harishreedharan/remove-commons-lang3 and squashes the following commits: 9875f7d [Hari Shreedharan] Revert back to Flume 1.4.0 ca35eb0 [Hari Shreedharan] [SPARK-8483][Streaming] Remove commons-lang3 dependency from Flume Sink. Also bump Flume version to 1.6.0
1 parent 31bd306 commit 9b618fb

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

external/flume-sink/pom.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@
3535
<url>http://spark.apache.org/</url>
3636

3737
<dependencies>
38-
<dependency>
39-
<groupId>org.apache.commons</groupId>
40-
<artifactId>commons-lang3</artifactId>
41-
</dependency>
4238
<dependency>
4339
<groupId>org.apache.flume</groupId>
4440
<artifactId>flume-ng-sdk</artifactId>

external/flume-sink/src/main/scala/org/apache/spark/streaming/flume/sink/SparkAvroCallbackHandler.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
*/
1717
package org.apache.spark.streaming.flume.sink
1818

19+
import java.util.UUID
1920
import java.util.concurrent.{CountDownLatch, Executors}
2021
import java.util.concurrent.atomic.AtomicLong
2122

2223
import scala.collection.mutable
2324

2425
import org.apache.flume.Channel
25-
import org.apache.commons.lang3.RandomStringUtils
2626

2727
/**
2828
* Class that implements the SparkFlumeProtocol, that is used by the Avro Netty Server to process
@@ -53,7 +53,7 @@ private[flume] class SparkAvroCallbackHandler(val threads: Int, val channel: Cha
5353
// Since the new txn may not have the same sequence number we must guard against accidentally
5454
// committing a new transaction. To reduce the probability of that happening a random string is
5555
// prepended to the sequence number. Does not change for life of sink
56-
private val seqBase = RandomStringUtils.randomAlphanumeric(8)
56+
private val seqBase = UUID.randomUUID().toString.substring(0, 8)
5757
private val seqCounter = new AtomicLong(0)
5858

5959
// Protected by `sequenceNumberToProcessor`

0 commit comments

Comments
 (0)