linkedin / flashback

mock the internet
BSD 2-Clause "Simplified" License
578 stars 54 forks source link

flashback compilation failed, step 2 start flashback admin server #23

Closed xljiadahao closed 7 years ago

xljiadahao commented 7 years ago

Encounter issue at step 2 start flashback admin server, compile and build failed. Error Msg: flashback/flashback-core-impl/src/main/java/com/linkedin/flashback/matchrules/CompositeMatchRule.java:44: error: illegal start of expression flashback/flashback-core-impl/src/main/java/com/linkedin/flashback/matchrules/CompositeMatchRule.java:44: error: illegal start of expression _matchRules.stream().forEach((rule) -> { and so forth.

screen shot 2017-07-10 at 10 40 38 pm
sf1152 commented 7 years ago

Which JVM version are you using? The version we are using is JAVA8.

xljiadahao commented 7 years ago

Great, all right, it seems that flashback supports Java 8+ only. As many of us might not know the environment prerequisite, I recommend to add the information in the README file. For example, download JDK8+, _export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home_, then start flashback admin server.

For better leverage of the project, we might have more questions on it. One idea from me, can we add something like FQA for the frequent questions. Actually, I do have more questions on it as well.

  1. Start the proxy with record mode or playback mode, we have to indicate the sceneName; for each scene, I need to restart and record the scene. If I have tons of scenes, for each scene, do we have to restart the proxy for record and playback? If yes, it can be improved to some extent. Ideally, we can start the proxy once and record/playback the scenes as many as we want.
  2. It looks like once we have the scene for the certain name, if we record the scene again, it cannot be getting overwritten. Can we make it optional to overwrite the current scene?

Just some ideas from my side, hope it helps. Or I might contribute some with PRs for the improvements.

Close the issue for now. Thanks a lot for help.

sf1152 commented 7 years ago
  1. Yes, you can record/replay as many scenes as you want without restart the proxy. You can invoke changeScene method in admin or setScene in FlashbackRunner to switch to different scenes.
  2. Depends on the matchRule you set. Even in record mode, it will first run match rule to check if this request is already existed. If so, it will overwritten. Otherwise add a new one. Feel free to add more information in readme. That would be very helpful.