Skip to content

Instantly share code, notes, and snippets.

@spidaman
spidaman / zip_dict.py
Created February 16, 2013 20:46
python dictionary from a pair of lists
import json
links = ['link1', 'link2','link3']
images = ['img1','img2','img3']
json.dumps(dict(zip(links,images)))
# '{"link1": "img1", "link3": "img3", "link2": "img2"}'
@spidaman
spidaman / distcp_stacktrace.txt
Created October 3, 2013 17:27
error distcp'ing hfiles to a cluster newly enabled for short circuit reads
2013-10-03 07:22:21,724 ERROR org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:klout (auth:SIMPLE) cause:java.io.IOException: Copied: 0 Skipped: 0 Failed: 1
2013-10-03 07:22:21,725 WARN org.apache.hadoop.mapred.Child: Error running child
java.io.IOException: Copied: 0 Skipped: 0 Failed: 1
at org.apache.hadoop.tools.DistCp$CopyFilesMapper.close(DistCp.java:582)
at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:57)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:417)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:332)
at org.apache.hadoop.mapred.Child$4.run(Child.java:268)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
@spidaman
spidaman / gist:8290433
Last active January 2, 2016 10:29
scooby doo and the case of the phantom hbase regions
hbck has been emitting complaints about regions that are neither in HDFS or in .META.:
14/01/06 21:21:12 WARN util.HBaseFsck: No HDFS region dir found: { meta => null, hdfs => null, deployed => hbase3-rs12.klout,60020,1388535340339;moments_time_20131229,5000,1388306209624.bf91db8893ce885b5ac0cc472cc5e661. } meta=null
and
ERROR: No regioninfo in Meta or HDFS. { meta => null, hdfs => null, deployed => hbase3-rs12.klout,60020,1388535340339;moments_time_20131229,5000,1388306209624.bf91db8893ce885b5ac0cc472cc5e661. }
After the region server crashes last week, this was logged:
ABORTING region server hbase3-rs24.klout,60020,1386199155964: Exception refreshing OPENING; region=bf91db8893ce885b5ac0cc472cc5e661, context=post_open_deploy
Cause:
### Keybase proof
I hereby claim:
* I am spidaman on github.
* I am spidaman (https://keybase.io/spidaman) on keybase.
* I have a public key ASCZVuJEw28k_E-frx5YO-7BZQZa3fHnuCdNx6-9ggpaIAo
To claim this, I am signing this object:
@spidaman
spidaman / Texas State House 2020 Candidates.csv
Last active July 28, 2020 21:26
Texas State House 2020 Candidates
District Candidate Site Donation Link
6 Julie Gobble https://julie4texas.com/ https://secure.actblue.com/donate/julie_july2020
11 Alec Johnson https://alec4yall.com/ https://secure.actblue.com/donate/alec4yall
14 Janet Dudding https://www.janetdudding4texas.com/ https://secure.actblue.com/donate/janet-t-dudding-for-texas-1
15 Lorena Perez McGill https://www.lorenafortexas.com/ https://secure.actblue.com/donate/Lorena-for-tx
17 Madeline Eden https://edenfortexas.com/ https://secure.actblue.com/donate/madeline-eden-for-texas-house-district-17-1
20 Jessica Tiedt https://www.jessica4tx.com/ https://secure.actblue.com/donate/friends-of-jessica-tiedt-1
23 Jeff Antonelli https://jeff-2020.com/ https://secure.actblue.com/donate/jeff-2020
24 Brian Rogers https://twitter.com/brianjrogers https://secure.actblue.com/donate/brian-rogers-for-texas-state-representative-district-24-1
28 Elizabeth Markowitz https://www.eliz4tx.com/ https://secure.actblue.com/donate/eliz4tx28