Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem running RocksDB and JNI on Mac with M1 chip #18

Open
sami-badawi opened this issue May 5, 2022 · 4 comments
Open

Problem running RocksDB and JNI on Mac with M1 chip #18

sami-badawi opened this issue May 5, 2022 · 4 comments

Comments

@sami-badawi
Copy link

flink4s did not work directly on a Mac with a M1 chip. The problem is with RocksDB and JNI.
You can run it in Docker.

I made this change to get it running directly:
src/test/scala/com.ariskk.flink4s/FlinkExecutor.scala

    val useRock = false
    val backend =
      if (useRock)
        new RocksDBStateBackend(s"file:///tmp/flink-${Random.nextString(10)}")
      else
        new HashMapStateBackend()
    env.setStateBackend(backend)

Maybe there could be a way to configure for this?

@ariskk
Copy link
Owner

ariskk commented May 5, 2022

Hey @sami-badawi !
This is a JVM issue. This has been fixed in RocksDB's latest version but it is likely that Flink isn't yet using it.
I fixed this issue in the past by installing sdkman and then sdk install java 11.0.13.fx-zulu.
If you make sure 11.0.13.fx-zulu is the default JVM it should work around this issue.

I would be a bit hesitant to NOT use RocksDB in flink4s's testing suite as all production deployments use RocksDB and thus bugs might creep in. Maybe you can contribute a section in flink4s' README detailing your workaround?

@sami-badawi
Copy link
Author

I have tried this, but it is not available for Mac with M1:

sdk install java 11.0.13.fx-zulu

Stop! java 11.0.13.fx-zulu is not available. Possible causes:
 * 11.0.13.fx-zulu is an invalid version
 * java binaries are incompatible with your platform

@ariskk
Copy link
Owner

ariskk commented May 9, 2022

Hey @sami-badawi
Unfortunately I don't have an M1 anymore to reproduce.
I solved the issue using:

@MartijnVisser
Copy link

I think this problem should now be resolved in Flink 1.17, given that the RocksDB version that Flink uses has been updated to add support for M1s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants