本文整理了Java中io.airlift.airline.Option.<init>()
方法的一些代码示例,展示了Option.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Option.<init>()
方法的具体详情如下:
包路径:io.airlift.airline.Option
类名称:Option
方法名:<init>
暂无
代码示例来源:origin: prestodb/presto
public class VersionOption
{
@Option(name = "--version", description = "Display version information and exit")
public Boolean version = false;
public boolean showVersionIfRequested()
{
if (version) {
String clientVersion = Presto.class.getPackage().getImplementationVersion();
System.out.println("Presto CLI " + firstNonNull(clientVersion, "(version unknown)"));
}
return version;
}
}
代码示例来源:origin: prestodb/presto
@Option(name = "--catalog", title = "catalog", description = "Catalog:Connector mapping (can be repeated)")
private List<String> catalogOptions = new ArrayList<>();
@Option(name = "--plugin", title = "plugin", description = "Fully qualified class name of plugin to be registered (can be repeated)")
private List<String> pluginClassNames = new ArrayList<>();
代码示例来源:origin: square/okhttp
@Option(name = {"-X", "--request"}, description = "Specify request command to use")
public String method;
@Option(name = {"-d", "--data"}, description = "HTTP POST data")
public String data;
@Option(name = {"-H", "--header"}, description = "Custom header to pass to server")
public List<String> headers;
@Option(name = {"-A", "--user-agent"}, description = "User-Agent to send to server")
public String userAgent = NAME + "/" + versionString();
@Option(name = "--connect-timeout", description = "Maximum time allowed for connection (seconds)")
public int connectTimeout = DEFAULT_TIMEOUT;
@Option(name = "--read-timeout", description = "Maximum time allowed for reading data (seconds)")
public int readTimeout = DEFAULT_TIMEOUT;
@Option(
name = "--call-timeout",
description = "Maximum time allowed for the entire call (seconds)")
public int callTimeout = DEFAULT_TIMEOUT;
@Option(name = {"-L", "--location"}, description = "Follow redirects")
public boolean followRedirects;
@Option(name = {"-k", "--insecure"},
description = "Allow connections to SSL sites without certs")
public boolean allowInsecure;
代码示例来源:origin: prestodb/presto
@Option(name = "--server", title = "server", description = "Presto server location (default: localhost:8080)")
public String server = "localhost:8080";
@Option(name = "--user", title = "user", description = "Username")
public String user = System.getProperty("user.name");
@Option(name = "--catalog", title = "catalog", description = "Default catalog")
public String catalog;
@Option(name = "--schema", title = "schema", description = "Default schema")
public String schema;
@Option(name = "--suite", title = "suite", description = "Suite to execute")
public List<String> suites = new ArrayList<>();
@Option(name = "--suite-config", title = "suite-config", description = "Suites configuration file (default: suite.json)")
public String suiteConfigFile = "suite.json";
@Option(name = "--sql", title = "sql", description = "Directory containing sql files (default: sql)")
public String sqlTemplateDir = "sql";
@Option(name = "--query", title = "query", description = "Queries to execute")
public List<String> queries = new ArrayList<>();
@Option(name = "--debug", title = "debug", description = "Enable debug information (default: false)")
public boolean debug;
@Option(name = "--session", title = "session", description = "Session property (property can be used multiple times; format is key=value)")
public final List<ClientSessionProperty> sessionProperties = new ArrayList<>();
代码示例来源:origin: prestodb/presto
@Option(name = "--server", title = "server", description = "Presto server location (default: localhost:8080)")
public String server = "localhost:8080";
@Option(name = "--krb5-remote-service-name", title = "krb5 remote service name", description = "Remote peer's kerberos service name")
public String krb5RemoteServiceName;
@Option(name = "--krb5-config-path", title = "krb5 config path", description = "Kerberos config file path (default: /etc/krb5.conf)")
public String krb5ConfigPath = "/etc/krb5.conf";
@Option(name = "--krb5-keytab-path", title = "krb5 keytab path", description = "Kerberos key table path (default: /etc/krb5.keytab)")
public String krb5KeytabPath = "/etc/krb5.keytab";
@Option(name = "--krb5-credential-cache-path", title = "krb5 credential cache path", description = "Kerberos credential cache path")
public String krb5CredentialCachePath = defaultCredentialCachePath().orElse(null);
@Option(name = "--krb5-principal", title = "krb5 principal", description = "Kerberos principal to be used")
public String krb5Principal;
@Option(name = "--krb5-disable-remote-service-hostname-canonicalization", title = "krb5 disable remote service hostname canonicalization", description = "Disable service hostname canonicalization using the DNS reverse lookup")
public boolean krb5DisableRemoteServiceHostnameCanonicalization;
@Option(name = "--keystore-path", title = "keystore path", description = "Keystore path")
public String keystorePath;
@Option(name = "--keystore-password", title = "keystore password", description = "Keystore password")
public String keystorePassword;
@Option(name = "--truststore-path", title = "truststore path", description = "Truststore path")
public String truststorePath;
代码示例来源:origin: apache/incubator-druid
@Option(name = "--connectURI", description = "Database JDBC connection string", required = true)
private String connectURI;
@Option(name = "--user", description = "Database username", required = true)
private String user;
@Option(name = "--password", description = "Database password", required = true)
private String password;
@Option(name = "--base", description = "Base table name")
private String base;
代码示例来源:origin: apache/incubator-druid
@Option(name = "--all", description = "delete all state stored in metadata and deep storage")
private boolean all;
@Option(name = "--metadataStore", description = "delete all records in metadata storage")
private boolean metadataStore;
@Option(name = "--segmentFiles", description = "delete all segment files from deep storage")
private boolean segmentFiles;
@Option(name = "--taskLogs", description = "delete all tasklogs")
private boolean taskLogs;
@Option(name = "--hadoopWorkingPath", description = "delete hadoopWorkingPath")
private boolean hadoopWorkingPath;
代码示例来源:origin: apache/incubator-druid
@Option(name = "--workingDir", description = "The directory path where segments are stored. This tool will recursively look for segments underneath this directory and insert/update these segments in metdata storage.", required = true)
private String workingDirPath;
@Option(name = "--updateDescriptor", description = "if set to true, this tool will update loadSpec field in descriptor.json (partitionNum_descriptor.json for HDFS data storage) if the path in loadSpec is different from where desciptor.json (partitionNum_descriptor.json for HDFS data storage) was found. Default value is true", required = false)
private String updateDescriptor;
代码示例来源:origin: apache/incubator-druid
@Option(
name = {"-c", "--coordinate"},
title = "coordinate",
@Option(
name = {"-h", "--hadoop-coordinate"},
title = "hadoop coordinate",
@Option(
name = "--no-default-hadoop",
description = "Don't pull down the default hadoop coordinate, i.e., org.apache.hadoop:hadoop-client:2.8.3. If `-h` option is supplied, then default hadoop coordinate will not be downloaded.",
@Option(
name = "--clean",
title = "Remove exisiting extension and hadoop dependencies directories before pulling down dependencies.",
@Option(
name = {"-l", "--localRepository"},
title = "A local repository that Maven will use to put downloaded files. Then pull-deps will lay these files out into the extensions directory as needed.",
@Option(
name = {"-r", "--remoteRepository"},
title = "Add a remote repository. Unless --no-default-remote-repositories is provided, these will be used after https://repo1.maven.org/maven2/",
@Option(
name = "--no-default-remote-repositories",
description = "Don't use the default remote repositories, only use the repositories provided directly via --remoteRepository",
@Option(
代码示例来源:origin: apache/incubator-druid
@Option(
name = {"-d", "--directory"},
title = "directory",
@Option(
name = {"-o", "--out"},
title = "file",
@Option(
name = {"--filter"},
title = "json",
@Option(
name = {"-c", "--column"},
title = "column",
@Option(
name = "--time-iso8601",
title = "Format __time column in ISO8601 format rather than long. Only used if dumping rows.",
@Option(
name = "--dump",
title = "type",
@Option(
name = "--decompress-bitmaps",
title = "Dump bitmaps as arrays rather than base64-encoded compressed bitmaps. Only used if dumping bitmaps.",
代码示例来源:origin: apache/incubator-druid
private Writer logWriter = new PrintWriter(new OutputStreamWriter(System.out, StandardCharsets.UTF_8));
@Option(name = "-f", title = "file", description = "file to validate", required = true)
public String jsonFile;
@Option(name = "-t", title = "type", description = "the type of schema to validate", required = true)
public String type;
@Option(name = "-r", title = "resource", description = "optional resources required for validation", required = false)
public String resource;
@Option(name = "--log", title = "toLogger", description = "redirects any outputs to logger", required = false)
public boolean toLogger;
代码示例来源:origin: apache/incubator-druid
private String argumentSpec;
@Option(name = {"-c", "--coordinate", "hadoopDependencies"},
description = "extra dependencies to pull down (e.g. non-default hadoop coordinates or extra hadoop jars)")
private List<String> coordinates;
@Option(name = "--no-default-hadoop",
description = "don't pull down the default hadoop version",
required = false)
代码示例来源:origin: apache/incubator-druid
@Option(name = "--nodeType", title = "nodeType", description = "Set the node type to expose on ZK")
public String nodeType = "indexer-executor";
代码示例来源:origin: allure-framework/allure1
/**
* @author Artem Eroshenko <eroshenkoam@yandex-team.ru>
*/
public abstract class ReportCommand extends AbstractCommand {
@Option(name = {"-o", "--report-dir", "--output"}, type = OptionType.COMMAND,
description = "The directory to generate Allure report into.")
protected String reportDirectory = "allure-report";
/**
* The string representation of path to the report directory.
*/
protected String getReportDirectory() {
return reportDirectory;
}
/**
* The path to the report directory {@link #getReportDirectory()}.
*/
protected Path getReportDirectoryPath() {
return Paths.get(getReportDirectory());
}
}
代码示例来源:origin: palantir/atlasdb
LoggerFactory.getLogger(AbstractTimestampCommand.class));
@Option(name = {"-f", "--file"},
title = "TIMESTAMP_FILE",
type = OptionType.GROUP,
private File file;
@Option(name = {"-t", "--timestamp"},
title = "TIMESTAMP",
type = OptionType.GROUP,
代码示例来源:origin: palantir/atlasdb
@Option(name = {"-c", "--config"},
title = "INSTALL CONFIG PATH",
type = OptionType.GLOBAL,
private File configFile;
@Option(name = {"--runtime-config"},
title = "RUNTIME CONFIG PATH",
type = OptionType.GLOBAL,
@Option(name = {"--inline-config"},
title = "INLINE INSTALL CONFIG",
type = OptionType.GLOBAL,
private String inlineConfig;
@Option(name = {"--config-root"},
title = "INSTALL CONFIG ROOT",
type = OptionType.GLOBAL,
@Option(name = {"--runtime-config-root"},
title = "RUNTIME CONFIG ROOT",
type = OptionType.GLOBAL,
@Option(name = {"--offline"},
title = "OFFLINE",
type = OptionType.GLOBAL,
代码示例来源:origin: palantir/atlasdb
private static final OutputPrinter printer = new OutputPrinter(LoggerFactory.getLogger(FetchTimestamp.class));
@Option(name = {"-i", "--immutable"},
type = OptionType.COMMAND,
description = "Get the current immutable timestamp, instead of a fresh one.")
private boolean immutable;
@Option(name = {"-d", "--date-time"},
type = OptionType.COMMAND,
description = "Return the earliest approximate wall clock datetime at which the chosen timestamp"
代码示例来源:origin: palantir/atlasdb
LoggerFactory.getLogger(AbstractTimestampCommand.class));
@Option(name = {"-e", "--epoch"},
title = "EPOCH TIME",
type = OptionType.COMMAND,
代码示例来源:origin: allure-framework/allure1
@Option(name = {"-p", "--port"}, type = OptionType.COMMAND,
description = "This port will be used to start web server for the report")
protected int port = 0;
代码示例来源:origin: palantir/atlasdb
@Command(name = "test", description = "test functionality")
public static class TestCommand extends SingleBackendCommand {
@Option(name = {"-f1", "--flag1"}, description = "flag 1")
Boolean flag1;
@Option(name = {"-f2", "--flag2"}, description = "flag 2")
String flag2;
内容来源于网络,如有侵权,请联系作者删除!