@@ -21,7 +21,7 @@ import com.expedia.www.haystack.trace.commons.clients.cassandra.{CassandraCluste
2121import com .expedia .www .haystack .trace .commons .clients .es .document .TraceIndexDoc
2222import com .expedia .www .haystack .trace .commons .config .entities .{CassandraConfiguration , WhitelistIndexFieldConfiguration }
2323import com .expedia .www .haystack .trace .reader .config .entities .{ElasticSearchConfiguration , ServiceMetadataReadConfiguration }
24- import com .expedia .www .haystack .trace .reader .metrics .{ AppMetricNames , MetricsSupport }
24+ import com .expedia .www .haystack .trace .reader .metrics .MetricsSupport
2525import com .expedia .www .haystack .trace .reader .stores .readers .ServiceMetadataReader
2626import com .expedia .www .haystack .trace .reader .stores .readers .cassandra .CassandraTraceReader
2727import com .expedia .www .haystack .trace .reader .stores .readers .es .ElasticSearchReader
@@ -32,7 +32,6 @@ import org.slf4j.LoggerFactory
3232
3333import scala .collection .JavaConverters ._
3434import scala .concurrent .{ExecutionContextExecutor , Future }
35- import scala .util .{Failure , Success , Try }
3635
3736class CassandraEsTraceStore (cassandraConfig : CassandraConfiguration ,
3837 serviceMetadataConfig : ServiceMetadataReadConfiguration ,
@@ -82,7 +81,7 @@ class CassandraEsTraceStore(cassandraConfig: CassandraConfiguration,
8281 .asScala
8382 .map(source => extractTraceIdFromSource(source))
8483 .filter(! _.isEmpty)
85- .toSet[String ] // de-dup traceIds
84+ .toSet[String ] // de-dup traceIds
8685 .toList
8786
8887 cassandraReader.readRawTraces(traceIds)
@@ -132,11 +131,6 @@ class CassandraEsTraceStore(cassandraConfig: CassandraConfiguration,
132131 cassandraReader.readRawTraces(request.getTraceIdList.asScala.toList)
133132 }
134133
135- // convert all Futures to Try to make sure they all complete
136- private def liftToTry [T ](futures : Seq [Future [T ]]): Seq [Future [Try [T ]]] = futures.map { f =>
137- f.map(Try (_)).recover { case t : Throwable => Failure (t) }
138- }
139-
140134 override def close (): Unit = {
141135 cassandraReader.close()
142136 esReader.close()
0 commit comments