Zoltan Martonka has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/24127 )

Change subject: [examples] add replication demo
......................................................................


Patch Set 2: Code-Review+1

(3 comments)

http://gerrit.cloudera.org:8080/#/c/24127/2/examples/flink-replication/ingest/ingest.py
File examples/flink-replication/ingest/ingest.py:

http://gerrit.cloudera.org:8080/#/c/24127/2/examples/flink-replication/ingest/ingest.py@254
PS2, Line 254:    parser.add_argument(
             :         "--interval",
             :         type=float,
             :         default=float(os.environ.get("INGEST_INTERVAL", 
INTERVAL_DEFAULT)),
             :         metavar="SECONDS",
             :         help="Delay between operations (default: %(default)s)",
             :     )
             :     parser.add_argument(
             :         "--insert-rate",
             :         type=float,
             :         default=float(os.environ.get("INSERT_RATE", 0.5)),
             :         help="Relative weight for INSERT ops (default: 0.5)",
             :     )
             :     parser.add_argument(
             :         "--update-rate",
             :         type=float,
             :         default=float(os.environ.get("UPDATE_RATE", 0.3)),
             :         help="Relative weight for UPDATE ops (default: 0.3)",
             :     )
             :     parser.add_argument(
             :         "--delete-rate",
             :         type=float,
             :         default=float(os.environ.get("DELETE_RATE", 0.15)),
             :         help="Relative weight for DELETE ops (default: 0.15)",
             :     )
             :     parser.add_argument(
             :         "--upsert-rate",
             :         type=float,
             :         default=float(os.environ.get("UPSERT_RATE", 0.25)),
             :         help="Relative weight for UPSERT ops (default: 0.25)",
             :     )
Why do you use %(default) in one place in help, but not at the other params?


http://gerrit.cloudera.org:8080/#/c/24127/2/examples/flink-replication/ingest/ingest.py@288
PS2, Line 288:     if total == 0:
             :         log.error("All operation rates are zero -- nothing to 
do.")
             :         sys.exit(1)
Just out of curiosity, why do you prefer sys.exit over just throwing an 
exception (like we usually do in python)?


http://gerrit.cloudera.org:8080/#/c/24127/2/examples/flink-replication/ingest/ingest.py@301
PS2, Line 301:     except Exception as exc:
             :         log.error("Could not connect to %s:%d: %s", host, port, 
exc)
             :         sys.exit(1)
is there any reason to use sys.exit(1)?
Whats the problem with the normal
except Exception as exc:
        log.error("Could not connect to %s:%d: %s", host, port, exc)
        raise



--
To view, visit http://gerrit.cloudera.org:8080/24127
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iebf29efaebc91d9831f57fc884a2acbab31715ce
Gerrit-Change-Number: 24127
Gerrit-PatchSet: 2
Gerrit-Owner: Marton Greber <[email protected]>
Gerrit-Reviewer: Abhishek Chennaka <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Gabriella Lotz <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Marton Greber <[email protected]>
Gerrit-Reviewer: Zoltan Chovan <[email protected]>
Gerrit-Reviewer: Zoltan Martonka <[email protected]>
Gerrit-Comment-Date: Wed, 25 Mar 2026 11:14:15 +0000
Gerrit-HasComments: Yes

Reply via email to