java - Copy Multiple files from HDFS to local: Multithreading? -
in java application, need copy multiple files hdfs local file system.
which of below 2 approaches faster ? 1. sequentially copy files one-by-one 2. run parallel threads copy each file.
if have 1 physical disk part of local file system sequential approach best, parallel approach cause disk (in case of hard drive) spin , forth unnecessarily (depending on how os can or not , nature of writes), , because have 1 physical resource work @ time, 1 thread enough.
if local file system has multiple physical disks, possibility of running parallel threads more performance ideal (like thread writes files going drive c, while thread b writes files going drive d).
Comments
Post a Comment