This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
import java.net.*; | |
import java.util.*; | |
import java.util.concurrent.*; | |
import java.lang.reflect.*; | |
import java.nio.ByteBuffer; | |
import org.jboss.netty.bootstrap.*; | |
import org.jboss.netty.channel.*; | |
import org.jboss.netty.channel.socket.nio.*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# TransparentHugePage/ libhugetlbfs Benchmark Test | |
# with... | |
# Intel(R) Xeon(R) CPU X3430 @ 2.40GHz | |
# 8Gmem | |
# THP: enable | |
# HUGETLBFS: disable | |
$ echo "always" >/sys/kernel/mm/redhat_transparent_hugepage/enabled | |
$ echo "0"> /proc/sys/vm/nr_hugepages | |
$ gcc -O2 a.c; ./a.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <event.h> | |
#include <evhttp.h> | |
#include <pthread.h> | |
#include <errno.h> | |
#include <string.h> | |
#include <fcntl.h> | |
#include <sys/socket.h> | |
#include <sys/types.h> | |
#include <netinet/in.h> | |
#include <iostream> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.kzk9; | |
import java.io.IOException; | |
import java.util.StringTokenizer; | |
import org.apache.hadoop.util.GenericOptionsParser; | |
import org.apache.hadoop.conf.Configuration; | |
import org.apache.hadoop.fs.Path; | |
import org.apache.hadoop.io.IntWritable; | |
import org.apache.hadoop.io.LongWritable; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
import java.util.*; | |
import org.apache.hadoop.conf.*; | |
import org.apache.hadoop.fs.*; | |
import org.apache.hadoop.hbase.*; | |
import org.apache.hadoop.hbase.client.*; | |
import org.apache.hadoop.hbase.util.*; | |
public class Test { | |
public static void main(String[] args) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
日本Hadoopユーザー会は、第4回目のカンファレンス「Hadoop Conference | |
Japan 2013 Winter」を1月21日に東京ビッグサイトにて開催します。 | |
> http://hcj2013w.eventbrite.com/ | |
オリジナル開発者 Doug Cuttingからのメッセージ、LINE, Treasure Data, | |
Amazon Elastic MapReduce等のキーノートを始め、Apache Hadoopに関す | |
る技術や事例を一同に集め、多くの方が出会える場として企画を進めています。 | |
早くも席が埋まり始めているので、なるべくお早めにご登録下さい。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/lib/fluent/ruby/bin/ruby | |
ENV["FLUENT_CONF"]="/etc/td-agent/td-agent.conf" | |
ENV["FLUENT_PLUGIN"]="/etc/td-agent/plugin" | |
ENV["FLUENT_SOCKET"]="/var/run/td-agent/td-agent.sock" | |
# Please add these lines | |
ENV["GEM_HOME"]="/usr/lib/fluent/ruby/lib/ruby/gems/1.9.1/" | |
ENV["GEM_PATH"]="/usr/lib/fluent/ruby/lib/ruby/gems/1.9.1/" | |
load "/usr/lib/fluent/ruby/bin/fluentd" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ gem install fluent-plugin-mongo | |
Fetching: bson-1.7.0.gem (100%) | |
Fetching: mongo-1.7.0.gem (100%) | |
Fetching: fluent-plugin-mongo-0.6.7.gem (100%) | |
Successfully installed bson-1.7.0 | |
Successfully installed mongo-1.7.0 | |
Successfully installed fluent-plugin-mongo-0.6.7 | |
3 gems installed | |
Installing ri documentation for bson-1.7.0... | |
Installing ri documentation for mongo-1.7.0... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module UnicornWorkerKiller | |
def self.kill_self(logger, start_time) | |
alive_sec = (Time.now - start_time).to_i | |
i = 0 | |
while true | |
i += 1 | |
sig = :TERM | |
if i > 10 # TODO configurable TERM MAX | |
sig = :QUIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ bundle exec je ./script/rails s |
NewerOlder