[
https://issues.apache.org/jira/browse/METRON-822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15956908#comment-15956908
]
ASF GitHub Bot commented on METRON-822:
---------------------------------------
Github user cestella commented on a diff in the pull request:
https://github.com/apache/incubator-metron/pull/509#discussion_r109923417
--- Diff: metron-sensors/fastcapa/src/args.c ---
@@ -84,62 +95,167 @@ int parse_args(int argc, char** argv)
// parse arguments to this application
argvopt = argv;
- while ((opt = getopt_long(argc, argvopt, "p:b:t:c:", lgopts,
&option_index)) != EOF) {
+ while ((opt = getopt_long(argc, argvopt, "hp:b:t:c:r:q:s:x:", lgopts,
&option_index)) != EOF) {
switch (opt) {
- // portmask
- case 'p':
- app.enabled_port_mask = parse_portmask(optarg);
- if (app.enabled_port_mask == 0) {
- printf("Error: Invalid portmask: '%s'\n", optarg);
- print_usage(prgname);
+ // help
+ case 'h':
+ print_usage();
return -1;
- }
- break;
-
- // kafka topic
- case 't':
- app.kafka_topic = strdup(optarg);
- if (!valid(app.kafka_topic)) {
- printf("Error: Invalid kafka topic: '%s'\n", optarg);
- print_usage(prgname);
- return -1;
- }
- break;
-
- // kafka config path
- case 'c':
- app.kafka_config_path = strdup(optarg);
- if (!valid(app.kafka_config_path) ||
!file_exists(app.kafka_config_path)) {
- printf("Error: Invalid kafka config: '%s'\n", optarg);
- print_usage(prgname);
- return -1;
- }
- break;
-
- default:
- printf("Error: Invalid argument: '%s'\n", optarg);
- print_usage(prgname);
- return -1;
- }
+
+ // burst size
+ case 'b':
+ app.burst_size = atoi(optarg);
+ printf("[ -b BURST_SIZE ] defined as %d \n",
app.burst_size);
+
+ if(app.burst_size < 1 || app.burst_size > MAX_BURST_SIZE) {
+ printf("Invalid burst size; burst=%u must be in [1,
%u]. \n", app.burst_size, MAX_BURST_SIZE);
--- End diff --
Actually, same comment on the error comments below.
> Improve Fastcapa Performance
> ----------------------------
>
> Key: METRON-822
> URL: https://issues.apache.org/jira/browse/METRON-822
> Project: Metron
> Issue Type: Improvement
> Reporter: Nick Allen
> Assignee: Nick Allen
>
> Improve the performance and scalability of the Fastcapa probe.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)