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
Apache Flink Execution Messages (local) | |
======================== | |
Executing WordCount example with built-in default data. | |
Provide parameters to read input data from a file. | |
Usage: WordCount <text path> <result path> | |
16:46:47,454 INFO org.apache.flink.api.java.ExecutionEnvironment - The job has 0 registered types and 0 default Kryo serializers | |
16:46:48,042 INFO akka.event.slf4j.Slf4jLogger - Slf4jLogger started | |
16:46:48,060 INFO org.apache.flink.runtime.blob.BlobServer - Created BLOB server storage directory /var/folders/nv/nsr_3ysj0wgfq93fqp0rdt3w0000gp/T/blobStore-e2b96f68-ebdd-450a-b385-759f70f1b33e | |
16:46:48,061 INFO org.apache.flink.runtime.blob.BlobServer - Started BLOB server at 0.0.0.0:58364 - max concurrent requests: 50 - max backlog: 1000 |
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
Apache Flink Job Flow from client API to JobGraph | |
https://cwiki.apache.org/confluence/display/FLINK/Data+exchange+between+tasks | |
============================================= | |
WordCount | |
ExecutionEnvironment#getExecutionEnvironment | |
ExecutionEnvironment#readTextFile => DataSet<String> | |
DataSet#flatMap(FlatMapFunction) => FlatMapOperator<T, R> | |
… |
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
public static String[] getAllLists(String[] elements, int lengthOfList) | |
{ | |
//initialize our returned list with the number of elements calculated above | |
String[] allLists = new String[(int)Math.pow(elements.length, lengthOfList)]; | |
//lists of length 1 are just the original elements | |
if (lengthOfList == 1) { | |
return elements; | |
} | |
else { |
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
public class Node { | |
public Node next; | |
public Object data; | |
} | |
public static void reverseList ( Node head) { | |
if (head == null || head.next == null) { | |
return; | |
} |
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
def lookup(base: String, found: Map[String, String]): String = { | |
var resolved = base | |
val pattern = Pattern.compile("(\\$\\{([^{}]*)\\})") | |
val matcher = pattern.matcher(base) | |
while (matcher.find()) { | |
val a = matcher.group(2) | |
if (!found.containsKey(a)) { | |
val b = lookup("foundone", found) | |
found.put(a, b) | |
print("Found " + b) |
NewerOlder