Skip to content

Commit

Permalink
[LIVY-587] Remove unused guava dependency
Browse files Browse the repository at this point in the history
## What changes were proposed in this pull request?

Guava was unused any more, and it's too heavy to include, so remove the guava dependency.

## How was this patch tested?

Existing unit tests.

Author: runzhiwang <[email protected]>

Closes apache#181 from runzhiwang/livy-587.
  • Loading branch information
runzhiwang authored and jerryshao committed Jul 29, 2019
1 parent 92062e1 commit 1ce266d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 15 deletions.
7 changes: 0 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
<spark.version>${spark.scala-2.11.version}</spark.version>
<hive.version>3.0.0</hive.version>
<commons-codec.version>1.9</commons-codec.version>
<guava.version>15.0</guava.version>
<httpclient.version>4.5.3</httpclient.version>
<httpcore.version>4.4.4</httpcore.version>
<jackson.version>2.9.9</jackson.version>
Expand Down Expand Up @@ -283,12 +282,6 @@
<version>${commons-codec.version}</version>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>

<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-core</artifactId>
Expand Down
5 changes: 0 additions & 5 deletions server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,6 @@
<artifactId>jackson-module-scala_${scala.binary.version}</artifactId>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>

<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import scala.concurrent.duration.{Duration, FiniteDuration}
import scala.util.{Random, Try}

import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import com.google.common.annotations.VisibleForTesting
import org.apache.hadoop.fs.Path
import org.apache.spark.launcher.SparkLauncher

Expand Down Expand Up @@ -155,7 +154,6 @@ object InteractiveSession extends Logging {
mockApp)
}

@VisibleForTesting
private[interactive] def prepareBuilderProp(
conf: Map[String, String],
kind: Kind,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package org.apache.livy.utils

import java.io.InputStream
import java.util
import java.util.concurrent.locks.ReentrantLock

import scala.io.Source
Expand All @@ -26,9 +27,16 @@ import com.google.common.collect.EvictingQueue

import org.apache.livy.Logging

class CircularQueue[T](var capacity: Int) extends util.LinkedList[T] {
override def add(t: T): Boolean = {
if (size >= capacity) removeFirst
super.add(t)
}
}

class LineBufferedStream(inputStream: InputStream, logSize: Int) extends Logging {

private[this] val _lines: EvictingQueue[String] = EvictingQueue.create[String](logSize)
private[this] val _lines: CircularQueue[String] = new CircularQueue[String](logSize)

private[this] val _lock = new ReentrantLock()
private[this] val _condition = _lock.newCondition()
Expand Down

0 comments on commit 1ce266d

Please sign in to comment.