jenniferdai commented on a change in pull request #4253: Add segment
pre-processing Hadoop job
URL: https://github.com/apache/incubator-pinot/pull/4253#discussion_r290848023
##########
File path:
pinot-hadoop/src/main/java/org/apache/pinot/hadoop/job/SegmentCreationJob.java
##########
@@ -263,23 +255,7 @@ protected void validateTableConfig(TableConfig
tableConfig) {
protected void addDepsJarToDistributedCache(Job job)
throws IOException {
if (_depsJarDir != null) {
- addDepsJarToDistributedCacheHelper(job, _depsJarDir);
- }
- }
-
- protected void addDepsJarToDistributedCacheHelper(Job job, Path depsJarDir)
- throws IOException {
- FileStatus[] fileStatuses = _fileSystem.listStatus(depsJarDir);
- for (FileStatus fileStatus : fileStatuses) {
- if (fileStatus.isDirectory()) {
- addDepsJarToDistributedCacheHelper(job, fileStatus.getPath());
- } else {
- Path depJarPath = fileStatus.getPath();
- if (depJarPath.getName().endsWith(".jar")) {
- _logger.info("Adding deps jar: {} to distributed cache", depJarPath);
- job.addCacheArchive(depJarPath.toUri());
- }
- }
+ JobPreparationHelper.addDepsJarToDistributedCacheHelper(_fileSystem,
job, _depsJarDir);
Review comment:
nice, i like the job prep helper
----------------------------------------------------------------
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]