Skip to content

Instantly share code, notes, and snippets.

View tallpsmith's full-sized avatar

Paul Smith tallpsmith

  • Everest Engineering
  • Melbourne, Australia
View GitHub Profile
@tallpsmith
tallpsmith / StreamingJob.java
Created March 13, 2017 22:42
Apache Flink Batch Processing Sink behaviour
final StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
env.setStreamTimeCharacteristic(TimeCharacteristic.EventTime);
DataStream<String> streamSource = env.readTextFile("/Users/psmith/temp/au1/mel-metrics.2017-02-22");
List<InetSocketAddress> esHosts = Arrays.asList(new InetSocketAddress("127.0.0.1", 9300));
HashMap<String, String> userConfig = Maps.newHashMap();
userConfig.put("bulk.flush.max.size.mb", "1");
userConfig.put("bulk.flush.interval.ms", "5000");
userConfig.put("cluster.name", "flink");
@tallpsmith
tallpsmith / pcp.osx.build.log
Created February 25, 2017 04:20
PCP OSX build errors (under OSX on Vagrant)
checking build system type... x86_64-apple-darwin16.3.0
checking host system type... x86_64-apple-darwin16.3.0
checking target system type... x86_64-apple-darwin16.3.0
Building on x86_64-apple-darwin16.3.0 for x86_64-apple-darwin16.3.0
Build: os=darwin16.3.0 cpu=x86_64
Target: os=darwin cpu=x86_64
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for suncc... no
checking for egcc... no
@tallpsmith
tallpsmith / io.pcp.plist
Created January 31, 2017 01:37
PCP OSX LaunchCTL / LaunchD script
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>EnableGlobbing</key>
<true/>
<key>KeepAlive</key>
<false/>
<key>Label</key>
<string>io.pcp</string>
@tallpsmith
tallpsmith / brew cask doctor
Created January 30, 2017 05:45
brew cask state
==> macOS Release:
10.12.3
==> Hardware Architecture:
intel-64
==> Ruby Version:
2.0.0-p648
==> Ruby Path:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
==> Homebrew Version:
Homebrew 1.1.8
$ sudo service pcp start
Rebuilding PMNS ... Error Parsing ASCII PMNS: Cannot find definition for non-terminal node "apache" in name space
pmnsmerge: Error: pmLoadNameSpace(./12460.root): Problems parsing PMNS definitions
Rebuilding the Performance Metrics Name Space (PMNS) in /var/lib/pcp/pmns ...
Rebuild: PCP upgrade processing for "root" PMNS changes ...
Rebuild: merging the following PMNS files:
./12460.root root_linux root_mmv root_pmcd
Rebuild: pmnsmerge failed
"root" has not been changed.
failed (status=1)
@tallpsmith
tallpsmith / configure-diff.txt
Last active November 10, 2015 22:39
PCP Build Issues on OSX El Capitan
diff --git a/configure b/configure
index c1531b6..7b618c3 100755
--- a/configure
+++ b/configure
@@ -7727,9 +7727,9 @@ done
test -n "$TAR" || TAR="tar"
fi
-if test $target_os = darwin -a -x /usr/bin/gnutar
+if test $target_os = darwin -a -x /usr/bin/gtar
@tallpsmith
tallpsmith / Installer Log 14-Oct-2015.txt
Created October 13, 2015 22:15
PCP Installer log on OSX El Capitan
Oct 14 09:07:15 paul Installer[4991]: LSExceptions [0x7f867862a340] loaded
Oct 14 09:07:15 paul Installer[4991]: @(#)PROGRAM:Install PROJECT:Install-1000
Oct 14 09:07:15 paul Installer[4991]: @(#)PROGRAM:Installer PROJECT:Installer-853
Oct 14 09:07:15 paul Installer[4991]: Hardware: MacBookPro10,1 @ 2.70 GHz (x 8), 16384 MB RAM
Oct 14 09:07:15 paul Installer[4991]: Running OS Build: Mac OS X 10.11 (15A284)
Oct 14 09:07:15 paul Installer[4991]: Env: __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
Oct 14 09:07:15 paul Installer[4991]: Env: TMPDIR=/var/folders/k3/z8j62y0x73b0hs3tv1hf609h0000gn/T/
Oct 14 09:07:15 paul Installer[4991]: Env: HOME=/Users/psmith
Oct 14 09:07:15 paul Installer[4991]: Env: SHELL=/bin/bash
Oct 14 09:07:15 paul Installer[4991]: Env: SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.6Rl8PWrMm6/Listeners
@tallpsmith
tallpsmith / Command line to run
Created August 11, 2015 03:02
pmchart Failure reproducable case
pmchart -z -S@07:00 -a 20150807.0 -c ~/.pcp/pmchart/mea-activemq-failure -t2min
Process: pmchart [13806]
Path: /Applications/pmchart.app/Contents/MacOS/pmchart
Identifier: io.pcp.pmchart
Version: ???
Code Type: X86-64 (Native)
Parent Process: bash [91966]
Responsible: iTerm [90286]
User ID: 501
Date/Time: 2015-08-10 16:43:57.313 +1000
@tallpsmith
tallpsmith / Grabbing the Heap Memory from ActiveMQ using Jolokia REST
Last active August 29, 2015 14:12
Grabbing the Heap Memory from ActiveMQ using Jolokia REST
#curl --silent -XGET --user admin:admin http://localhost:8161/api/jolokia/read/java.lang:type=Memory/HeapMemoryUsage | python -m json.tool
{
"request": {
"attribute": "HeapMemoryUsage",
"mbean": "java.lang:type=Memory",
"type": "read"
},
"status": 200,
"timestamp": 1420596076,
"value": {