Skip to content

Instantly share code, notes, and snippets.

View gphat's full-sized avatar

Cory G Watson gphat

View GitHub Profile
[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)
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)
418 EXPECTED:
419 {
420 "result" : [ {
421 "customer" : ["ted", "fred"],
422 "result" : 30
423 }, {
424 "customer" : ["barry"],
425 "result" : 23
426 }, {
427 "customer" : [],
@gphat
gphat / gist:fd9517bef66cbc9468cd
Created August 15, 2014 22:06
Kafka Datadog JMX Config
instances:
- host: localhost
name: kafka_instance
port: 9999 # This is the JMX port on which Kafka exposes its metrics (usually 9999)
# user: username # If JMX authentication is enabled, set the username and the password here
# password: password
# #java_bin_path: /path/to/java #Optional, should be set if the agent cannot find your java executable
# #trust_store_path: /path/to/trustStore.jks # Optional, should be set if ssl is enabled
# #trust_store_password: password
@gphat
gphat / gist:c9d22e1c0d3e0d2546d1
Created August 15, 2014 21:50
Cassandra Datadog JMX Config
instances:
- host: localhost
port: 7199
# user: username
# password: password
# name: cassandra_instance
# #trust_store_path: /path/to/trustStore.jks # Optional, should be set if ssl is enabled
# #trust_store_password: password
# #java_bin_path: /path/to/java #Optional, should be set if the agent cannot find your java executable
package emp.util
import scala.math._
/**
* Helper for pagination.
*/
object Pagination {
/**
require 'rubygems'
require 'railsless-deploy'
# Your application name
set :application, "someapp"
# We're not deploying from a repo, since this is scala and we
# need to compile. Set SCM to none
set :scm, :none
# Our deploy is to copy the contents of…
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.
=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
# 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