Skip to content

Instantly share code, notes, and snippets.

View gphat's full-sized avatar

Cory G Watson gphat

View GitHub Profile
418 EXPECTED:
419 {
420 "result" : [ {
421 "customer" : ["ted", "fred"],
422 "result" : 30
423 }, {
424 "customer" : ["barry"],
425 "result" : 23
426 }, {
427 "customer" : [],
java.lang.OutOfMemoryError: Direct buffer memory
at java.nio.Bits.reserveMemory(Bits.java:658)
at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:123)
at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:306)
at sun.nio.ch.Util.getTemporaryDirectBuffer(Util.java:174)
at sun.nio.ch.IOUtil.write(IOUtil.java:58)
at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:205)
at kafka.message.ByteBufferMessageSet.writeTo(ByteBufferMessageSet.scala:132)
at kafka.log.FileMessageSet.append(FileMessageSet.scala:210)
at kafka.log.LogSegment.append(LogSegment.scala:80)
[2014-09-12 12:11:37,700] ERROR [KafkaApi-1] Error processing ProducerRequest with correlation id 2919718 from client kafka-python on partition [migration,2] (kafka.server.KafkaApis)
java.lang.OutOfMemoryError: Direct buffer memory
at java.nio.Bits.reserveMemory(Bits.java:658)
at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:123)
at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:306)
at sun.nio.ch.Util.getTemporaryDirectBuffer(Util.java:174)
at sun.nio.ch.IOUtil.write(IOUtil.java:58)
at sun.nio.ch.FileChannelImpl.write(FileChannelImpl.java:205)
at kafka.message.ByteBufferMessageSet.writeTo(ByteBufferMessageSet.scala:132)
at kafka.log.FileMessageSet.append(FileMessageSet.scala:210)
package Foo;
use strict;
use warnings;
sub new {
my $class = shift;
my $self = {};
$self->{"name"} = undef;
@gphat
gphat / kafka.pl
Created January 12, 2011 15:37 — forked from jshirley/kafka.pl
package Kafka::Client;
use Moose;
use Digest::CRC qw(crc32);
use IO::Socket;
my $PRODUCE_REQUEST_ID = 0;
has 'host' => (
is => 'ro',
my $verifier = Data::Verifier->new(
profile => {
email => {
post_check => sub {
my $r = shift;
my $status = $r->get_value('status');
if(defined($status) && $status eq 'Publish now') {
return 0 unless defined($r->get_value('not_before_date_str');
}
return 1;
gphat@Corys-iMac ~/src/storm-starter (master) $ storm jar storm-starter-0.0.1-SNAPSHOT.jar storm.starter.WordCountTopology asshole.txt
Running: export STORM_JAR=storm-starter-0.0.1-SNAPSHOT.jar; java -client -Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib -cp /Users/gphat/src/storm/storm-0.5.4-SNAPSHOT.jar:/Users/gphat/src/storm/lib/clj-time-0.3.0.jar:/Users/gphat/src/storm/lib/clojure-1.2.0.jar:/Users/gphat/src/storm/lib/clojure-contrib-1.2.0.jar:/Users/gphat/src/storm/lib/clout-0.4.1.jar:/Users/gphat/src/storm/lib/commons-cli-1.2.jar:/Users/gphat/src/storm/lib/commons-codec-1.3.jar:/Users/gphat/src/storm/lib/commons-el-1.0.jar:/Users/gphat/src/storm/lib/commons-exec-1.1.jar:/Users/gphat/src/storm/lib/commons-fileupload-1.2.1.jar:/Users/gphat/src/storm/lib/commons-httpclient-3.0.1.jar:/Users/gphat/src/storm/lib/commons-io-1.4.jar:/Users/gphat/src/storm/lib/commons-lang-2.4.jar:/Users/gphat/src/storm/lib/commons-logging-1.0.4.jar:/Users/gphat/src/storm/lib/commons-logging-api-1.0.4.jar:/Users/gph
# Storm Multi-Language Support
## The ShellBolt
Support for multiple languages is implemented via the ShellBolt class. This
class implements the IBolt interfaces and contains the facilities for
executing a script or program via the shell using Java's ProcessBuilder class.
## The Wrapper Class
=pod
=head1 Taming Search with Data::SearchEngine
Sooner or later it's going to happen: Someone will request a feature of your
application's search code. It might be gentle at first. A casual remark about
speed, functionality or scalability will meander into your bug tracker,
standup meeting or planning session. At first you will nod and file it away,
knowing that it takes a few requests for something to really stick. Pretty
soon a second, perhaps unrelated, request will arrive. Before you know it you'll
I got into management for two reasons:
1. Money
2. To make the place _I_ wanted to work.
I'm so full of myself that I think the place that I want to work is the place that you want to work. I bet I'm right.
I'd like to outline my guide for making a good development shop. We'll cover all of these topics:
* How to find a good job.