This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.apache.flink.api.common.state.ValueStateDescriptor | |
| import org.apache.flink.api.common.typeinfo.TypeInformation | |
| import org.apache.flink.api.common.typeutils.TypeSerializer | |
| import org.apache.flink.streaming.api.functions.co.{CoMapFunction, RichCoMapFunction} | |
| import org.apache.flink.streaming.api.scala.{ConnectedStreams, DataStream} | |
| import org.apache.flink.streaming.api.scala._ | |
| case class M1(key: String, foo: String) | |
| case class M2(key: String, bar: String) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| trait TypeInfo { | |
| implicit val fooTypeInfo = TypeInformation.of(classOf[Foo]) | |
| implicit val barTypeInfo = TypeInformation.of(classOf[Bar]) | |
| implicit val bazTypeInfo = TypeInformation.of(classOf[Baz]) | |
| } | |
| object TypeInfo extends TypeInfo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| case class Foo(b: Bar) | |
| object Foo { | |
| implicit val typeInfo = TypeInformation.of(classOf[Foo]) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| implicit val typeInfo = TypeInformation.of(classOf[Foo]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| implicit def createTypeInformation[T]: TypeInformation[T] = macro TypeUtils.createTypeInfo[T] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Check java version | |
| JAVA_VER=$(java -version 2>&1 | sed 's/java version "\(.*\)\.\(.*\)\..*"/\1\2/; 1q') | |
| if [ "$JAVA_VER" -lt 18 ] | |
| then | |
| # Figure out how many versions of Java and javac we currently have | |
| NR_OF_JRE_OPTIONS=$(echo 0 | alternatives --config java 2>/dev/null | grep 'There ' | awk '{print $3}' | tail -1) | |
| NR_OF_SDK_OPTIONS=$(echo 0 | alternatives --config javac 2>/dev/null | grep 'There ' | awk '{print $3}' | tail -1) | |
| # Silent install javac (includes jre) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Building an ES image on AWS: | |
| Provision an amazon-linux instance through the console with a 8gb root drive and a 80+gb ebs data drive | |
| A) update | |
| sudo yum update | |
| B) mount a data volume | |
| lsblk # find volume tag assuming it is /dev/xvdb | |
| #check if data |