Skip to content

Instantly share code, notes, and snippets.

Justin Mason jmason

Block or report user

Report or block jmason

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View PrestoCompatibleOrcOutputFormat.java
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Writable;
import org.apache.hadoop.mapreduce.RecordWriter;
import org.apache.hadoop.mapreduce.TaskAttemptContext;
import org.apache.orc.CompressionCodec;
import org.apache.orc.OrcFile;
import org.apache.orc.OrcProto;
View pcalc
#!/usr/bin/perl
#
# pcalc -- simple perl calculator for desktop arithmetic.
use strict;
use bytes;
if (@ARGV > 0 && $ARGV[0] eq '--filter') {
shift;
while (<>) {
View final_bug_test_pushes.txt
mysql> select * from push_message_campaigns where game_id = 2511 and push_message_campaigns.name like 'Final Bug%'\G
*************************** 1. row ***************************
id: )x;LGe
slug: 0329783b-c54c-47c0-9007-65c3a10fb987
game_id: 2511
name: Final Bug Test
description: NULL
scheduled_time: NULL
global_schedule: 1
platform: gcm
View final_bug_test_pushes.txt
mysql> select * from push_message_campaigns where game_id = 2511 and push_message_campaigns.name like 'Final Bug%'\G
*************************** 1. row ***************************
id: )x;LGe
slug: 0329783b-c54c-47c0-9007-65c3a10fb987
game_id: 2511
name: Final Bug Test
description: NULL
scheduled_time: NULL
global_schedule: 1
platform: gcm
View Objects-with-biggest-retained-size.txt
Objects with biggest retained size
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------+
| Name
View Object-explorer.txt
Object explorer
+-----------------------------------------+-----------------+----------------+
| Name | Retained Size | Shallow Size |
+-----------------------------------------+-----------------+----------------+
| +---java.util.HashMap$Entry[4096] | 1,218,540,248 | 16,400 |
| | | | |
| +---[2258] java.util.HashMap$Entry | 31,915,400 | 32 |
| | | | |
| +---[1784] java.util.HashMap$Entry | 24,597,960 | 32 |
View mk_byapp_zerosession_report
#!/usr/bin/perl
open (IN, "<output_lines_prod_apps.csv") or die;
while (<IN>) {
($appid,$d,$n) = split(/,/);
$outputlines{$appid} = $n;
}
open (IN, "<zero_sessions_prod_apps.csv") or die;
while (<IN>) {
($appid,$d,$n) = split(/,/);
View zerosession-percentage-for-all-prod-apps.txt
099.64 appid: 01689 zerosessions: 5559 ok: 20 ratio%: 99.64
098.69 appid: 00430 zerosessions: 362539 ok: 4822 ratio%: 98.69
098.27 appid: 02231 zerosessions: 5352 ok: 94 ratio%: 98.27
094.15 appid: 02178 zerosessions: 575823 ok: 35765 ratio%: 94.15
086.89 appid: 01453 zerosessions: 1126791 ok: 170019 ratio%: 86.89
079.53 appid: 02175 zerosessions: 166962 ok: 42971 ratio%: 79.53
073.31 appid: 01701 zerosessions: 10499 ok: 3822 ratio%: 73.31
066.28 appid: 01193 zerosessions: 1993 ok: 1014 ratio%: 66.28
064.95 appid: 00598 zerosessions: 58620 ok: 31636 ratio%: 64.95
057.63 appid: 01120 zerosessions: 194591 ok: 143046 ratio%: 57.63
View zero_sessions_for_all_apps.csv
1001 2015-04-08 00:00:00 0.0
1002 2015-04-08 00:00:00 1.0
1003 2015-04-08 00:00:00 203.0
1004 2015-04-08 00:00:00 0.0
1005 2015-04-08 00:00:00 1.0
1006 2015-04-08 00:00:00 3061.0
1007 2015-04-08 00:00:00 145.0
1008 2015-04-08 00:00:00 313.0
1009 2015-04-08 00:00:00 19.0
1010 2015-04-08 00:00:00 0.0
View output_lines_for_all_apps.csv
1001 2015-04-08 00:00:00 1498.0
1002 2015-04-08 00:00:00 5187.0
1003 2015-04-08 00:00:00 70554.0
1004 2015-04-08 00:00:00 843.0
1005 2015-04-08 00:00:00 2820.0
1006 2015-04-08 00:00:00 543791.0
1007 2015-04-08 00:00:00 148321.0
1008 2015-04-08 00:00:00 465087.0
1009 2015-04-08 00:00:00 10206.0
1010 2015-04-08 00:00:00 3631.0
You can’t perform that action at this time.