Skip to content

Instantly share code, notes, and snippets.

View francescosimoneschi's full-sized avatar

Francesco Simoneschi francescosimoneschi

View GitHub Profile
<script type="text/javascript">
$(document).ready(function () {
if ($("table[class='zebra-striped']>thead>tr>th").length == 4) {
var client = $().domainsbot({
searchTextbox: "input[name='domain']",
parameters: { // Option parameters
"pageSize": 10, // Page size
"auth-token": "8874b228c5f1586b2efed6d3bed7ce3c" // Replace with your api token from http://developers.domainsbot.com
},
{
"field":"random_int_10",
"comparer":"=",
"value" : 9
}
hadoop jar segment-exporter.jar org.playhaven.segmentapi.hadoop.jobs.SegmentExporterCli -files SegmentExpressionWrapper.py,segment_expression.py -libjars /usr/local/hadoop/hadoop-core-1.1.2.jar,/usr/share/cassandra/apache-cassandra-1.2.6.jar,/usr/share/cassandra/lib/libthrift-0.7.0.jar,/usr/share/jython/jython.jar,/usr/share/java/guava.jar,jyson-1.0.2.jar,apache-cassandra-thrift-1.2.6.jar testjobid16 segment_api_cli devices input s3n://segment-api-export/test04/ 1000 sample_game1 https://gist.github.com/francescosimoneschi/6233638/raw/24b3ee989276471ba2575960e15040f71e28fc86/gistfile1.txt --verbose
@francescosimoneschi
francescosimoneschi / no_match
Last active December 21, 2015 04:59
No match input expression
{
"field": "wrong_random_int_10",
"comparer": "=",
"value": 9
}
cd segment-api/hadoop/segment-api-jobs
# Fetching dependency
sudo mvn dependency:copy-dependencies
sudo mvn -f pom.test.xml dependency:copy-dependencies
# Running tests (ant + jUnit)
ant test
# Build for running in Hadoop 1.X
@francescosimoneschi
francescosimoneschi / S3 hadoop configuration
Created August 28, 2013 17:07
Add the following configuration in core-site.xml [each node]:
<property>
<name>fs.s3n.awsAccessKeyId</name>
<value>[YOUR_S3_ACCESS_KEY]</value>
</property>
<property>
<name>fs.s3n.awsSecretAccessKey</name>
<value>[YOUR_S3_SECRET_KEY]</value>
</property>
@francescosimoneschi
francescosimoneschi / gist:6368536
Created August 28, 2013 17:09
Add the following configuration in mapred-site.xml [each node]:
<property>
<name>mapred.job.reuse.jvm.num.tasks</name>
<value>-1</value>
</property>
Aug 22 22:00:00 api16-north metrics[29694]: [1377205200] {"game_id": "123456", "device_id": "78910", "preload": "1", "device_token": "dd0fe6d4521239d649773b8935fb4cc62e707d25"}
Aug 22 20:00:00 api16-north metrics[29694]: [1377205200] {"game_id": "123456", "device_id": "78910", "preload": "1", "device_token": "dd0fe6d4521239d649773b8935fb4cc62e707d25"}
Aug 22 19:00:00 api16-north metrics[29694]: [1377205200] {"game_id": "123456", "device_id": "78910", "testfield": "testvalue"}
@francescosimoneschi
francescosimoneschi / Node configuration
Created August 30, 2013 17:38
[only for the master node] file: hadoop/conf/master
localhost
@francescosimoneschi
francescosimoneschi / gist:6392411
Created August 30, 2013 17:40
[only for the master node] file: hadoop/conf/slaves slave1-N are the IPs or hosts of each slave node
localhost
slave1
slave2
slaveN