Friday, February 20, 2015

How to switch Impala file client from MapR C++ Client to Hadoop JAVA Client?

Impala on MapR uses MapR C++ File Client by default.
For example:
/opt/mapr/impala/impala-1.4.1/lib/libhdfs.so  -> /opt/mapr/lib/libMapRClient.so
/opt/mapr/impala/impala-1.4.1/lib/libhdfs.so.0 -> /opt/mapr/lib/libMapRClient.so
/opt/mapr/impala/impala-1.4.1/lib/libhdfs.so.0.0.0 -> /opt/mapr/lib/libMapRClient.so
You can also change the file client to Hadoop JAVA file client.
For example:
/opt/mapr/impala/impala-1.4.1/lib/libhdfs.so -> /opt/mapr/hadoop/hadoop-2.4.1/lib/native/libhdfs.so
/opt/mapr/impala/impala-1.4.1/lib/libhdfs.so.0 -> /opt/mapr/hadoop/hadoop-2.4.1/lib/native/libhdfs.so
/opt/mapr/impala/impala-1.4.1/lib/libhdfs.so.0.0.0 -> /opt/mapr/hadoop/hadoop-2.4.1/lib/native/libhdfs.so

Here are 2 shell scripts to switch the file clients to:

1. C++ File Client

clush -a rm /opt/mapr/impala/impala-1.4.1/lib/libhdfs.so
clush -a rm /opt/mapr/impala/impala-1.4.1/lib/libhdfs.so.0 
clush -a rm /opt/mapr/impala/impala-1.4.1/lib/libhdfs.so.0.0.0
clush -a ln -s /opt/mapr/lib/libMapRClient.so /opt/mapr/impala/impala-1.4.1/lib/libhdfs.so
clush -a ln -s /opt/mapr/lib/libMapRClient.so /opt/mapr/impala/impala-1.4.1/lib/libhdfs.so.0
clush -a ln -s /opt/mapr/lib/libMapRClient.so /opt/mapr/impala/impala-1.4.1/lib/libhdfs.so.0.0.0 
clush -a ls -altr /opt/mapr/impala/impala-1.4.1/lib/libhdfs.so*

2. JAVA File Client

clush -a rm /opt/mapr/impala/impala-1.4.1/lib/libhdfs.so
clush -a rm /opt/mapr/impala/impala-1.4.1/lib/libhdfs.so.0 
clush -a rm /opt/mapr/impala/impala-1.4.1/lib/libhdfs.so.0.0.0
clush -a ln -s /opt/mapr/hadoop/hadoop-2.4.1/lib/native/libhdfs.so /opt/mapr/impala/impala-1.4.1/lib/libhdfs.so
clush -a ln -s /opt/mapr/hadoop/hadoop-2.4.1/lib/native/libhdfs.so /opt/mapr/impala/impala-1.4.1/lib/libhdfs.so.0
clush -a ln -s /opt/mapr/hadoop/hadoop-2.4.1/lib/native/libhdfs.so /opt/mapr/impala/impala-1.4.1/lib/libhdfs.so.0.0.0 
clush -a ls -altr /opt/mapr/impala/impala-1.4.1/lib/libhdfs.so*

No comments:

Post a Comment

Popular Posts