Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> Compiling Hive ODBC


Copy link to this message
-
Re: Compiling Hive ODBC
So... could finally compile Hive ODBC by patching the Thrift.h header...

I think there is some configure header issue with the HAVE_* constants
the are defined in the <THRIFT_HOME>/include/thrift/config.h header.

It will only include the required headers if HAVE_CONFIG_H is defined:

#define HAVE_CONFIG_H 1      <--------- added line
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

Or is there a way to pass this define to ant ?

Seb

On 04/30/2013 04:39 PM, Sebastien FLAESCH wrote:
> FYI:
>
> hive@orca:~/hive-0.10.0/src$ g++ --version
> g++ (Debian 4.4.5-8) 4.4.5
>
> Seb
>
> On 04/30/2013 04:13 PM, Sebastien FLAESCH wrote:
>> Making some progress...
>>
>> After disabling some options to build thrift - because it installs some
>> files in the system directory (/usr/lib/php), and I - do not - want that,
>> I did following configure for thrift:
>>
>> ./configure --prefix=/home/hive/thrift-0.9.0 \
>> --with-qt4=no \
>> --with-csharp=no \
>> --with-erlang=no \
>> --with-python=no \
>> --with-perl=no \
>> --with-php=no \
>> --with-php_extension=no \
>> --with-ruby=no \
>> --with-haskell=no \
>> --with-go=no \
>> --with-d=no
>>
>> Then I could build thrift and fb303, but not when I try to build Hive
>> ODBC:
>>
>> hive@orca:~/hive-0.10.0/src$ ant compile-cpp -Dthrift.home=$THRIFT_HOME
>> ...
>> ...
>> ...
>> [exec] g++ -Wall -g -fPIC -m32 -DARCH32
>> -I/home/hive/thrift-0.9.0/include/thrift
>> -I/home/hive/thrift-0.9.0/include/thrift/fb303 -I/include
>> -I/home/hive/hive-0.10.0/src/service/src/gen/thrift/gen-cpp
>> -I/home/hive/hive-0.10.0/src/ql/src/gen/thrift/gen-cpp
>> -I/home/hive/hive-0.10.0/src/metastore/src/gen/thrift/gen-cpp
>> -I/home/hive/hive-0.10.0/src/odbc/src/cpp -c
>> /home/hive/hive-0.10.0/src/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
>>
>> -o /home/hive/hive-0.10.0/src/build/metastore/objs/ThriftHiveMetastore.o
>> [exec] In file included from
>> /usr/local/include/thrift/protocol/TProtocol.h:23,
>> [exec] from /usr/local/include/thrift/TProcessor.h:24,
>> [exec] from /usr/local/include/thrift/TDispatchProcessor.h:22,
>> [exec] from
>> /home/hive/hive-0.10.0/src/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h:10,
>>
>>
>> [exec] from
>> /home/hive/hive-0.10.0/src/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp:7:
>>
>>
>> [exec] /usr/local/include/thrift/transport/TTransport.h:34: error:
>> expected constructor, destructor, or type conversion before �readAll�
>> [exec] /usr/local/include/thrift/transport/TTransport.h:107: error:
>> �uint32_t� does not name a type
>> [exec] /usr/local/include/thrift/transport/TTransport.h:111: error:
>> �uint32_t� does not name a type
>> [exec] /usr/local/include/thrift/transport/TTransport.h:124: error:
>> �uint32_t� does not name a type
>> [exec] /usr/local/include/thrift/transport/TTransport.h:128: error:
>> �uint32_t� does not name a type
>> [exec] /usr/local/include/thrift/transport/TTransport.h:139: error:
>> �uint32_t� does not name a type
>>
>>
>> Any idea?
>>
>> Thanks
>> Seb
>>
>> On 04/30/2013 11:00 AM, Sebastien FLAESCH wrote:
>>> Thank you Carl, but I still have problems to build Hive ODBC:
>>>
>>> I followed the instruction from this page (I believe the doc is wrong):
>>>
>>> https://cwiki.apache.org/Hive/hiveodbc.html
>>>
>>> Where it says:
>>>
>>> "Build the Hive client by running the following command from
>>> HIVE_HOME..."
>>>
>>> Here is my env:
>>>
>>> ----------------------------------------------------------
>>> hive@orca:~$ cat env-apache.sh
>>> JAVA_HOME="/usr/lib/jvm/java-6-sun"
>>> export JAVA_HOME
>>> JRE_HOME="$JAVA_HOME/jre"
>>> export JRE_HOME
>>> PATH=$JAVA_HOME/bin:$PATH
>>>
>>> HADOOP_HOME=/home/hive/hadoop-0.23.7
>>> export HADOOP_HOME
>>> PATH=$HADOOP_HOME/bin:$PATH
>>> export PATH
>>>
>>> HIVE_HOME=/home/hive/hive-0.10.0
>>> export HIVE_HOME
>>> PATH=$HIVE_HOME/bin:$PATH
>>> export PATH
>>>
>>> THRIFT_HOME=/home/hive/thrift-0.9.0
>>> export THRIFT_HOME
>>> --------------------------------------
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB