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.util.Comparator; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.TreeSet; | |
public class t { | |
static public void main(String[] args) { | |
HashMap<String, Integer> hm = new HashMap<String, Integer>(); | |
hm.put("answer", 42); |
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
From 07d1425781f08799ff9ef59f9cd578fa63a2e83f Mon Sep 17 00:00:00 2001 | |
From: Benoit Sigoure <[email protected]> | |
Date: Sun, 21 Nov 2010 20:42:20 -0800 | |
Subject: [PATCH] Don't shutdown while RPCs are waiting for a -ROOT- lookup. | |
The following scenario led to data loss: | |
1. Application starts. | |
2. A PutRequest is generated, triggers a -ROOT- lookup. | |
3. Application calls shutdown() on the HBaseClient, the client | |
terminates and the PutRequest is lost. |
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
From fd1d76efba48269aaec80e90f629f01ba4581fed Mon Sep 17 00:00:00 2001 | |
From: Benoit Sigoure <[email protected]> | |
Date: Tue, 18 Jan 2011 00:21:20 -0800 | |
Subject: [PATCH] Add support for CDHb3. | |
This change adds support for CDHb3. In order to enable the new code, | |
the JVM must be given the following system property in argument: | |
-Dorg.hbase.async.cdhb3 | |
CDHb3 includes a temporary patch that changes the format of the "hello" |
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
From 7a538914c93f8a92b9c80e5c533e73d97e8423c8 Mon Sep 17 00:00:00 2001 | |
From: Benoit Sigoure <[email protected]> | |
Date: Thu, 27 Jan 2011 17:33:37 -0800 | |
Subject: [PATCH] Add support for HBase 0.90. | |
In order to enable the new code, the JVM must be given the following | |
system property in argument: | |
-Dorg.hbase.async.v0.90 | |
For HBASE-3174, revision r1029115 (or 08e64aae in Git) changed the |
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/bin/python | |
import httplib | |
import json | |
import os | |
import shutil | |
import time | |
def purge_tsd_cache(): | |
for dir in (dir for dir in os.listdir("/tmp/tsd") if dir[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
diff --git a/src/core/TsdbQuery.java b/src/core/TsdbQuery.java | |
index 2edd53c..8776e89 100644 | |
--- a/src/core/TsdbQuery.java | |
+++ b/src/core/TsdbQuery.java | |
@@ -401,7 +401,8 @@ final class TsdbQuery implements Query { | |
// but this doesn't really matter. | |
// Additionally, in case our sample_interval is large, we need to look | |
// even further before/after, so use that too. | |
- return getStartTime() - Const.MAX_TIMESPAN * 2 - sample_interval; | |
+ final long t = getStartTime() - Const.MAX_TIMESPAN * 2 - sample_interval; |
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/bin/env python | |
import socket | |
import subprocess | |
import sys | |
import time | |
COLLECTION_INTERVAL = 15 # seconds |
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/bin/perl -w | |
# | |
# The contents of this file are subject to the Mozilla Public | |
# License Version 1.1 (the "License"); you may not use this file | |
# except in compliance with the License. You may obtain a copy of | |
# the License at http://www.mozilla.org/MPL/ | |
# | |
# Software distributed under the License is distributed on an "AS | |
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or | |
# implied. See the License for the specific language governing |
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
/*./re2/prog.h:100*/ 0x0000000000411f0b <+523>: mov 0x50(%rbx),%rdi # rdi = visited_ | |
/*./re2/prog.h:100*/ 0x0000000000411f0f <+527>: add $0x1,%edx # edx = text_.size() + 1 | |
/*re2/bitstate.cc:97*/ 0x0000000000411f12 <+530>: imul %esi,%edx # esi = id, edx = id * (text_.size() + 1) | |
/*re2/bitstate.cc:97*/ 0x0000000000411f15 <+533>: add %r14d,%edx # r14d = p, edx = id * (text_.size() + 1) + p | |
/*re2/bitstate.cc:97*/ 0x0000000000411f18 <+536>: sub %eax,%edx # eax = text_.begin(), edx = n | |
/*re2/bitstate.cc:98*/ 0x0000000000411f1a <+538>: mov %edx,%eax # eax = n | |
/*re2/bitstate.cc:98*/ 0x0000000000411f1c <+540>: mov %edx,%ecx # ecx = n | |
/*re2/bitstate.cc:98*/ 0x0000000000411f1e <+542>: shr $0x5,%eax # eax = n >> 5 = n / VisitedBits | |
/*re2/bitstate.cc:98*/ 0x0000000000411f21 <+545>: and $0x1f,%ecx # ecx = n & (VisitedBits - 1) | |
/*re2/bitstate.cc:98*/ 0x0000000000411f24 <+548>: mov |
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/bin/python | |
# Copyright (c) 2011 StumbleUpon, Inc. All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# - Redistributions of source code must retain the above copyright notice, | |
# this list of conditions and the following disclaimer. | |
# - Redistributions in binary form must reproduce the above copyright notice, | |
# this list of conditions and the following disclaimer in the documentation | |
# and/or other materials provided with the distribution. |
OlderNewer