Because snappy is not splittable, so single task makes sense.

Are sure about rack topology? Ie 225 is in a different rack than 227 or 228? What does your topology file says?

On 22 Nov 2016 10:14, "yeshwanth kumar" <> wrote:
Thanks for your reply,

i can definitely change the underlying compression format.
but i am trying to understand the Locality Level, 
why executor ran on a different node, where the blocks are not present, when Locality Level is RACK_LOCAL

can you shed some light on this.


Can you Imagine what I would do if I could do all I can - Art of War

On Mon, Nov 21, 2016 at 4:59 PM, Jörn Franke <> wrote:
Use as a format orc, parquet or avro because they support any compression type with parallel processing. Alternatively split your file in several smaller ones. Another alternative would be bzip2 (but slower in general) or Lzo (usually it is not included by default in many distributions).

On 21 Nov 2016, at 23:17, yeshwanth kumar <> wrote:


we are running Hive on Spark, we have an external table over snappy compressed csv file of size 917.4 M
HDFS block size is set to 256 MB

as per my Understanding, if i run a query over that external table , it should launch 4 tasks. one for each block.
but i am seeing one executor and one task processing all the file.

trying to understand the reason behind,

i went one step further to understand the block locality 
when i get the block locations for that file, i found




and in the spark UI i see the Locality Level is  RACK_LOCAL. for that task

if it is RACK_LOCAL then it should run either in node or, because these 2 nodes has all the four blocks needed for computation
but the executor is running in

my theory is not applying anywhere.

please help me in understanding how spark/yarn calculates number of executors/tasks.