SAMZA-1704: Fix compatibility issues with scala 2.12
authorxiliu <xiliu@linkedin.com>
Tue, 8 May 2018 01:14:29 +0000 (18:14 -0700)
committerxiliu <xiliu@linkedin.com>
Tue, 8 May 2018 01:14:29 +0000 (18:14 -0700)
Need to add override keyword for overriding a method in scala 2.12.

Author: xiliu <xiliu@linkedin.com>

Reviewers: Prateek M <prateekm@apache.org>

Closes #508 from xinyuiscool/SAMZA-1704

samza-kv-rocksdb/src/main/scala/org/apache/samza/storage/kv/RocksDbKeyValueStore.scala
samza-kv/src/main/scala/org/apache/samza/storage/kv/AccessLoggedStore.scala

index 06fb584..e0ee576 100644 (file)
@@ -204,7 +204,7 @@ class RocksDbKeyValueStore(
     new RocksDbIterator(iter)
   }
 
-  def iterate(from: Array[Byte], to: Array[Byte]): KeyValueIterable[Array[Byte], Array[Byte]] = {
+  override def iterate(from: Array[Byte], to: Array[Byte]): KeyValueIterable[Array[Byte], Array[Byte]] = {
     //snapshot the iterator
     val snapshotIter : RocksDbRangeIterator = range(from, to).asInstanceOf[RocksDbRangeIterator]
     new KeyValueIterable[Array[Byte], Array[Byte]] {
index 67fd011..f6fca15 100644 (file)
@@ -92,7 +92,7 @@ class AccessLoggedStore[K, V](
     store.all()
   }
 
-  def iterate(from: K, to: K): KeyValueIterable[K, V] = {
+  override def iterate(from: K, to: K): KeyValueIterable[K, V] = {
     val list : util.ArrayList[K] = new util.ArrayList[K]()
     list.add(from)
     list.add(to)