Tag Archives: scala
Mocking Inner Singleton objects for Scala Tests using MockitoSugar
Mocking Inner Singleton objects for Scala Tests using MockitoSugar This is a special case of testing when you need to test a type but dependencies come in all shapes and sizes. In order to test your class, you might not have any control on the dependencies. This is specially true when your dependencies are from… Continue reading »
Flink – Interactive Scala Shell
Flink – Interactive Scala Shell Interactive scala shell is available in Flink download package. It allows us to run flink streams and batch processing statements in scala by building and executing the jobs directly created from the shell. We can simply call execute() method, which should request to run the job. The shell supports including… Continue reading »
Apache Flink – mapWithState on KeyedStream
Apache Flink – mapWithState on KeyedStream mapWithState operator provides a syntactic ease for keeping ValueState for map operations on KeyedStreams in Apache Flink. It is specially useful for doing a running count on the data. That is exactly what we are going to try in this post. Just remember that you don’t have to return… Continue reading »
Apache Flink – Collections & Streams
Apache Flink – Collections & Streams While developing a streaming application, it is often necessary to use some inputs as collections. This can be specially useful for testing purposes. In this post we are trying to discuss how we can create a DataStream from a collection. After applying some operators on the stream, we are… Continue reading »
Apache Flink – Class Not found [org/apache/flink/streaming/api/scala/DataStream]
Apache Flink – Class Not found [org/apache/flink/streaming/api/scala/DataStream] If you are developing a Flink app following examples on the web, you can most likely encounter the following error: Generally, the problem is resolved by correctly setting the source folder in a scala project in IntelliJ but the weird thing is that it is happening for a… Continue reading »
Apache Flink – Change Port for web front end
Apache Flink – Change Port for web front end Apache Flink runs the dashboard on port 8081. Since this is a common port there might be conflict with some other services running on the same machines. You might encounter this scenario especially during development when many services are running on the your development machine. But… Continue reading »
IntelliJ & Scala – Could not load main class
IntelliJ & Scala – Could not load main class This is one of the most common error we see when we get new code from a source repository. We might also see it when we create a new Scala project. As we run the application, the console shows could not load main class The solution… Continue reading »
IntelliJ – Add New Scala Class Option – Not Available
IntelliJ – Add New Scala Class Option – Not Available You might get into this problem every time a new Scala project is created. By default, the support of Scala is not available. So when you right click your src folder to add Scala Class, you might be disappointed to see no option for adding… Continue reading »
SBT 1.0 and IntelliJ IDEA Scala plugin – needs update
SBT 1.0 and IntelliJ IDEA Scala plugin – needs update I had to do a few updates to my Scala development tools, which hit me with a surprise when I tried to build one of Scala SBT applications. The build failed with misleading error messages. Digging deeper, I could find this message in one of… Continue reading »