2014-12-07 90 views
0

我想了解猪的explain功能(link)。阿帕奇猪的解释功能

假设下面的例子:

A = load 'numbers' using PigStorage(',') as (name, age); 
explain A; 

这给了我:

#----------------------------------------------- 
# New Logical Plan: 
#----------------------------------------------- 
A: (Name: LOStore Schema: name#5:bytearray,age#6:bytearray) 
| 
|---A: (Name: LOLoad Schema: name#5:bytearray,age#6:bytearray)RequiredFields:[0, 1] 
#----------------------------------------------- 
# Physical Plan: 
#----------------------------------------------- 
A: Store(fakefile:org.apache.pig.builtin.PigStorage) - scope-1 
| 
|---A: Load(file:///...pig-0.14.0/numbers:PigStorage(',')) - scope-0 

2014-12-07 15:07:10,596 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MRCompiler - File concatenation threshold: 100 optimistic? false 
2014-12-07 15:07:10,609 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MultiQueryOptimizer - MR plan size before optimization: 1 
2014-12-07 15:07:10,610 [main] INFO org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MultiQueryOptimizer - MR plan size after optimization: 1 
#-------------------------------------------------- 
# Map Reduce Plan         
#-------------------------------------------------- 
MapReduce node scope-2 
Map Plan 
A: Store(fakefile:org.apache.pig.builtin.PigStorage) - scope-1 
| 
|---A: Load(file:///.../pig-0.14.0/numbers:PigStorage(',')) - scope-0-------- 
Global sort: false 
---------------- 

我可以在这里看到?我觉得输出很混乱。

+1

http://chimera.labs.oreilly.com/books/1234000001811/ch07.html#describe – 2014-12-08 04:55:33

回答

0

它告诉你猪的步骤。在你的情况下,它解释了如何通过加载数据填充别名A,并且因为你没有对它进行任何操作,而是进入“伪文件”。它描述了流程以及它如何闯入地图/减少

正如你可能看到的那样,它真的很快就会变得混乱。您可能想要看看Netflix的Lipstick以获得更平易近人的作品