You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ap...@apache.org on 2021/12/02 23:12:03 UTC

[pinot] branch generator-sh-gracefully-handle-uppercase created (now 96ba6b6)

This is an automated email from the ASF dual-hosted git repository.

apucher pushed a change to branch generator-sh-gracefully-handle-uppercase
in repository https://gitbox.apache.org/repos/asf/pinot.git.


      at 96ba6b6  generator.sh - gracefully handle uppercase format

This branch includes the following new commits:

     new 96ba6b6  generator.sh - gracefully handle uppercase format

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


[pinot] 01/01: generator.sh - gracefully handle uppercase format

Posted by ap...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

apucher pushed a commit to branch generator-sh-gracefully-handle-uppercase
in repository https://gitbox.apache.org/repos/asf/pinot.git

commit 96ba6b68f1f78ec283770e4eb4289f3d24efd33b
Author: Alexander Pucher <ap...@apache.org>
AuthorDate: Thu Dec 2 15:11:36 2021 -0800

    generator.sh - gracefully handle uppercase format
---
 .../org/apache/pinot/tools/admin/command/GenerateDataCommand.java   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/pinot-tools/src/main/java/org/apache/pinot/tools/admin/command/GenerateDataCommand.java b/pinot-tools/src/main/java/org/apache/pinot/tools/admin/command/GenerateDataCommand.java
index e73d8a1..b5cc1a8 100644
--- a/pinot-tools/src/main/java/org/apache/pinot/tools/admin/command/GenerateDataCommand.java
+++ b/pinot-tools/src/main/java/org/apache/pinot/tools/admin/command/GenerateDataCommand.java
@@ -79,7 +79,7 @@ public class GenerateDataCommand extends AbstractBaseAdminCommand implements Com
   private boolean _help = false;
 
   @CommandLine.Option(names = {"-format"}, required = false, help = true,
-      description = "Output format ('avro' or 'csv').")
+      description = "Output format ('AVRO' or 'CSV').")
   private String _format = FORMAT_AVRO;
 
   @Override
@@ -147,9 +147,9 @@ public class GenerateDataCommand extends AbstractBaseAdminCommand implements Com
     final DataGenerator gen = new DataGenerator();
     gen.init(spec);
 
-    if (FORMAT_AVRO.equals(_format)) {
+    if (FORMAT_AVRO.equalsIgnoreCase(_format)) {
       gen.generateAvro(_numRecords, _numFiles);
-    } else if (FORMAT_CSV.equals(_format)) {
+    } else if (FORMAT_CSV.equalsIgnoreCase(_format)) {
       gen.generateCsv(_numRecords, _numFiles);
     } else {
       throw new IllegalArgumentException(String.format("Invalid output format '%s'", _format));

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org