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 curator; | |
| import com.google.common.base.Strings; | |
| import com.google.common.base.Throwables; | |
| import com.google.common.io.Closeables; | |
| import com.google.common.util.concurrent.ThreadFactoryBuilder; | |
| import com.netflix.curator.framework.CuratorFramework; | |
| import com.netflix.curator.framework.CuratorFrameworkFactory; | |
| import com.netflix.curator.framework.state.ConnectionState; | |
| import com.netflix.curator.framework.state.ConnectionStateListener; |
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 com.google.common.io.Closeables; | |
| import com.netflix.curator.framework.CuratorFramework; | |
| import com.netflix.curator.framework.CuratorFrameworkFactory; | |
| import com.netflix.curator.retry.RetryNTimes; | |
| import com.netflix.curator.test.TestingServer; | |
| import com.netflix.curator.utils.EnsurePath; | |
| public class EnsurePathBug { | |
| public static void main(String[] args) throws Exception { | |
| int iteration = 0; |
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
| Debugger attached successfully. | |
| Server compiler detected. | |
| JVM version is 20.0-b12 | |
| Deadlock Detection: | |
| No deadlocks found. | |
| Thread 10819: (state = BLOCKED) | |
| - java.lang.Thread.sleep(long) @bci=0 (Interpreted frame) | |
| - com.amazonaws.http.IdleConnectionReaper.run() @bci=3, line=75 (Interpreted frame) |
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
| ################# | |
| # Update packages | |
| ################# | |
| DEBIAN_FRONTEND="noninteractive" sudo apt-get --assume-yes update | |
| DEBIAN_FRONTEND="noninteractive" sudo apt-get --assume-yes upgrade | |
| ######################## | |
| # Install the Oracle JDK | |
| ######################## |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <code_scheme name="Bazaarvoice"> | |
| <option name="FIELD_NAME_PREFIX" value="_" /> | |
| <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" /> | |
| <option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" /> | |
| <option name="JD_DO_NOT_WRAP_ONE_LINE_COMMENTS" value="true" /> | |
| <XML> | |
| <option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" /> | |
| </XML> | |
| <codeStyleSettings language="JAVA"> |
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 python | |
| from __future__ import with_statement | |
| import copy | |
| import functools | |
| import itertools | |
| import sys | |
| from decimal import Decimal | |
| class aggregation(object): | |
| aggregations_by_name = {} |
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 com.netflix.curator.framework.recipes.nodes; | |
| import com.google.common.annotations.VisibleForTesting; | |
| import com.google.common.base.Throwables; | |
| import com.google.common.util.concurrent.SettableFuture; | |
| import com.google.common.util.concurrent.ThreadFactoryBuilder; | |
| import com.netflix.curator.framework.CuratorFramework; | |
| import com.netflix.curator.framework.api.PathAndBytesable; | |
| import com.netflix.curator.utils.EnsurePath; | |
| import com.netflix.curator.utils.ZKPaths; |
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 com.google.common.base.Objects; | |
| import com.google.common.collect.Lists; | |
| import com.google.inject.AbstractModule; | |
| import com.google.inject.Binding; | |
| import com.google.inject.BindingAnnotation; | |
| import com.google.inject.Guice; | |
| import com.google.inject.Inject; | |
| import com.google.inject.Injector; | |
| import com.google.inject.Key; | |
| import com.google.inject.Module; |
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
| def merge(generators): | |
| r"Perform a k-way merge of the data contained in the generators." | |
| heap = [] | |
| # The last known value for a given generator | |
| values = [None for g in generators] | |
| # Initialize the heap with the first value from each generator | |
| for i, g in enumerate(generators): | |
| heapq.heappush(heap, (g.next(), g, i)) |
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
| #!/bin/bash | |
| set -o errexit | |
| set -o nounset | |
| function data() { | |
| # f(x) = x^2 + noise(500) | |
| # g(x) = x^2 + noise(2500) | |
| for i in {1..100}; do | |
| fx=$((i*i + $RANDOM%1000 - 500)) | |
| gx=$((i*i + $RANDOM%5000 - 2500)) |
OlderNewer