> On Nov. 20, 2015, 6:53 a.m., Yi Pan (Data Infrastructure) wrote: > > samza-kv-rocksdb/src/test/scala/org/apache/samza/storage/kv/TestRocksDbKeyValueStore.scala, > > line 84 > > <https://reviews.apache.org/r/40525/diff/1/?file=1133805#file1133805line84> > > > > To make sure that it is flush() that write to the disk, not close(), > > you may want to keep this db open and open another db in read-only mode to > > verify that the read-only db sees the data. > > Tao Feng wrote: > I dont think Samza-RocksDB supports read-only open mode. I directly use > RocksDB interface here to do the verification. Let me know if it is not a > good practice here. > > Yi Pan (Data Infrastructure) wrote: > Check RocksDbKeyValueReader.java. It has implemented the way to open a > RocksDb instance with read-only options.
RocksDbKeyValueReader also uses RocksDB interface. We don't have a "read-only" mode for our stores. Also, access mode in RocksDb is not a DBOption. It is a separate API itself - RocksDB.openReadOnly(options, dbpath) I guess what Tao has done looks good! - Navina ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/40525/#review107320 ----------------------------------------------------------- On Nov. 20, 2015, 8:20 a.m., Tao Feng wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/40525/ > ----------------------------------------------------------- > > (Updated Nov. 20, 2015, 8:20 a.m.) > > > Review request for samza. > > > Repository: samza > > > Description > ------- > > 1. implement RocksDB flush method; > 2. RocksDB flushOptions waitForFlush set to true; > 3. unit test > > Diff-2: Update per Yi and Navina's comments for unit test: open a read only > RocksDB to verify the data > > > Diffs > ----- > > > samza-kv-rocksdb/src/main/scala/org/apache/samza/storage/kv/RocksDbKeyValueStorageEngineFactory.scala > b949793a63951576937fa848bd674ec68f6f9727 > > samza-kv-rocksdb/src/main/scala/org/apache/samza/storage/kv/RocksDbKeyValueStore.scala > 4620037f2a0da43149a754aa808d3d5d280ea893 > > samza-kv-rocksdb/src/test/scala/org/apache/samza/storage/kv/TestRocksDbKeyValueStore.scala > a428a16bc1e9ab4980a6f17db4fd810057d31136 > > Diff: https://reviews.apache.org/r/40525/diff/ > > > Testing > ------- > > 1. ./gradlew clean build > 2. ./gradlew checkstyleMain checkstyleTest > > > Thanks, > > Tao Feng > >