[ 
https://issues.apache.org/jira/browse/PIG-3520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13797314#comment-13797314
 ] 

Cheolsoo Park commented on PIG-3520:
------------------------------------

[~daijy], thank you very much for the patch! Certainly, this doesn't conflict 
to what I am doing with TezStats and is the cleanest solution so far.

One remaining problem is PigStats.get() returns MR-specific SimplePigStats.
{code}
    public static PigStats get() {
        if (tps.get() == null) {
            LOG.info("PigStats has not been set. Defaulting to SimplePigStats");
            tps.set(new SimplePigStats());
        }
        return tps.get();
    }
{code}
I am adding PigStatsFactory class that creates a PigStats depending on the 
ExecType and marking PigStats.get() as deprecated for backward compatibility. 
This requires a few more changes in PigStatsUtil. I also see a similar problem 
with ScriptState.get(), so I will introduce a factory for ScriptState as well.

Nevertheless, I think I can build TezStats upon your patch. I will post a patch 
once I have it ready. Thanks!

> Provide backward compatibility for PigRunner and PPNL after PIG-3419
> --------------------------------------------------------------------
>
>                 Key: PIG-3520
>                 URL: https://issues.apache.org/jira/browse/PIG-3520
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>            Reporter: Daniel Dai
>            Assignee: Daniel Dai
>             Fix For: 0.13.0
>
>         Attachments: PIG-3520-1.patch
>
>
> PIG-3419 did backend refactory to support multiple backend. However, it break 
> backward compatibility of two widely used API: PigRunner and PPNL. And it 
> does not provide a deprecate path. 



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to