io.airlift.command.Arguments类的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(11.0k)|赞(0)|评价(0)|浏览(146)

本文整理了Java中io.airlift.command.Arguments类的一些代码示例,展示了Arguments类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Arguments类的具体详情如下:
包路径:io.airlift.command.Arguments
类名称:Arguments

Arguments介绍

暂无

代码示例

代码示例来源:origin: org.apache.cassandra/cassandra-all

@Command(name = "setconcurrentcompactors", description = "Set number of concurrent compactors in the system.")
public class SetConcurrentCompactors extends NodeTool.NodeToolCmd
{
  @Arguments(title = "concurrent_compactors", usage = "<value>", description = "Number of concurrent compactors, greater than 0.", required = true)
  private Integer concurrentCompactors = null;

  protected void execute(NodeProbe probe)
  {
    checkArgument(concurrentCompactors > 0, "concurrent_compactors should be great than 0.");
    probe.setConcurrentCompactors(concurrentCompactors);
  }
}

代码示例来源:origin: io.tesla/airline

if (field.isAnnotationPresent(Arguments.class)) {
  String title;
  if (!argumentsAnnotation.title().isEmpty()) {
    title = argumentsAnnotation.title();
  String description = argumentsAnnotation.description();
  String usage = argumentsAnnotation.usage();
  boolean required = argumentsAnnotation.required();

代码示例来源:origin: org.apache.cassandra/cassandra-all

@Command(name = "sethintedhandoffthrottlekb", description =  "Set hinted handoff throttle in kb per second, per delivery thread.")
public class SetHintedHandoffThrottleInKB extends NodeToolCmd
{
  @Arguments(title = "throttle_in_kb", usage = "<value_in_kb_per_sec>", description = "Value in KB per second", required = true)
  private Integer throttleInKB = null;

  @Override
  public void execute(NodeProbe probe)
  {
    probe.setHintedHandoffThrottleInKB(throttleInKB);
  }
}

代码示例来源:origin: org.apache.cassandra/cassandra-all

@Command(name = "setinterdcstreamthroughput", description = "Set the Mb/s throughput cap for inter-datacenter streaming in the system, or 0 to disable throttling")
public class SetInterDCStreamThroughput extends NodeToolCmd
{
  @Arguments(title = "inter_dc_stream_throughput", usage = "<value_in_mb>", description = "Value in Mb, 0 to disable throttling", required = true)
  private Integer interDCStreamThroughput = null;

  @Override
  public void execute(NodeProbe probe)
  {
    probe.setInterDCStreamThroughput(interDCStreamThroughput);
  }
}

代码示例来源:origin: org.apache.cassandra/cassandra-all

@Command(name = "enablehintsfordc", description = "Enable hints for a data center that was previsouly disabled")
public class EnableHintsForDC extends NodeTool.NodeToolCmd
{
  @Arguments(usage = "<datacenter>", description = "The data center to enable")
  private List<String> args = new ArrayList<>();

  public void execute(NodeProbe probe)
  {
    checkArgument(args.size() == 1, "enablehintsfordc requires exactly one data center");

    probe.enableHintsForDC(args.get(0));
  }
}

代码示例来源:origin: jsevellec/cassandra-unit

@Command(name = "settraceprobability", description = "Sets the probability for tracing any given request to value. 0 disables, 1 enables for all requests, 0 is the default")
public class SetTraceProbability extends NodeToolCmd
{
  @Arguments(title = "trace_probability", usage = "<value>", description = "Trace probability between 0 and 1 (ex: 0.2)", required = true)
  private Double traceProbability = null;

  @Override
  public void execute(NodeProbe probe)
  {
    checkArgument(traceProbability >= 0 && traceProbability <= 1, "Trace probability must be between 0 and 1");
    probe.setTraceProbability(traceProbability);
  }
}

代码示例来源:origin: jsevellec/cassandra-unit

@Command(name = "setcompactionthroughput", description = "Set the MB/s throughput cap for compaction in the system, or 0 to disable throttling")
public class SetCompactionThroughput extends NodeToolCmd
{
  @Arguments(title = "compaction_throughput", usage = "<value_in_mb>", description = "Value in MB, 0 to disable throttling", required = true)
  private Integer compactionThroughput = null;

  @Override
  public void execute(NodeProbe probe)
  {
    probe.setCompactionThroughput(compactionThroughput);
  }
}

代码示例来源:origin: org.apache.cassandra/cassandra-all

@Command(name = "setstreamthroughput", description = "Set the Mb/s throughput cap for streaming in the system, or 0 to disable throttling")
public class SetStreamThroughput extends NodeToolCmd
{
  @Arguments(title = "stream_throughput", usage = "<value_in_mb>", description = "Value in Mb, 0 to disable throttling", required = true)
  private Integer streamThroughput = null;

  @Override
  public void execute(NodeProbe probe)
  {
    probe.setStreamThroughput(streamThroughput);
  }
}

代码示例来源:origin: jsevellec/cassandra-unit

@Command(name = "setconcurrentcompactors", description = "Set number of concurrent compactors in the system.")
public class SetConcurrentCompactors extends NodeTool.NodeToolCmd
{
  @Arguments(title = "concurrent_compactors", usage = "<value>", description = "Number of concurrent compactors, greater than 0.", required = true)
  private Integer concurrentCompactors = null;

  protected void execute(NodeProbe probe)
  {
    checkArgument(concurrentCompactors > 0, "concurrent_compactors should be great than 0.");
    probe.setConcurrentCompactors(concurrentCompactors);
  }
}

代码示例来源:origin: org.apache.cassandra/cassandra-all

@Command(name = "settraceprobability", description = "Sets the probability for tracing any given request to value. 0 disables, 1 enables for all requests, 0 is the default")
public class SetTraceProbability extends NodeToolCmd
{
  @Arguments(title = "trace_probability", usage = "<value>", description = "Trace probability between 0 and 1 (ex: 0.2)", required = true)
  private Double traceProbability = null;

  @Override
  public void execute(NodeProbe probe)
  {
    checkArgument(traceProbability >= 0 && traceProbability <= 1, "Trace probability must be between 0 and 1");
    probe.setTraceProbability(traceProbability);
  }
}

代码示例来源:origin: jsevellec/cassandra-unit

@Command(name = "rebuild_index", description = "A full rebuild of native secondary indexes for a given table")
public class RebuildIndex extends NodeToolCmd
{
  @Arguments(usage = "<keyspace> <table> <indexName...>", description = "The keyspace and table name followed by a list of index names")
  List<String> args = new ArrayList<>();

  @Override
  public void execute(NodeProbe probe)
  {
    checkArgument(args.size() >= 3, "rebuild_index requires ks, cf and idx args");
    probe.rebuildIndex(args.get(0), args.get(1), toArray(args.subList(2, args.size()), String.class));
  }
}

代码示例来源:origin: jsevellec/cassandra-unit

@Command(name = "sethintedhandoffthrottlekb", description =  "Set hinted handoff throttle in kb per second, per delivery thread.")
public class SetHintedHandoffThrottleInKB extends NodeToolCmd
{
  @Arguments(title = "throttle_in_kb", usage = "<value_in_kb_per_sec>", description = "Value in KB per second", required = true)
  private Integer throttleInKB = null;

  @Override
  public void execute(NodeProbe probe)
  {
    probe.setHintedHandoffThrottleInKB(throttleInKB);
  }
}

代码示例来源:origin: jsevellec/cassandra-unit

@Command(name = "setinterdcstreamthroughput", description = "Set the Mb/s throughput cap for inter-datacenter streaming in the system, or 0 to disable throttling")
public class SetInterDCStreamThroughput extends NodeToolCmd
{
  @Arguments(title = "inter_dc_stream_throughput", usage = "<value_in_mb>", description = "Value in Mb, 0 to disable throttling", required = true)
  private Integer interDCStreamThroughput = null;

  @Override
  public void execute(NodeProbe probe)
  {
    probe.setInterDCStreamThroughput(interDCStreamThroughput);
  }
}

代码示例来源:origin: jsevellec/cassandra-unit

@Command(name = "setstreamthroughput", description = "Set the Mb/s throughput cap for streaming in the system, or 0 to disable throttling")
public class SetStreamThroughput extends NodeToolCmd
{
  @Arguments(title = "stream_throughput", usage = "<value_in_mb>", description = "Value in Mb, 0 to disable throttling", required = true)
  private Integer streamThroughput = null;

  @Override
  public void execute(NodeProbe probe)
  {
    probe.setStreamThroughput(streamThroughput);
  }
}

代码示例来源:origin: com.proofpoint.platform/launcher

@Command(name = "run", description = "Start server in foreground")
public static class RunCommand extends LauncherCommand
{
  @Arguments(description = "Arguments to pass to server")
  public final List<String> args = new ArrayList<>();
  @Override
  public void execute()
  {
    start(args, false);
  }
}

代码示例来源:origin: org.apache.cassandra/cassandra-all

@Command(name = "rebuild_index", description = "A full rebuild of native secondary indexes for a given table")
public class RebuildIndex extends NodeToolCmd
{
  @Arguments(usage = "<keyspace> <table> <indexName...>", description = "The keyspace and table name followed by a list of index names")
  List<String> args = new ArrayList<>();

  @Override
  public void execute(NodeProbe probe)
  {
    checkArgument(args.size() >= 3, "rebuild_index requires ks, cf and idx args");
    probe.rebuildIndex(args.get(0), args.get(1), toArray(args.subList(2, args.size()), String.class));
  }
}

代码示例来源:origin: org.apache.cassandra/cassandra-all

@Command(name = "refresh", description = "Load newly placed SSTables to the system without restart")
public class Refresh extends NodeToolCmd
{
  @Arguments(usage = "<keyspace> <table>", description = "The keyspace and table name")
  private List<String> args = new ArrayList<>();

  @Override
  public void execute(NodeProbe probe)
  {
    checkArgument(args.size() == 2, "refresh requires ks and cf args");
    probe.loadNewSSTables(args.get(0), args.get(1));
  }
}

代码示例来源:origin: org.apache.cassandra/cassandra-all

@Command(name = "disablehintsfordc", description = "Disable hints for a data center")
public class DisableHintsForDC extends NodeTool.NodeToolCmd
{
  @Arguments(usage = "<datacenter>", description = "The data center to disable")
  private List<String> args = new ArrayList<>();

  public void execute(NodeProbe probe)
  {
    checkArgument(args.size() == 1, "disablehintsfordc requires exactly one data center");

    probe.disableHintsForDC(args.get(0));
  }
}

代码示例来源:origin: org.apache.cassandra/cassandra-all

@Command(name = "setcompactionthroughput", description = "Set the MB/s throughput cap for compaction in the system, or 0 to disable throttling")
public class SetCompactionThroughput extends NodeToolCmd
{
  @Arguments(title = "compaction_throughput", usage = "<value_in_mb>", description = "Value in MB, 0 to disable throttling", required = true)
  private Integer compactionThroughput = null;

  @Override
  public void execute(NodeProbe probe)
  {
    probe.setCompactionThroughput(compactionThroughput);
  }
}

代码示例来源:origin: com.strapdata.cassandra/cassandra-all

@Command(name = "setcompactionthroughput", description = "Set the MB/s throughput cap for compaction in the system, or 0 to disable throttling")
public class SetCompactionThroughput extends NodeToolCmd
{
  @Arguments(title = "compaction_throughput", usage = "<value_in_mb>", description = "Value in MB, 0 to disable throttling", required = true)
  private Integer compactionThroughput = null;

  @Override
  public void execute(NodeProbe probe)
  {
    probe.setCompactionThroughput(compactionThroughput);
  }
}

相关文章