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) |
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
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
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
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
flink-0.9-SNAPSHOT/bin ./yarn-session.sh -n 4 -tm 1024 -jm 1024 -s 5 | |
14:26:49,187 WARN org.apache.hadoop.util.NativeCodeLoader - Unable to load native-hadoop library for your platform... using builtin-java classes where applicable | |
14:26:49,346 INFO org.apache.hadoop.yarn.client.RMProxy - Connecting to ResourceManager at /0.0.0.0:8032 | |
14:26:49,370 INFO org.apache.flink.yarn.FlinkYarnClient - Using values: | |
14:26:49,371 INFO org.apache.flink.yarn.FlinkYarnClient - TaskManager count = 4 | |
14:26:49,372 INFO org.apache.flink.yarn.FlinkYarnClient - JobManager memory = 1024 | |
14:26:49,372 INFO org.apache.flink.yarn.FlinkYarnClient - TaskManager memory = 1024 | |
14:26:49,715 INFO org.apache.flink.yarn.Utils - Copying from file:/Users/henrysaputra/flink-installs/flink-0.9-SNAPSHOT/lib/flink-dist-0.9-SNAPSHOT.jar to hdfs://localhost:9000/user/h |
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
http://googleresearch.blogspot.de/2006/06/extra-extra-read-all-about-it-nearly.html |
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
http://www.fusu.us/2013/06/p2-lowest-common-ancestor-in-binary-tree.html |
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
http://www.freedomlayer.org/articles/dht_intro.html |
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
http://www.idryman.org/blog/2013/09/22/process-small-files-on-hadoop-using-combinefileinputformat-1/ | |
http://www.ibm.com/developerworks/library/bd-hadoopcombine/ |
OlderNewer