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
package api | |
import ( | |
"log" | |
"sync" | |
"time" | |
) | |
type EventBus struct { | |
mutex sync.RWMutex |
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
package com.foo.bar; | |
import com.fasterxml.jackson.core.JsonGenerator; | |
import com.fasterxml.jackson.core.JsonParser; | |
import com.fasterxml.jackson.core.JsonToken; | |
import com.fasterxml.jackson.databind.BeanDescription; | |
import com.fasterxml.jackson.databind.DeserializationConfig; | |
import com.fasterxml.jackson.databind.DeserializationContext; | |
import com.fasterxml.jackson.databind.JsonDeserializer; | |
import com.fasterxml.jackson.databind.JsonSerializer; |
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
package foo.bar.proto; | |
import com.google.protobuf.Descriptors; | |
import com.google.protobuf.Message; | |
import java.util.ArrayList; | |
import java.util.Collection; | |
import java.util.LinkedHashMap; | |
import java.util.List; | |
import java.util.Map; |
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
package com.lucidworks.connectors.jobs.leader; | |
import java.time.Duration; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.concurrent.TimeUnit; | |
import java.util.concurrent.atomic.AtomicBoolean; | |
import javax.annotation.PostConstruct; | |
import javax.annotation.PreDestroy; | |
import org.redisson.api.RLockReactive; |
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 bash | |
set -e | |
NS=$(kubectl config view --minify --output 'jsonpath={..namespace}') | |
>&2 echo "namespace: ${NS}" | |
BROKER=$(kubectl get pods | grep broker | head -n1 | cut -d" " -f1) | |
>&2 echo "broker: ${BROKER}" |
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 bash | |
set -e | |
kubectl get pods | grep bookkeeper | cut -d" " -f1 | xargs -I {} sh -c 'echo "instance: {}" && kubectl exec -ti {} -- df -h | grep bookkeeper' |
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
package com.test; | |
import com.google.common.hash.HashFunction; | |
import com.google.common.hash.Hashing; | |
import java.nio.charset.Charset; | |
import reactor.core.publisher.Flux; | |
import reactor.core.scheduler.Schedulers; | |
public class ReactiveGroupsDemo { |
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 bash | |
DIR=$(dirname "$0") | |
NS=$($DIR/current-namespace) | |
PODS=$(kubectl -n $NS get pods -l app.kubernetes.io/name=rpc-service -o name) | |
for pod in $PODS; do | |
tstamp=$(date +%s) |
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
package com.test; | |
import com.google.common.base.Stopwatch; | |
import java.time.Duration; | |
import java.util.List; | |
import java.util.concurrent.ThreadLocalRandom; | |
import java.util.concurrent.TimeUnit; | |
import java.util.concurrent.atomic.AtomicInteger; | |
import java.util.function.Function; | |
import reactor.core.Disposable; |
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
package com.lucidworks.fusion.service.connectors.job.emitter; | |
import com.google.common.annotations.VisibleForTesting; | |
import com.google.common.io.ByteSource; | |
import java.io.ByteArrayInputStream; | |
import java.io.ByteArrayOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStream; |
NewerOlder