Skip to content

Instantly share code, notes, and snippets.

randgalt1
Greetings C* people
I have a table that I need a secondary index for. I need to be able to search via a hash. So, high cardinality. I understand that that's not considered best practice for a C* secondary index. What are the pros/cons? Performance isn't really a concern with this.
Alternatively I could manage my own lookup table but that would be a lot more work
1:06
hanine [[email protected]] entered the room.
1:06
rcoli
in general secondary indexes sorta suck unless you really need the atomic update property
public class Test {
private static final TestingServer server;
private static final CuratorFramework client;
static
{
TestingServer localServer = null;
CuratorFramework localClient = null;
try
{
localServer = new TestingServer();
BACKGROUND
============
A recurring problem for ZooKeeper users is garbage collection of parent nodes. Many recipes
(e.g. locks, leaders, etc.) call for the creation of a parent node under which participants
create sequential nodes. When the participant is done, it deletes its node. In practice, the
ZooKeeper tree begins to fill up with orphaned parent nodes that are no longer needed. The
ZooKeeper APIs don’t provide a way to clean these. Over time, ZooKeeper can become unstable
due to the number of these nodes.
CURRENT SOLUTIONS
#!/usr/bin/env bash
QUBOLE_APP_HOME=$(pwd)
QUBOLE_APP_CONF=$QUBOLE_APP_HOME/config
QUBOLE_APP_LIB=$QUBOLE_APP_HOME/lib
# calculate_heap_size() and default DEFAULT_JVM_OPTS loosely based
# on Cassandra startup script
calculate_heap_size()
Process: Airmail [1126]
Path: /Applications/Airmail.app/Contents/MacOS/Airmail
Identifier: it.bloop.airmail
Version: 1.4 (247)
App Item ID: 573171375
App External ID: 546902650
Code Type: X86-64 (Native)
Parent Process: launchd [270]
Responsible: Airmail [1126]
User ID: 501
public static void main(String[] args) throws Exception
{
System.setProperty(DebugUtils.PROPERTY_LOG_EVENTS, "true");
TestingServer server = new TestingServer();
final int QTY = 3000;
final String PATH = "/bjn/z1/denim/mediaCapacity";
final String FILE = "4006046.";
Timing timing = new Timing();
<?xml version="1.0" encoding="UTF-8"?>
<testrun duration="25286" footerText="Generated by IntelliJ IDEA on 7/23/14 11:53 PM" name="TestTreeCache">
<count name="total" value="15"/>
<count name="failed" value="6"/>
<count name="passed" value="9"/>
<suite duration="25286" status="failed" name="org.apache.curator.framework.recipes.cache">
<suite duration="25286" status="failed" name="TestTreeCache">
<test duration="3336" status="passed" name="testAsyncInitialPopulation"/>
<test duration="2042" status="passed" name="testBasics"/>
<test duration="2018" status="passed" name="testBasicsOnTwoCaches"/>
@Test
public void testTimedAcquire() throws Exception
{
final int MAX_WAIT_MS = 10000;
final int SLEEP_MS = 1000;
CuratorFramework client = CuratorFrameworkFactory.newClient(server.getConnectString(), new RetryOneTime(1));
client.start();
try
{
public static void main(String[] args) throws Exception
{
TestingServer server = new TestingServer();
final CountDownLatch latch = new CountDownLatch(1);
Watcher watcher = new Watcher()
{
@Override
public void process(WatchedEvent event)
{
public static void main(String[] args) throws Exception
{
TestingServer server = new TestingServer();
final CountDownLatch latch = new CountDownLatch(1);
Watcher watcher = new Watcher()
{
@Override
public void process(WatchedEvent event)
{