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)) {| 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) | |
| { |
| /* | |
| * 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. |
| 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); |
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)) {| #!/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" |
| 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 -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 |
| #!/bin/sh -eu | |
| export JAVA_HOME=$(/usr/libexec/java_home -v 1.6) | |
| export PATH=$JAVA_HOME/bin:$PATH | |
| exec "$@" |
| 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 \ |