This file contains hidden or 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
require 'rubygems' | |
require 'avro' | |
require 'wukong' | |
Time.class_eval do | |
def self.epoch_microseconds | |
(Time.now.to_i * 1_000_000) | |
end | |
end |
This file contains hidden or 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 GMLParser | |
class Graph < Struct.new( | |
:nodes, | |
:edges | |
) | |
def edge_list | |
self.edges.map{|e| [e[:source], e[:target], e[:value]]} | |
end |
This file contains hidden or 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/bin/env ruby | |
require 'java' | |
hector_lib = File.join(ENV['HOME'], "Programming/hector/releases/hector-0.7.0-18") | |
hector_target = File.join(ENV['HOME'], "Programming/hector/target") | |
Dir["#{hector_target}/*.jar", "#{hector_lib}/*.jar"].each{|jar| $CLASSPATH << jar} | |
java_import 'me.prettyprint.cassandra.serializers.StringSerializer' | |
java_import 'me.prettyprint.hector.api.Cluster' | |
java_import 'me.prettyprint.hector.api.Keyspace' |
This file contains hidden or 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-10-22 17:58:56,590 WARN transport: [Poundcakes] Transport response handler timed out, action [discovery/zen/fd/masterPing], node [[Spider-Slayer][62863483-6ad6-4531-b3bf-75a34ecd0e96][inet[/10.204.153.212:9300]]] | |
2010-10-22 18:00:32,544 WARN transport: [Poundcakes] Transport response handler timed out, action [discovery/zen/fd/masterPing], node [[Spider-Slayer][62863483-6ad6-4531-b3bf-75a34ecd0e96][inet[/10.204.153.212:9300]]] | |
2010-10-22 18:00:32,544 WARN transport: [Poundcakes] Transport response handler timed out, action [discovery/zen/fd/masterPing], node [[Spider-Slayer][62863483-6ad6-4531-b3bf-75a34ecd0e96][inet[/10.204.153.212:9300]]] |
This file contains hidden or 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.IOException; | |
import java.io.UnsupportedEncodingException; | |
import java.math.BigInteger; | |
import java.net.URI; | |
import java.net.URISyntaxException; | |
import java.util.ArrayList; | |
import java.util.Iterator; | |
import java.util.LinkedList; | |
import java.util.List; |
This file contains hidden or 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
java.lang.RuntimeException: java.io.IOException: Invalid localDeleteTime read: 0 | |
at org.apache.cassandra.db.BinaryVerbHandler.doVerb(BinaryVerbHandler.java:54) | |
at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:50) | |
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) | |
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) | |
at java.lang.Thread.run(Thread.java:619) | |
Caused by: java.io.IOException: Invalid localDeleteTime read: 0 | |
at org.apache.cassandra.db.SuperColumnSerializer.deserialize(SuperColumn.java:346) | |
at org.apache.cassandra.db.SuperColumnSerializer.deserialize(SuperColumn.java:298) | |
at org.apache.cassandra.db.ColumnFamilySerializer.deserializeColumns(ColumnFamilySerializer.java:125) |
This file contains hidden or 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
java.lang.ClassCastException: org.apache.cassandra.db.Column cannot be cast to org.apache.cassandra.db.SuperColumn | |
at org.apache.cassandra.db.SuperColumnSerializer.serialize(SuperColumn.java:318) | |
at org.apache.cassandra.db.SuperColumnSerializer.serialize(SuperColumn.java:298) | |
at org.apache.cassandra.db.ColumnFamilySerializer.serializeForSSTable(ColumnFamilySerializer.java:82) | |
at org.apache.cassandra.db.ColumnFamilySerializer.serialize(ColumnFamilySerializer.java:68) | |
at org.apache.cassandra.db.RowMutationSerializer.freezeTheMaps(RowMutation.java:344) | |
at org.apache.cassandra.db.RowMutationSerializer.serialize(RowMutation.java:355) | |
at org.apache.cassandra.db.RowMutationSerializer.serialize(RowMutation.java:333) | |
at org.apache.cassandra.db.RowMutation.makeRowMutationMessage(RowMutation.java:215) | |
at org.apache.cassandra.db.MemtableMessenger.createSuperMessage(MemtableMessenger.java:100) |
This file contains hidden or 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 DataChunkToHFiles extends Configured implements Tool { | |
public static class TextToKeyValues extends Mapper<LongWritable, Text, ImmutableBytesWritable, KeyValue> { | |
private byte[] columnFamily; | |
private byte[] tableName; | |
private int keyField; | |
private String[] fieldNames; | |
@Override | |
protected void setup(Context context) throws IOException, InterruptedException { |
This file contains hidden or 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
$: hbase org.jruby.Main ../hbase-0.89.20100924/bin/loadtable.rb JacobsMawfuckingTable /tmp/hbase_test/out | |
11/01/18 02:43:21 WARN hbase.HBaseConfiguration: instantiating HBaseConfiguration() is deprecated. Please use HBaseConfiguration#create() to construct a plain Configuration | |
11/01/18 02:43:22 INFO loadtable: Found 1 hfiles | |
11/01/18 02:43:22 INFO loadtable: 0 read firstkey of 100000031 from hdfs://ip-10-98-71-63.ec2.internal/tmp/hbase_test/out/Magnificent/6133023688808851821 | |
11/01/18 02:43:22 INFO zookeeper.ZooKeeperWrapper: Reconnecting to zookeeper | |
11/01/18 02:43:22 INFO zookeeper.ZooKeeper: Client environment:zookeeper.version=3.3.1-942149, built on 05/07/2010 17:14 GMT | |
11/01/18 02:43:22 INFO zookeeper.ZooKeeper: Client environment:host.name=ip-10-98-71-63.ec2.internal | |
11/01/18 02:43:22 INFO zookeeper.ZooKeeper: Client environment:java.version=1.6.0_22 |
This file contains hidden or 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 org.apache.hadoop.hbase.mapreduce; | |
import java.io.ByteArrayOutputStream; | |
import java.io.DataOutputStream; | |
import java.io.IOException; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.Iterator; | |
import java.util.TreeSet; |