mcvsubbu commented on a change in pull request #4874: Pinot ingestion job -
Standalone
URL: https://github.com/apache/incubator-pinot/pull/4874#discussion_r353510093
##########
File path:
pinot-batch-ingestion/pinot-standalone/src/main/java/org/apache/pinot/ingestion/standalone/SegmentTarPushJobRunner.java
##########
@@ -90,26 +106,42 @@ public void pushSegments(PinotFS fileSystem, List<String>
tarFilePaths)
Preconditions.checkArgument(fileName.endsWith(Constants.TAR_GZ_FILE_EXT));
String segmentName = fileName.substring(0, fileName.length() -
Constants.TAR_GZ_FILE_EXT.length());
for (PinotClusterSpec pinotClusterSpec : _spec.getPinotClusterSpecs()) {
- LOGGER.info("Pushing segment: {} to location: {}", segmentName,
pinotClusterSpec.getControllerURI());
- int retryCount = 1;
- if (_spec.getPushJobSpec() != null &&
_spec.getPushJobSpec().getRetryCount() > 0) {
- _spec.getPushJobSpec().getRetryCount();
+ URI controllerURI;
+ try {
+ controllerURI = new URI(pinotClusterSpec.getControllerURI());
+ } catch (URISyntaxException e) {
+ throw new RuntimeException("Got invalid controller uri - " +
pinotClusterSpec.getControllerURI());
Review comment:
I usually include the name within quotes to catch spaces in the user string.
For example:
`throw new RuntimeException("Got invalid controller uri - '" +
pinotClusterSpec.getControllerURI()) + "'"`
So, if a user has configured a URI that is blank, or begins/ends in spaces,
we can easily determine that. I suggest you make this change in all the
exception messages thrown (or errors logged) whenever we encounter bad input.
It is ok to be in another PR
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]