Repository: samza Updated Branches: refs/heads/master 32d2af5dd -> e3efdf5c8
Fix compile errors with scala 2.12 and update release notes to use check all Author: Bharath Kumarasubramanian <[email protected]> Reviewers: Xinyu Liu <[email protected]> Closes #378 from bharathkk/master Project: http://git-wip-us.apache.org/repos/asf/samza/repo Commit: http://git-wip-us.apache.org/repos/asf/samza/commit/e3efdf5c Tree: http://git-wip-us.apache.org/repos/asf/samza/tree/e3efdf5c Diff: http://git-wip-us.apache.org/repos/asf/samza/diff/e3efdf5c Branch: refs/heads/master Commit: e3efdf5c872cda681d5d012046524b9992ffda91 Parents: 32d2af5 Author: Bharath Kumarasubramanian <[email protected]> Authored: Mon Dec 4 17:11:03 2017 -0800 Committer: xiliu <[email protected]> Committed: Mon Dec 4 17:11:03 2017 -0800 ---------------------------------------------------------------------- RELEASE.md | 4 ++-- .../apache/samza/storage/kv/RocksDbKeyValueStore.scala | 12 ++++++------ .../org/apache/samza/storage/kv/AccessLoggedStore.scala | 4 ++-- .../apache/samza/storage/kv/KeyValueStorageEngine.scala | 4 ++-- .../scala/org/apache/samza/storage/kv/LoggedStore.scala | 4 ++-- .../apache/samza/storage/kv/NullSafeKeyValueStore.scala | 4 ++-- .../samza/storage/kv/SerializedKeyValueStore.scala | 4 ++-- 7 files changed, 18 insertions(+), 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/samza/blob/e3efdf5c/RELEASE.md ---------------------------------------------------------------------- diff --git a/RELEASE.md b/RELEASE.md index 2f38c8d..cb83594 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -30,9 +30,9 @@ And before you proceed, do the following steps: * change the samza-test versions in samza-test/src/main/config/join/README to $VERSION w/o the suffix '-SNAPSHOT'. * push the changes to the $VERSION branch -Validate that all Samza source files have proper license information in their header. +Validate Samza using all our supported build matrix. - ./gradlew check + ./bin/check-all.sh To release to a local Maven repository: http://git-wip-us.apache.org/repos/asf/samza/blob/e3efdf5c/samza-kv-rocksdb/src/main/scala/org/apache/samza/storage/kv/RocksDbKeyValueStore.scala ---------------------------------------------------------------------- diff --git a/samza-kv-rocksdb/src/main/scala/org/apache/samza/storage/kv/RocksDbKeyValueStore.scala b/samza-kv-rocksdb/src/main/scala/org/apache/samza/storage/kv/RocksDbKeyValueStore.scala index 2ae4bb0..6aad45f 100644 --- a/samza-kv-rocksdb/src/main/scala/org/apache/samza/storage/kv/RocksDbKeyValueStore.scala +++ b/samza-kv-rocksdb/src/main/scala/org/apache/samza/storage/kv/RocksDbKeyValueStore.scala @@ -122,7 +122,7 @@ class RocksDbKeyValueStore( found } - def getAll(keys: java.util.List[Array[Byte]]): java.util.Map[Array[Byte], Array[Byte]] = ifOpen { + override def getAll(keys: java.util.List[Array[Byte]]): java.util.Map[Array[Byte], Array[Byte]] = ifOpen { metrics.getAlls.inc require(keys != null, "Null keys not allowed.") val map = db.multiGet(keys) @@ -251,10 +251,10 @@ class RocksDbKeyValueStore( new Entry(key, value) } - // By virtue of how RocksdbIterator is implemented, the implementation of - // our iterator is slightly different from standard java iterator next will - // always point to the current element, when next is called, we return the - // current element we are pointing to and advance the iterator to the next + // By virtue of how RocksdbIterator is implemented, the implementation of + // our iterator is slightly different from standard java iterator next will + // always point to the current element, when next is called, we return the + // current element we are pointing to and advance the iterator to the next // location (The new location may or may not be valid - this will surface // when the next next() call is made, the isValid will fail) override def next(): Entry[Array[Byte], Array[Byte]] = ifOpen { @@ -280,7 +280,7 @@ class RocksDbKeyValueStore( } class RocksDbRangeIterator(iter: RocksIterator, from: Array[Byte], to: Array[Byte]) extends RocksDbIterator(iter) { - // RocksDB's JNI interface does not expose getters/setters that allow the + // RocksDB's JNI interface does not expose getters/setters that allow the // comparator to be pluggable, and the default is lexicographic, so it's // safe to just force lexicographic comparator here for now. val comparator: LexicographicComparator = lexicographic http://git-wip-us.apache.org/repos/asf/samza/blob/e3efdf5c/samza-kv/src/main/scala/org/apache/samza/storage/kv/AccessLoggedStore.scala ---------------------------------------------------------------------- diff --git a/samza-kv/src/main/scala/org/apache/samza/storage/kv/AccessLoggedStore.scala b/samza-kv/src/main/scala/org/apache/samza/storage/kv/AccessLoggedStore.scala index c21c9a6..879a144 100644 --- a/samza-kv/src/main/scala/org/apache/samza/storage/kv/AccessLoggedStore.scala +++ b/samza-kv/src/main/scala/org/apache/samza/storage/kv/AccessLoggedStore.scala @@ -56,7 +56,7 @@ class AccessLoggedStore[K, V]( logAccess(DBOperation.READ, list, store.get(key)) } - def getAll(keys: util.List[K]): util.Map[K, V] = { + override def getAll(keys: util.List[K]): util.Map[K, V] = { logAccess(DBOperation.READ, serializeKeys(keys), store.getAll(keys)) } @@ -76,7 +76,7 @@ class AccessLoggedStore[K, V]( logAccess(DBOperation.DELETE, list, store.delete(key)) } - def deleteAll(keys: util.List[K]): Unit = { + override def deleteAll(keys: util.List[K]): Unit = { logAccess(DBOperation.DELETE, serializeKeys(keys), store.deleteAll(keys)) } http://git-wip-us.apache.org/repos/asf/samza/blob/e3efdf5c/samza-kv/src/main/scala/org/apache/samza/storage/kv/KeyValueStorageEngine.scala ---------------------------------------------------------------------- diff --git a/samza-kv/src/main/scala/org/apache/samza/storage/kv/KeyValueStorageEngine.scala b/samza-kv/src/main/scala/org/apache/samza/storage/kv/KeyValueStorageEngine.scala index 8385c4a..646b606 100644 --- a/samza-kv/src/main/scala/org/apache/samza/storage/kv/KeyValueStorageEngine.scala +++ b/samza-kv/src/main/scala/org/apache/samza/storage/kv/KeyValueStorageEngine.scala @@ -51,7 +51,7 @@ class KeyValueStorageEngine[K, V]( } } - def getAll(keys: java.util.List[K]): java.util.Map[K, V] = { + override def getAll(keys: java.util.List[K]): java.util.Map[K, V] = { metrics.gets.inc(keys.size) wrapperStore.getAll(keys) } @@ -75,7 +75,7 @@ class KeyValueStorageEngine[K, V]( } } - def deleteAll(keys: java.util.List[K]) = { + override def deleteAll(keys: java.util.List[K]) = { metrics.deletes.inc(keys.size) wrapperStore.deleteAll(keys) } http://git-wip-us.apache.org/repos/asf/samza/blob/e3efdf5c/samza-kv/src/main/scala/org/apache/samza/storage/kv/LoggedStore.scala ---------------------------------------------------------------------- diff --git a/samza-kv/src/main/scala/org/apache/samza/storage/kv/LoggedStore.scala b/samza-kv/src/main/scala/org/apache/samza/storage/kv/LoggedStore.scala index 33ff41b..e0c7a31 100644 --- a/samza-kv/src/main/scala/org/apache/samza/storage/kv/LoggedStore.scala +++ b/samza-kv/src/main/scala/org/apache/samza/storage/kv/LoggedStore.scala @@ -41,7 +41,7 @@ class LoggedStore[K, V]( store.get(key) } - def getAll(keys: java.util.List[K]): java.util.Map[K, V] = { + override def getAll(keys: java.util.List[K]): java.util.Map[K, V] = { metrics.gets.inc(keys.size) store.getAll(keys) } @@ -90,7 +90,7 @@ class LoggedStore[K, V]( /** * Perform the local deletes and log them out to the changelog */ - def deleteAll(keys: java.util.List[K]) = { + override def deleteAll(keys: java.util.List[K]) = { metrics.deletes.inc(keys.size) val keysIterator = keys.iterator while (keysIterator.hasNext) { http://git-wip-us.apache.org/repos/asf/samza/blob/e3efdf5c/samza-kv/src/main/scala/org/apache/samza/storage/kv/NullSafeKeyValueStore.scala ---------------------------------------------------------------------- diff --git a/samza-kv/src/main/scala/org/apache/samza/storage/kv/NullSafeKeyValueStore.scala b/samza-kv/src/main/scala/org/apache/samza/storage/kv/NullSafeKeyValueStore.scala index 9e67fc8..3cc35d3 100644 --- a/samza-kv/src/main/scala/org/apache/samza/storage/kv/NullSafeKeyValueStore.scala +++ b/samza-kv/src/main/scala/org/apache/samza/storage/kv/NullSafeKeyValueStore.scala @@ -37,7 +37,7 @@ class NullSafeKeyValueStore[K, V](store: KeyValueStore[K, V]) extends KeyValueSt store.get(key) } - def getAll(keys: java.util.List[K]): java.util.Map[K, V] = { + override def getAll(keys: java.util.List[K]): java.util.Map[K, V] = { notNull(keys, NullKeysErrorMessage) keys.asScala.foreach(key => notNull(key, NullKeyErrorMessage)) store.getAll(keys) @@ -62,7 +62,7 @@ class NullSafeKeyValueStore[K, V](store: KeyValueStore[K, V]) extends KeyValueSt store.delete(key) } - def deleteAll(keys: java.util.List[K]) = { + override def deleteAll(keys: java.util.List[K]) = { notNull(keys, NullKeysErrorMessage) keys.asScala.foreach(key => notNull(key, NullKeyErrorMessage)) store.deleteAll(keys) http://git-wip-us.apache.org/repos/asf/samza/blob/e3efdf5c/samza-kv/src/main/scala/org/apache/samza/storage/kv/SerializedKeyValueStore.scala ---------------------------------------------------------------------- diff --git a/samza-kv/src/main/scala/org/apache/samza/storage/kv/SerializedKeyValueStore.scala b/samza-kv/src/main/scala/org/apache/samza/storage/kv/SerializedKeyValueStore.scala index c8939b7..16dd980 100644 --- a/samza-kv/src/main/scala/org/apache/samza/storage/kv/SerializedKeyValueStore.scala +++ b/samza-kv/src/main/scala/org/apache/samza/storage/kv/SerializedKeyValueStore.scala @@ -38,7 +38,7 @@ class SerializedKeyValueStore[K, V]( fromBytesOrNull(found, msgSerde) } - def getAll(keys: java.util.List[K]): java.util.Map[K, V] = { + override def getAll(keys: java.util.List[K]): java.util.Map[K, V] = { metrics.gets.inc(keys.size) val mapBytes = store.getAll(serializeKeys(keys)) if (mapBytes != null) { @@ -80,7 +80,7 @@ class SerializedKeyValueStore[K, V]( store.delete(keyBytes) } - def deleteAll(keys: java.util.List[K]) = { + override def deleteAll(keys: java.util.List[K]) = { metrics.deletes.inc(keys.size) store.deleteAll(serializeKeys(keys)) }
