Skip to content

Instantly share code, notes, and snippets.

View hsaputra's full-sized avatar

Henry Saputra hsaputra

View GitHub Profile
@hsaputra
hsaputra / gist:fdb28aa17615c46d9ee5
Created January 9, 2016 20:05
Nvidia GPU + CoreOS + TensorFlow + Docker
http://www.emergingstack.com/2016/01/10/Nvidia-GPU-plus-CoreOS-plus-Docker-plus-TensorFlow.html
@hsaputra
hsaputra / gist:00348783804c7e0b4ad5
Last active October 25, 2016 04:23
Apache Twill Flows
Apache Twill Launch Flow
====================
HelloWorld
TwillRunnerService = new YarnTwillRunnerService
YarnTwillRunnerService.start
YarnTwillRunnerService.watchLiveServices
YarnTwillRunnerService.prepare
YarnTwillPreparer.start
YarnAppClient.createLauncher -> This will be instance of ApplicationMasterProcessLauncher
@hsaputra
hsaputra / gist:b8e04baf40480db09d9f
Created September 17, 2015 17:44
YARN Container Run out Memory
22:05:18.991 [ApplicationMasterService] INFO o.a.t.i.a.ApplicationMasterService - Container container_1438037484990_0024_01_000002 completed with COMPLETE:Container [pid=17308,containerID=container_1438037484990_0024_01_000002] is running beyond physical memory limits. Current usage: 514.5 MB of 512 MB physical memory used; 1.0 GB of 2.5 GB virtual memory used. Killing container.
Dump of the process-tree for container_1438037484990_0024_01_000002 :
|- PID PPID PGRPID SESSID CMD_NAME USER_MODE_TIME(MILLIS) SYSTEM_TIME(MILLIS) VMEM_USAGE(BYTES) RSSMEM_USAGE(PAGES) FULL_CMD_LINE
|- 17324 17308 17308 17308 (java) 2906 186 1077043200 131445 /usr/lib/jvm/java/bin/java -Djava.io.tmpdir=tmp -Dyarn.container=container_1438037484990_0024_01_000002 -Dtwill.runnable=workflow.default.SparkPageRank.PageRankWorkflow.PageRankWorkflow -cp launcher.jar:/etc/hadoop/conf -Xmx359m -XX:MaxPermSize=128M -verbose:gc -Xloggc:/data/logs/hadoop-yarn/userlogs/application_1438037484990_0024/container_1438037484990_0024_01_000002/gc.lo
@hsaputra
hsaputra / gist:f3c2438196ae0fb4ab46
Created September 15, 2015 21:35
Implementation of in-memory CDAP BusineessMetadataStore
/*
* Copyright 2015 Cask Data, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@hsaputra
hsaputra / gist:79b96136af7bd3be8b6f
Last active May 16, 2018 15:34
Programming interviews resource links
http://pages.cs.wisc.edu/~shuchi/courses/787-F09/scribe-notes/lec3.pdf
https://leetcode.com/tag/dynamic-programming/
http://leetcode.com/2010/09/printing-binary-tree-in-level-order.html
http://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm
http://en.wikipedia.org/wiki/Maximum_subarray_problem
http://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle
http://www.idryman.org/blog/2013/09/22/process-small-files-on-hadoop-using-combinefileinputformat-1/
http://www.ibm.com/developerworks/library/bd-hadoopcombine/
http://www.freedomlayer.org/articles/dht_intro.html
@hsaputra
hsaputra / gist:d147ffa76c509eecf3a2
Created July 27, 2015 05:35
Find lowest common ancestor in binary tree
http://www.fusu.us/2013/06/p2-lowest-common-ancestor-in-binary-tree.html
@hsaputra
hsaputra / gist:a3a291719b1a8a7380f4
Created July 19, 2015 17:55
Nearly All Binary Searches and Mergesorts are Broken
http://googleresearch.blogspot.de/2006/06/extra-extra-read-all-about-it-nearly.html
@hsaputra
hsaputra / gist:b47a91597001ae43c4eb
Created April 16, 2015 21:46
Apache Flink YARN Session Flow
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