Skip to content

Commit

Permalink
out_s3: Use _CHECK suffix to clarify meanings
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 committed Jun 3, 2024
1 parent 057fbc2 commit c2388c4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions plugins/out_s3/s3.c
Original file line number Diff line number Diff line change
Expand Up @@ -699,9 +699,9 @@ static int cb_s3_init(struct flb_output_instance *ins,
ctx->parquet_schema_file = NULL;

if (ctx->compression == FLB_AWS_COMPRESS_PARQUET) {
cmdp = flb_popen(DEFAULT_PARQUET_COMMAND_EXISTENCE, "r");
cmdp = flb_popen(DEFAULT_PARQUET_COMMAND_CHECK, "r");
if (cmdp == NULL) {
flb_plg_error(ctx->ins, "command %s failed", DEFAULT_PARQUET_COMMAND_EXISTENCE);
flb_plg_error(ctx->ins, "command %s failed", DEFAULT_PARQUET_COMMAND_CHECK);
return -1;
}
flb_pclose(cmdp);
Expand Down Expand Up @@ -1406,7 +1406,7 @@ static int s3_compress_parquet(struct flb_s3 *ctx,

cmdp = _popen(parquet_cmd, "r");
if (cmdp == NULL) {
flb_plg_error(ctx->ins, "command %s failed", DEFAULT_PARQUET_COMMAND_EXISTENCE);
flb_plg_error(ctx->ins, "command %s failed", DEFAULT_PARQUET_COMMAND_CHECK);
return -1;
}
_pclose(cmdp);
Expand Down Expand Up @@ -1591,7 +1591,7 @@ static int s3_compress_parquet(struct flb_s3 *ctx,

cmdp = flb_popen(parquet_cmd, "r");
if (cmdp == NULL) {
flb_plg_error(ctx->ins, "command %s failed", DEFAULT_PARQUET_COMMAND_EXISTENCE);
flb_plg_error(ctx->ins, "command %s failed", DEFAULT_PARQUET_COMMAND_CHECK);
return -1;
}
flb_pclose(cmdp);
Expand Down
4 changes: 2 additions & 2 deletions plugins/out_s3/s3.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@
#define DEFAULT_PARQUET_SCHEMA_TYPE "avro"
#define DEFAULT_PARQUET_COMMAND "columnify"
#if defined(FLB_SYSTEM_WINDOWS)
#define DEFAULT_PARQUET_COMMAND_EXISTENCE "where columnify"
#define DEFAULT_PARQUET_COMMAND_CHECK "where columnify"
#else
#define DEFAULT_PARQUET_COMMAND_EXISTENCE "columnify -h > /dev/null 2>&1"
#define DEFAULT_PARQUET_COMMAND_CHECK "columnify -h > /dev/null 2>&1"
#endif

/*
Expand Down

0 comments on commit c2388c4

Please sign in to comment.