Jackie-Jiang commented on a change in pull request #4646: Enabling alternative 
controller rest API classes in preprocess
URL: https://github.com/apache/incubator-pinot/pull/4646#discussion_r328888214
 
 

 ##########
 File path: 
pinot-hadoop/src/main/java/org/apache/pinot/hadoop/job/BaseSegmentJob.java
 ##########
 @@ -37,13 +41,56 @@
   protected final Logger _logger = LoggerFactory.getLogger(getClass());
   protected final Properties _properties;
   protected final Configuration _conf;
+  protected final List<PushLocation> _pushLocations;
+  protected final String _rawTableName;
 
   protected BaseSegmentJob(Properties properties) {
     _properties = properties;
     _conf = new Configuration();
     setConf(_conf);
     Utils.logVersions();
     logProperties();
+
+    // Optional push location and table parameters. If set, will use the table 
config and schema from the push hosts.
+    String pushHostsString = 
_properties.getProperty(JobConfigConstants.PUSH_TO_HOSTS);
+    String pushPortString = 
_properties.getProperty(JobConfigConstants.PUSH_TO_PORT);
+    if (pushHostsString != null && pushPortString != null) {
+      _pushLocations =
+          PushLocation.getPushLocations(StringUtils.split(pushHostsString, 
','), Integer.parseInt(pushPortString));
+    } else {
+      _pushLocations = null;
+    }
+
+    _rawTableName = 
Preconditions.checkNotNull(_properties.getProperty(JobConfigConstants.SEGMENT_TABLE_NAME));
+
 
 Review comment:
   (nit) remove empty line

----------------------------------------------------------------
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]

Reply via email to