Skip to content

Instantly share code, notes, and snippets.

View DikangGu's full-sized avatar

Dikang Gu DikangGu

  • Facebook
  • Bay Area.
View GitHub Profile
@DikangGu
DikangGu / MockHTable.java
Created November 28, 2011 06:29 — forked from agaoglu/MockHTable.java
MockHTable
/**
* This file is licensed to you under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Originally:
https://gist.github.com/7565976a89d5da1511ce
Hi Donald (and Martin),
Thanks for pinging me; it's nice to know Typesafe is keeping tabs on this, and I
appreciate the tone. This is a Yegge-long response, but given that you and
Martin are the two people best-situated to do anything about this, I'd rather
err on the side of giving you too much to think about. I realize I'm being very
critical of something in which you've invested a great deal (both financially
compacted_sstables throughput
18 1.300161MB/s.
1 1.673542MB/s.
21 1.264322MB/s.
1 1.723846MB/s.
1 1.628569MB/s.
27 1.278439MB/s.
5 1.373708MB/s.
16 0.814752MB/s.
41 1.238643MB/s.
-rw-r--r-- 1 cassandra cassandra 0 Apr 12 00:49 /data/cassandra/data/keyspace/cf-1a5f0e03e20036ffb4280ba8d31334fb/xxx-ka-1063412-CompressionInfo.db
-rw-r--r-- 1 cassandra cassandra 2.7M Apr 12 00:49 /data/cassandra/data/keyspace/cf-1a5f0e03e20036ffb4280ba8d31334fb/xxx-ka-1063412-Data.db
-rw-r--r-- 1 cassandra cassandra 0 Apr 12 00:49 /data/cassandra/data/keyspace/cf-1a5f0e03e20036ffb4280ba8d31334fb/xxx-ka-1063412-Digest.sha1
-rw-r--r-- 1 cassandra cassandra 52K Apr 12 00:49 /data/cassandra/data/keyspace/cf-1a5f0e03e20036ffb4280ba8d31334fb/xxx-ka-1063412-Filter.db
-rw-r--r-- 1 cassandra cassandra 1.8M Apr 12 00:49 /data/cassandra/data/keyspace/cf-1a5f0e03e20036ffb4280ba8d31334fb/xxx-1063412-Index.db
-rw-r--r-- 1 cassandra cassandra 11K Apr 12 00:49 /data/cassandra/data/keyspace/cf-1a5f0e03e20036ffb4280ba8d31334fb/xxx-1063412-Statistics.db
-rw-r--r-- 1 cassandra cassandra 0 Apr 12 00:49 /data/cassandra/data/keyspace/cf-1a5f0e03e20036ffb4280ba8d31334fb/xxx-1063412-TOC.txt
2016-07-12_05:14:54.57376 INFO 05:14:54 [SharedPool-Worker-3]: InetAddress /2401:db00:21:10ba:face:0:3b:0 is now UP [70/4529]
2016-07-12_05:14:54.57377 INFO 05:14:54 [SharedPool-Worker-5]: InetAddress /2401:db00:21:10b4:face:0:1f:0 is now UP
2016-07-12_05:14:55.07273 INFO 05:14:55 [GossipTasks:1]: InetAddress /2401:db00:2111:900d:face:0:21:0 is now DOWN
2016-07-12_05:14:55.07274 INFO 05:14:55 [GossipTasks:1]: InetAddress /2401:db00:2011:50c6:face:0:7:0 is now DOWN
2016-07-12_05:14:55.07283 INFO 05:14:55 [GossipTasks:1]: InetAddress /2401:db00:2011:50c7:face:0:1f:0 is now DOWN
2016-07-12_05:14:55.07300 INFO 05:14:55 [GossipTasks:1]: InetAddress /2401:db00:21:10ba:face:0:33:0 is now DOWN
2016-07-12_05:14:55.07306 INFO 05:14:55 [GossipTasks:1]: InetAddress /2401:db00:2111:905e:face:0:1f:0 is now DOWN
2016-07-12_05:14:55.07319 INFO 05:14:55 [GossipTasks:1]: InetAddress /2401:db00:21:10b4:face:0:
[junit] ------------- Standard Output ---------------
[junit] Testing new cluster, target 1 vnodes, replication Simple 1 replicas
[junit] Adding 10 unit(s) using ReplicationAwareTokenAllocator... Done in 0.030s
[junit] Size 10(10) unit max 1.25 min 0.63 stddev 0.3227 token max 1.25 min 0.63 stddev 0.3227 Simple 1 replicas
[junit] Worst intermediate unit max 1.75 min 0.56 stddev 0.4330 token max 1.75 min 0.56 stddev 0.4330
[junit] Adding 10 unit(s) using ReplicationAwareTokenAllocator... Done in 0.007s
[junit] Size 20(20) unit max 1.25 min 0.63 stddev 0.3141 token max 1.25 min 0.63 stddev 0.3141 Simple 1 replicas
[junit] Worst intermediate unit max 1.88 min 0.53 stddev 0.3693 token max 1.88 min 0.53 stddev 0.3693
[junit] Adding 10 unit(s) using ReplicationAwareTokenAllocator... Done in 0.007s
[junit] Size 30(30) unit max 1.88 min 0.94 stddev 0.2379 token max 1.88 min 0.94 stddev 0.2379 Simple 1 replicas
diff --git i/test/long/org/apache/cassandra/dht/tokenallocator/ReplicationAwareTokenAllocatorTest.java w/test/long/org/apache/cassandra/dht/tokenallocator/ReplicationAwareTokenAllocatorTest.java
index 3d026fb..2a39b93 100644
--- i/test/long/org/apache/cassandra/dht/tokenallocator/ReplicationAwareTokenAllocatorTest.java
+++ w/test/long/org/apache/cassandra/dht/tokenallocator/ReplicationAwareTokenAllocatorTest.java
@@ -591,12 +591,12 @@ public class ReplicationAwareTokenAllocatorTest
// This should happen very rarely, unless something is broken in the token allocation code.
- for (int rf = 2; rf <= 5; ++rf)
+ for (int rf = 1; rf <= 1; ++rf)
0.99:
1 vnode, 250 units, max 1.95 min 0.98 stddev 0.1498
4 vnodes, 250 units, max 1.11 min 0.89 stddev 0.0743
16 vnodes, 250 units, max 1.03 min 0.97 stddev 0.0175
64 vnodes, 250 units, max 1.01 min 0.99 stddev 0.0044
0.90:
1 vnode, 250 units, max 1.95 min 0.98 stddev 0.1498
4 vnodes, 250 units, max 1.11 min 0.89 stddev 0.0754
ratio: 0.75
1 vnode per host
100 hosts, max 1.56 min 0.78 stddev 0.3525
250 hosts, max 1.95 min 0.98 stddev 0.1498
4 vnodes per host
100 hosts, max 1.10 min 0.87 stddev 0.0662
250 hosts, max 1.11 min 0.88 stddev 0.0696
Headers
Request URL: http://cassci.datastax.com/github-webhook/
Request method: POST
content-type: application/json
Expect:
User-Agent: GitHub-Hookshot/d83765d
X-GitHub-Delivery: 316c9280-a6b1-11e6-9613-1bffb2af29ad
X-GitHub-Event: create
X-Hub-Signature: sha1=62a7d2480172dc8ded4ea5aa546ef17fc8182f77
Payload