Skip to content

Instantly share code, notes, and snippets.

💭
The mess cannot go into the program, it piles up around the programmer.

Sam Pullara spullara

💭
The mess cannot go into the program, it piles up around the programmer.
Block or report user

Report or block spullara

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 gist:266951
private static float search(final HTablePool pool, byte[] woeid, Position pos, Set<Integer> container, float smallestArea) throws IOException, JAXBException {
final HTable placesTable = getTable(PLACES);
Get get = new Get(woeid);
get.addFamily(CHILDREN);
Result children = placesTable.get(get);
searchCounter.getAndIncrement();
try {
NavigableMap<byte[], byte[]> map = children.getFamilyMap(CHILDREN);
ExecutorCompletionService<Result> service = new ExecutorCompletionService<Result>(es);
if (map != null) {
View gist:268178
Exception in thread "main" java.lang.IndexOutOfBoundsException: toIndex = 16557
at java.util.SubList.<init>(AbstractList.java:602)
at java.util.RandomAccessSubList.<init>(AbstractList.java:758)
at java.util.AbstractList.subList(AbstractList.java:468)
at org.apache.hadoop.hbase.client.HTable.flushCommits(HTable.java:607)
at com.sampullara.geoplanet.Loader.main(Loader.java:181)
View gist:269779
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>TwitterFirehose</groupId>
<artifactId>TwitterFirehose</artifactId>
<version>0.1.0</version>
View gist:274437
package com.sampullara.survivor;
import java.security.SecureRandom;
import java.util.Random;
public class Simulator {
public static void main(String[] args) {
Random r = new SecureRandom();
double[] correct = new double[] {
.9525,
View gist:277566
strikeweek-dm:src samp$ findstr TcpNoDelay "*.java"
./core/org/apache/hadoop/ipc/Client.java:74: private boolean tcpNoDelay; // if T then disable Nagle's Algorithm
./core/org/apache/hadoop/ipc/Client.java:302: this.socket.setTcpNoDelay(tcpNoDelay);
./core/org/apache/hadoop/ipc/Client.java:632: this.tcpNoDelay = conf.getBoolean("ipc.client.tcpnodelay", false);
./core/org/apache/hadoop/ipc/Server.java:161: private final boolean tcpNoDelay; // if T then disable Nagle's Algorithm
./core/org/apache/hadoop/ipc/Server.java:395: channel.socket().setTcpNoDelay(tcpNoDelay);
./core/org/apache/hadoop/ipc/Server.java:1030: this.tcpNoDelay = conf.getBoolean("ipc.server.tcpnodelay", false);
./hdfs/org/apache/hadoop/hdfs/server/datanode/DataXceiver.java:222: " tcp no delay " + s.getTcpNoDelay());
./hdfs/org/apache/hadoop/hdfs/server/datanode/DataXceiverServer.java:131: s.setTcpNoDelay(true);
View gist:277569
findstr TcpNoDelay "*.java"
./java/org/apache/hadoop/hbase/ipc/HBaseClient.java:80: protected boolean tcpNoDelay; // if T then disable Nagle's Algorithm
./java/org/apache/hadoop/hbase/ipc/HBaseClient.java:305: this.socket.setTcpNoDelay(tcpNoDelay);
./java/org/apache/hadoop/hbase/ipc/HBaseClient.java:641: this.tcpNoDelay = conf.getBoolean("hbase.ipc.client.tcpnodelay", false);
./java/org/apache/hadoop/hbase/ipc/HBaseServer.java:148: protected final boolean tcpNoDelay; // if T then disable Nagle's Algorithm
./java/org/apache/hadoop/hbase/ipc/HBaseServer.java:394: channel.socket().setTcpNoDelay(tcpNoDelay);
./java/org/apache/hadoop/hbase/ipc/HBaseServer.java:1002: this.tcpNoDelay = conf.getBoolean("ipc.server.tcpnodelay", false);
View gist:279092
wasted 20
perception 14
init 7
attack 13
save 18
attack 9
attack 11
perception 5
stealth 4
nature 5
View gist:279581
2010-01-17 12:49:21,360 INFO org.apache.hadoop.hbase.master.ServerManager: 1 region servers, 0 dead, average load 186.0
2010-01-17 12:49:34,684 INFO org.apache.hadoop.hbase.master.BaseScanner: RegionManager.metaScanner scanning meta region {server: 192.168.1.90:49911, regionname: .META.,,1, startKey: <>}
2010-01-17 12:50:09,787 DEBUG org.apache.hadoop.hbase.io.hflile.LruBlockCache: Cache Stats: Sizes: Total=337.31558MB (353701032), Free=70.209404MB (73619896), Max=407.525MB (427320928), Counts: Blocks=5371, Access=72657480, Hit=70039180, Miss=2618300, Evictions=10, Evicted=6502, Ratios: Hit Ratio=96.39638662338257%, Miss Ratio=3.6036208271980286%, Evicted/Run=650.2000122070312
2010-01-17 12:50:09,805 INFO org.apache.hadoop.hbase.master.BaseScanner: RegionManager.rootScanner scanning meta region {server: 192.168.1.90:49911, regionname: -ROOT-,,0, startKey: <>}
2010-01-17 12:50:09,794 WARN org.apache.zookeeper.ClientCnxn: Exception closing session 0x12614ad1d240006 to sun.nio.ch.SelectionKeyImpl@78f9eeae
java.i
View gist:279762
2010-01-17 19:40:42,559 INFO org.apache.hadoop.hbase.regionserver.HRegionServer: Scanner -2613918457692636110 lease expired
2010-01-17 19:40:58,417 ERROR org.apache.hadoop.hbase.regionserver.HRegionServer:
org.apache.hadoop.hbase.UnknownScannerException: Name: -2613918457692636110
at org.apache.hadoop.hbase.regionserver.HRegionServer.next(HRegionServer.java:1877)
at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.hbase.ipc.HBaseRPC$Server.call(HBaseRPC.java:652)
at org.apache.hadoop.hbase.ipc.HBaseServer$Handler.run(HBaseServer.java:915)
2010-01-17 19:40:58,424 INFO org.apache.hadoop.ipc.HBaseServer: IPC Server handler 20 on 49847, call next(-2613918457692636110, 1) from 192.168.1.90:49560: error: org.apache.hadoop.hbase.UnknownScannerException: Name: -2613918457692636110
View gist:283255
If you are testing this web application on a local network, the network
speeds will be so fast you won’t ever see the progress indicator. If you
are using Mac OS X, you can slow all incoming web traffic by typing a
couple of ipfw commands at the terminal. For example, these com-
mands will slow all web traffic to 4 kilobytes per second:
sudo ipfw pipe 1 config bw 4KByte/s
sudo ipfw add 100 pipe 1 tcp from any to me 80
If you are using the Safari desktop browser to view the pages, you’ll need
to use your Mac’s hostname or external IP address in the URL (for ex-
ample, mymac.local rather than localhost). When you’re done testing,
You can’t perform that action at this time.