Pig
  1. Pig
  2. PIG-2846

Can we skip hcat related e2e when hcat is not installed?

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Trivial Trivial
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Trying pig e2e for the first time, I see couple of the tests (HCatDDL_1,HCatDDL_2 and Jython_Command_1) failing with

      java.io.IOException: Cannot run program /usr/local/hcat/bin/hcat:

      java.io.IOException: error=2, No such file or directory

      Is it ok to change the test_harness to skip these tests when hcat does not exist?

        Activity

        Hide
        Koji Noguchi added a comment -

        Adding a flag 'ifhcat_exists' for e2e testcases that only work when hcat exists.

        Show
        Koji Noguchi added a comment - Adding a flag 'ifhcat_exists' for e2e testcases that only work when hcat exists.
        Hide
        Alan Gates added a comment -

        Once I apply this patch it seems to skip these tests no matter what. I tried setting the HCAT_BIN environment variable to where I had HCat installed (which isn't /usr/local/hcat/bin) but that did not help. Can you add some instructions on how to use this?

        Show
        Alan Gates added a comment - Once I apply this patch it seems to skip these tests no matter what. I tried setting the HCAT_BIN environment variable to where I had HCat installed (which isn't /usr/local/hcat/bin) but that did not help. Can you add some instructions on how to use this?
        Hide
        Koji Noguchi added a comment -

        Thanks Alan for taking a look at my patch!

        I tried setting the HCAT_BIN environment variable to where I had HCat installed (which isn't /usr/local/hcat/bin) but that did not help.

        Even without my patch, your HCAT_BIN is being ignored. Inside test/e2e/pig/build.xml,

        104   <condition property="hcat.bin" value="/usr/local/hcat/bin/hcat">
        105     <not>
        106       <isset property="hcat.bin"/>
        107     </not>
        108   </condition>
        ...
        272       <env key="HCAT_BIN" value="${hcat.bin}"/>
        

        I don't know why it's written this way but in order to test with a different path, please pass

        ant test-e2e -Dhcat.bin=/custompath/hcat ...
        
        Show
        Koji Noguchi added a comment - Thanks Alan for taking a look at my patch! I tried setting the HCAT_BIN environment variable to where I had HCat installed (which isn't /usr/local/hcat/bin) but that did not help. Even without my patch, your HCAT_BIN is being ignored. Inside test/e2e/pig/build.xml, 104 <condition property="hcat.bin" value="/usr/local/hcat/bin/hcat"> 105 <not> 106 <isset property="hcat.bin"/> 107 </not> 108 </condition> ... 272 <env key="HCAT_BIN" value="${hcat.bin}"/> I don't know why it's written this way but in order to test with a different path, please pass ant test-e2e -Dhcat.bin=/custompath/hcat ...
        Hide
        Julien Le Dem added a comment -

        Hey Cheolsoo Park should we detach this from Pig 0.11 ?

        Show
        Julien Le Dem added a comment - Hey Cheolsoo Park should we detach this from Pig 0.11 ?
        Hide
        Cheolsoo Park added a comment -

        Hi Julien, yes, I just did.

        Show
        Cheolsoo Park added a comment - Hi Julien, yes, I just did.

          People

          • Assignee:
            Unassigned
            Reporter:
            Koji Noguchi
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:

              Development