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 Plain View
Hive >> mail # dev >> perl code generated from thrift


Copy link to this message
-
perl code generated from thrift
Hi Good People,
I am totally stumped on this one. Wondered if a "perl" bindings chap on
this list might be able to help me.

I generated the ThrftHive.pm class as follows (see below) from my download
area.  I've tested some basic examples of querying - and it works well.
 The one thing that i can't get to work, though, is a call to
"$client->getSchema()" in order to ascertain the schema of a result set.

* this built ThriftHIve.pm

$ thrift -r \
   -I $HOME/downloads/hive-0.9.0/src/ql \
   -I $HOME/downloads/hive-0.9.0/src \
   -I $HOME/downloads/thrift-0.8.0 \
\
  -gen perl \
\
  $HOME/downloads/hive-0.9.0/src/service/if/hive_service.thrift
* in hive_service.thrift here are the relevant lines (that i can tell)

#the includes
  include "contrib/fb303/if/fb303.thrift"
  include "metastore/if/hive_metastore.thrift"
  include "ql/if/queryplan.thrift"
  namespace java org.apache.hadoop.hive.service
  namespace cpp Apache.Hadoop.Hive

  <snip>
#the getSchema() reference
   service ThriftHive extends hive_metastore.ThriftHiveMetastore {
   <snip>
     # Get a schema object with fields represented with native Hive types
     hive_metastore.Schema getSchema() throws(1:HiveServerException ex)
* the relevant line in ThriftHive.pm that throws an undefined method call:

Undefined subroutine &ThriftHive_getSchema_result::Schema called at
/home/spragues/downloads/thrift-0.8.0/gen-perl/ThriftHive.pm line 672.

        $self->{success} = new Schema();
        $xfer += $self->{success}->read($input);
Where 'o where is this "Schema" class supposed to be? Any pointers, clues,
suggestions, bread crumbs most welcome!

Thanks
Stephen
+
Edward Capriolo 2012-05-29, 16:00
+
Stephen Sprague 2012-05-29, 17:34
+
Edward Capriolo 2012-05-29, 20:40
+
Stephen Sprague 2012-05-29, 20:52
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