Code generated from protobufs:
public String getSomeId() {
if (someId_ instanceof String) {
return (String) someId_;
}
ByteString bs = (ByteString) someId_;
String s = bs.toStringUtf8();
if (isValidUtf8(bs)) {
INSTANCE=hostname or other ID | |
LOCATION=/datacenter/rack/machine | |
airship environment provision-local local /airship \ | |
--name test \ | |
--repository http://nexus.vip.facebook.com:8181/nexus/content/groups/public/ \ | |
--maven-default-group-id io.airlift.airship \ | |
--maven-default-group-id com.facebook.presto.config \ | |
--agent-id $INSTANCE \ | |
--location $LOCATION \ |
#!/bin/sh -eu | |
export JAVA_HOME=$(/usr/libexec/java_home -v 1.6) | |
export PATH=$JAVA_HOME/bin:$PATH | |
exec "$@" |
#!/bin/sh -eux | |
GROUP=org/apache/hive | |
ARTIFACT=hive-exec | |
VERSION=0.12.0 | |
JAR=$HOME/.m2/repository/$GROUP/$ARTIFACT/$VERSION/$ARTIFACT-$VERSION-sources.jar | |
rm -vf $JAR | |
touch $JAR |
ENVIRONMENT=dev | |
INSTANCE=...hostname or other id... | |
DATACENTER=west | |
CLUSTER=1 | |
MACHINE=...hostname... | |
LOCATION=/$DATACENTER/$CLUSTER/$MACHINE | |
IP=$(hostname -i) | |
TYPE=...machine type name... |
#!/bin/sh -eu | |
FILE="$HOME/.ssh/id_rsa" | |
NAME="SSH: $FILE" | |
PASSWORD=$(security find-generic-password -w -l "$NAME") | |
expect << EOF | |
spawn ssh-add $FILE | |
expect "Enter passphrase" |
Code generated from protobufs:
public String getSomeId() {
if (someId_ instanceof String) {
return (String) someId_;
}
ByteString bs = (ByteString) someId_;
String s = bs.toStringUtf8();
if (isValidUtf8(bs)) {
String properties = ".level=INFO\n" + | |
"java.util.logging.SimpleFormatter.format=%1$tF %1$tT %4$s %3$s %5$s%6$s%n\n" + | |
"handlers=java.util.logging.ConsoleHandler\n" + | |
"java.util.logging.ConsoleHandler.level=FINEST\n"; | |
LogManager.getLogManager().readConfiguration(new ByteArrayInputStream(properties.getBytes(StandardCharsets.UTF_8))); | |
java.util.logging.Logger.getLogger("com.facebook.presto").setLevel(Level.FINEST); |
/* | |
* Licensed 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. |
import static java.util.Objects.requireNonNull; | |
public class Closer<T, X extends Exception> | |
implements AutoCloseable | |
{ | |
private final T delegate; | |
private final Cleaner<T, X> cleaner; | |
public static <T, X extends Exception> Closer<T, X> closer(T delegate, Cleaner<T, X> cleaner) | |
{ |
"20150819_160255_05306_partm.1.23-5-12509" #12509 prio=5 os_prio=0 tid=0x00007f7f10063000 nid=0x3e67a in Object.wait() [0x00007f7d58126000] | |
java.lang.Thread.State: TIMED_WAITING (on object monitor) | |
at java.lang.Object.wait(Native Method) | |
at sun.nio.ch.NativeThreadSet.signalAndWait(NativeThreadSet.java:101) | |
- locked <0x00007f86336b5540> (a sun.nio.ch.NativeThreadSet) | |
at sun.nio.ch.FileChannelImpl.implCloseChannel(FileChannelImpl.java:129) | |
at java.nio.channels.spi.AbstractInterruptibleChannel$1.interrupt(AbstractInterruptibleChannel.java:165) | |
- locked <0x00007f86336b5560> (a java.lang.Object) | |
at java.lang.Thread.interrupt(Thread.java:919) | |
- locked <0x00007f86c01a91e0> (a java.lang.Object) |