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
/* | |
sedue.arc0 | |
sedue.system.indexes | |
sedue.arc1 | |
{ _id: ObjId(4bffe5311422d029a79f7208), filename: "myfile", length: 2165584, chunkSize: 262144, uploadDate: new Date(1275061553566), md5: "801879daffc1edcb96bd3e11a038ffd7" } | |
file found | |
nChunks: 9 | |
Success write | |
*/ |
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
// | |
// 2010/11/06 Kazuki Ohta <[email protected]> | |
// Single-Threaded HTTPServer using evhttp | |
// | |
#include <event.h> | |
#include <evhttp.h> | |
#include <unistd.h> | |
namespace servers { |
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
import org.msgpack.MessagePack; | |
import org.msgpack.annotation.MessagePackMessage; | |
public class Main { | |
@MessagePackMessage | |
public static class MyClass { | |
public String str; | |
} | |
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
import java.io.DataInput; | |
import java.io.DataOutput; | |
import java.io.IOException; | |
import org.apache.hadoop.io.BytesWritable; | |
import org.apache.hadoop.io.WritableComparable; | |
import org.msgpack.MessagePack; | |
public class MessagePackWritable<C> implements WritableComparable<MessagePackWritable<C>> { |
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.DataInputStream; | |
import java.io.DataOutputStream; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
public class Main { | |
public static class MyClass { | |
public String s; | |
public int v; |
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
class ExistingClass implements MessagePackTemplateProvider { | |
// no serialization is needed; | |
Logger LOG; | |
string internal_data; | |
// data | |
int a; | |
int b; | |
string c; | |
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
public class MyWritable implements Writable { | |
// Some data | |
private int counter; | |
private long timestamp; | |
public void write(DataOutput out) throws IOException { | |
out.writeInt(counter); | |
out.writeLong(timestamp); | |
} | |
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
public class MyWritableComparable implements WritableComparable<MyWritableComparable> { | |
// Some data | |
private int counter; | |
private long timestamp; | |
public void write(DataOutput out) throws IOException { | |
out.writeInt(counter); | |
out.writeLong(timestamp); | |
} | |