GitHub user jklukas opened a pull request:

    https://github.com/apache/kafka/pull/1481

    MINOR: Pass absolute directory path to RocksDB.open

    The method `RocksDB.open` assumes an absolute file path. If a relative path 
is configured, it leads to an exception like the following:
    ```
    org.apache.kafka.streams.errors.ProcessorStateException: Error opening 
store CustomerIdToUserIdLookup at location 
./tmp/rocksdb/CustomerIdToUserIdLookup
        at org.rocksdb.RocksDB.open(Native Method)
        at org.rocksdb.RocksDB.open(RocksDB.java:183)
        at 
org.apache.kafka.streams.state.internals.RocksDBStore.openDB(RocksDBStore.java:214)
        at 
org.apache.kafka.streams.state.internals.RocksDBStore.openDB(RocksDBStore.java:165)
        at 
org.apache.kafka.streams.state.internals.RocksDBStore.init(RocksDBStore.java:170)
        at 
org.apache.kafka.streams.state.internals.MeteredKeyValueStore.init(MeteredKeyValueStore.java:85)
        at 
org.apache.kafka.test.KStreamTestDriver.<init>(KStreamTestDriver.java:64)
        at 
org.apache.kafka.test.KStreamTestDriver.<init>(KStreamTestDriver.java:50)
        at 
com.simple.estuary.transform.streaming.CartesianTransactionEnrichmentJobTest.testBuilder(CartesianTransactionEnrichmentJobTest.java:41)
    ```
    
    Is there any risk to always fetching the absolute path as proposed here?
    
    Let me know if you think this requires a JIRA issue or a unit test. I 
started working on a unit test, but don't know of a great solution for writing 
out a file to a relative directory.
    
    This contribution is my original work and I license the work to the project 
under the project's open source license.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jklukas/kafka rocksdb-abspath

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/1481.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1481
    
----

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to