[SPARK-8483] [STREAMING] Remove commons-lang3 dependency from Flume Sink
Author: Hari Shreedharan <hshreedharan@apache.org> Closes #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
This commit is contained in:
parent
d0943afbcf
commit
9294796750
4
external/flume-sink/pom.xml
vendored
4
external/flume-sink/pom.xml
vendored
|
@ -35,10 +35,6 @@
|
|||
<url>http://spark.apache.org/</url>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.flume</groupId>
|
||||
<artifactId>flume-ng-sdk</artifactId>
|
||||
|
|
|
@ -16,13 +16,13 @@
|
|||
*/
|
||||
package org.apache.spark.streaming.flume.sink
|
||||
|
||||
import java.util.UUID
|
||||
import java.util.concurrent.{CountDownLatch, Executors}
|
||||
import java.util.concurrent.atomic.AtomicLong
|
||||
|
||||
import scala.collection.mutable
|
||||
|
||||
import org.apache.flume.Channel
|
||||
import org.apache.commons.lang3.RandomStringUtils
|
||||
|
||||
/**
|
||||
* 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
|
|||
// Since the new txn may not have the same sequence number we must guard against accidentally
|
||||
// committing a new transaction. To reduce the probability of that happening a random string is
|
||||
// prepended to the sequence number. Does not change for life of sink
|
||||
private val seqBase = RandomStringUtils.randomAlphanumeric(8)
|
||||
private val seqBase = UUID.randomUUID().toString.substring(0, 8)
|
||||
private val seqCounter = new AtomicLong(0)
|
||||
|
||||
// Protected by `sequenceNumberToProcessor`
|
||||
|
|
Loading…
Reference in a new issue