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

Chris Nauroth commented on MAPREDUCE-6536:
------------------------------------------

Hi [~aw].  This looks mostly good to me.  I think there are a few bits that 
were picked up from the hadoop-common CMakeLists.txt that might not be relevant 
here in hadoop-pipes.

{code}
find_path(OPENSSL_INCLUDE_DIR
    NAMES openssl/evp.h
    PATHS ${CUSTOM_OPENSSL_PREFIX} ${CUSTOM_OPENSSL_PREFIX}/include
          ${CUSTOM_OPENSSL_INCLUDE} NO_DEFAULT_PATH)
find_path(OPENSSL_INCLUDE_DIR NAMES openssl/evp.h)
{code}

I don't see the Pipes code including evp.h.  Here are the headers I see 
included by HadoopPipes.cc.

{code}
#include <openssl/hmac.h>
#include <openssl/buffer.h>
{code}

{code}
set(USABLE_OPENSSL 0)
if(OPENSSL_LIBRARY AND OPENSSL_INCLUDE_DIR)
    SET(USABLE_OPENSSL 1)
endif()
if(USABLE_OPENSSL)
...
{code}

I don't think the {{USABLE_OPENSSL}} variable is necessary.  In hadoop-common, 
there is some trickier logic about detecting whether or not the installed 
OpenSSL has the AES-NI extensions required to make it usable, and it was 
helpful to capture that in a boolean variable.  Here, it's just a simple check 
for whether or not the library and headers can be found.

Since hadoop-pipes cannot compile at all without OpenSSL, would it make sense 
to remove {{require.openssl}} and make "SSL required" be enforced always?  By 
checking it in CMake, we can give a nicer error compared to whatever the 
compiler or linker would spit out.

Let me know your thoughts.

> hadoop-pipes doesn't use maven properties for openssl
> -----------------------------------------------------
>
>                 Key: MAPREDUCE-6536
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-6536
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: pipes
>    Affects Versions: 3.0.0
>         Environment: OS X
>            Reporter: Allen Wittenauer
>            Assignee: Allen Wittenauer
>            Priority: Blocker
>         Attachments: HADOOP-12518.00.patch, HADOOP-12518.01.patch, 
> HADOOP-12518.02.patch, HADOOP-12518.03.patch
>
>
> hadoop-common has some maven properties that are used to define where OpenSSL 
> lives.  hadoop-pipes should also use them so we can enable automated testing.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to