Impala
Impalaistheopensource,nativeanalyticdatabaseforApacheHadoop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
parquet-reader.cc File Reference
#include <iostream>
#include <sstream>
#include <vector>
#include <gflags/gflags.h>
#include <snappy.h>
#include "gen-cpp/parquet_types.h"
#include <thrift/protocol/TCompactProtocol.h>
#include <thrift/protocol/TBinaryProtocol.h>
#include <thrift/protocol/TDebugProtocol.h>
#include <thrift/TApplicationException.h>
#include <thrift/transport/TBufferTransports.h>
#include "util/rle-encoding.h"
#include "common/names.h"
Include dependency graph for parquet-reader.cc:

Go to the source code of this file.

Macros

#define SIGNED_RIGHT_SHIFT_IS   1
 
#define ARITHMETIC_RIGHT_SHIFT   1
 

Functions

 DEFINE_string (file,"","File to read")
 
 DEFINE_bool (output_page_header, false,"If true, output page headers to stderr.")
 
shared_ptr< TProtocol > CreateDeserializeProtocol (shared_ptr< TMemoryBuffer > mem, bool compact)
 
template<class T >
bool DeserializeThriftMsg (uint8_t *buf, uint32_t *len, bool compact, T *deserialized_msg)
 
string TypeMapping (Type::type t)
 
void AppendSchema (const vector< SchemaElement > &schema, int level, int *idx, stringstream *ss)
 
string GetSchema (const FileMetaData &md)
 
int main (int argc, char **argv)
 

Variables

const uint8_t PARQUET_VERSION_NUMBER [] = {'P', 'A', 'R', '1'}
 

Macro Definition Documentation

#define ARITHMETIC_RIGHT_SHIFT   1

Definition at line 25 of file parquet-reader.cc.

#define SIGNED_RIGHT_SHIFT_IS   1

Definition at line 24 of file parquet-reader.cc.

Function Documentation

void AppendSchema ( const vector< SchemaElement > &  schema,
int  level,
int *  idx,
stringstream *  ss 
)

Definition at line 101 of file parquet-reader.cc.

References gen_ir_descriptions::idx, and TypeMapping().

Referenced by GetSchema().

shared_ptr<TProtocol> CreateDeserializeProtocol ( shared_ptr< TMemoryBuffer >  mem,
bool  compact 
)

Definition at line 51 of file parquet-reader.cc.

Referenced by DeserializeThriftMsg().

DEFINE_bool ( output_page_header  ,
false  ,
"If  true,
output page headers to stderr."   
)
DEFINE_string ( file  ,
""  ,
"File to read"   
)
template<class T >
bool DeserializeThriftMsg ( uint8_t *  buf,
uint32_t *  len,
bool  compact,
T *  deserialized_msg 
)
string GetSchema ( const FileMetaData &  md)

Definition at line 117 of file parquet-reader.cc.

References AppendSchema(), and gen_ir_descriptions::idx.

Referenced by main().

int main ( int  argc,
char **  argv 
)

Definition at line 136 of file parquet-reader.cc.

References DeserializeThriftMsg(), GetSchema(), and PARQUET_VERSION_NUMBER.

string TypeMapping ( Type::type  t)

Definition at line 82 of file parquet-reader.cc.

Referenced by AppendSchema().

Variable Documentation

const uint8_t PARQUET_VERSION_NUMBER[] = {'P', 'A', 'R', '1'}

Definition at line 49 of file parquet-reader.cc.

Referenced by main().