From 6659e3ddec38072b2b6e9d456149e86c202744f0 Mon Sep 17 00:00:00 2001 From: Kalon Mills Date: Mon, 20 Apr 2015 16:31:18 -0600 Subject: [PATCH 1/6] Remove superfluous dependencies. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bd742ba3..ad0ed5f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,7 +27,7 @@ set(CMAKE_PREFIX_PATH ${THIRDPARTY_PREFIX}) # find boost headers and libs set(Boost_DEBUG TRUE) set(Boost_USE_MULTITHREADED ON) -find_package(Boost REQUIRED COMPONENTS thread regex-mt system-mt filesystem-mt) +find_package(Boost REQUIRED) include_directories(SYSTEM ${Boost_INCLUDE_DIRS}) set(LIBS ${LIBS} ${Boost_LIBRARIES}) message(STATUS "Boost include dir: " ${Boost_INCLUDE_DIRS}) From 64675dead2544b271a4b75a690da621c0b213e9b Mon Sep 17 00:00:00 2001 From: Kalon Mills Date: Tue, 21 Apr 2015 12:15:10 -0600 Subject: [PATCH 2/6] Initial Travis CI support. --- .travis.yml | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..d434735a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,40 @@ +language: cpp + +compiler: + - gcc + - clang + +addons: + apt: + packages: + - libboost-dev + #- libsnappy-dev currently handled by thirdparty scipts. + - libboost-program-options-dev #needed for thrift cpp compilation + - libboost-test-dev #needed for thrift cpp compilation + - libssl-dev #needed for thrift cpp compilation + - libtool #needed for thrift cpp compilation + - bison #needed for thrift cpp compilation + - flex #needed for thrift cpp compilation + - pkg-config #needed for thrift cpp compilation + +before_install: + - pushd thirdparty + # thrift cpp + - wget http://www.us.apache.org/dist/thrift/0.9.1/thrift-0.9.1.tar.gz + - tar xfz thrift-0.9.1.tar.gz + - pushd thrift-0.9.1 + - ./configure --without-qt4 --without-c_glib --without-csharp --without-java --without-erlang --without-nodejs --without-lua --without-python --without-perl --without-php --without-php_extension --without-ruby --without-haskell --without-go --without-d --with-cpp --prefix=$HOME/local + - make clean #for some reason doing this first creates some depedency that the regular Makefile misses + - make install + - popd + # snappy and lz4 + - ./download_thirdparty.sh + - ./build_thirdparty.sh + - popd + +before_script: + - mkdir build + - cd build + - THRIFT_HOME=$HOME/local cmake .. + +script: make From b20cb84ce6d6b04b4df8eb9b674e03615a1439b3 Mon Sep 17 00:00:00 2001 From: Kashif Rasul Date: Mon, 23 Mar 2015 22:05:04 +0100 Subject: [PATCH 3/6] fix stopwatch for os x and linux --- src/util/stopwatch.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/util/stopwatch.h b/src/util/stopwatch.h index bfdb4e97..145f1301 100644 --- a/src/util/stopwatch.h +++ b/src/util/stopwatch.h @@ -17,6 +17,8 @@ #include #include +#include +#include namespace parquet_cpp { @@ -26,22 +28,22 @@ class StopWatch { } void Start() { - clock_gettime(CLOCK_MONOTONIC, &start_); + gettimeofday(&start_time, 0); } // Returns time in nanoseconds. uint64_t Stop() { - timespec end; - clock_gettime(CLOCK_MONOTONIC, &end); - return (end.tv_sec - start_.tv_sec) * 1000L * 1000L * 1000L + - (end.tv_nsec - start_.tv_nsec); + struct timeval t_time; + gettimeofday(&t_time, 0); + + return (1000L * 1000L * 1000L * (t_time.tv_sec - start_time.tv_sec) + + (t_time.tv_usec - start_time.tv_usec)); } private: - timespec start_; + struct timeval start_time; }; } #endif - From bffeae997e42b9a19156043da554b8116890c1bf Mon Sep 17 00:00:00 2001 From: Kalon Mills Date: Tue, 21 Apr 2015 15:04:59 -0600 Subject: [PATCH 4/6] Fix osx include and remove superfluous library link. --- example/CMakeLists.txt | 1 - src/impala/bit-util.h | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 1f598560..8844cdd3 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -21,7 +21,6 @@ SET(LINK_LIBS Parquet ParquetCompression Example - rt ThriftParquet thriftstatic lz4static diff --git a/src/impala/bit-util.h b/src/impala/bit-util.h index 0c9c32d5..c2b6055a 100644 --- a/src/impala/bit-util.h +++ b/src/impala/bit-util.h @@ -16,7 +16,11 @@ #ifndef IMPALA_BIT_UTIL_H #define IMPALA_BIT_UTIL_H -#include +#if defined(__APPLE__) + #include +#else + #include +#endif #include "impala/compiler-util.h" #include "impala/logging.h" From 1c4f376784ba686a957b9c3b96f6789fc540a2fa Mon Sep 17 00:00:00 2001 From: Kalon Mills Date: Tue, 21 Apr 2015 17:10:09 -0600 Subject: [PATCH 5/6] Support osx build in Travis CI. --- .travis.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index d434735a..58b7641f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,10 @@ compiler: - gcc - clang +os: + - linux + - osx + addons: apt: packages: @@ -20,13 +24,17 @@ addons: before_install: - pushd thirdparty # thrift cpp - - wget http://www.us.apache.org/dist/thrift/0.9.1/thrift-0.9.1.tar.gz - - tar xfz thrift-0.9.1.tar.gz - - pushd thrift-0.9.1 - - ./configure --without-qt4 --without-c_glib --without-csharp --without-java --without-erlang --without-nodejs --without-lua --without-python --without-perl --without-php --without-php_extension --without-ruby --without-haskell --without-go --without-d --with-cpp --prefix=$HOME/local - - make clean #for some reason doing this first creates some depedency that the regular Makefile misses - - make install - - popd + - > + if [ $TRAVIS_OS_NAME == linux ]; then + wget http://www.us.apache.org/dist/thrift/0.9.1/thrift-0.9.1.tar.gz && + tar xfz thrift-0.9.1.tar.gz && + pushd thrift-0.9.1 && + ./configure --without-qt4 --without-c_glib --without-csharp --without-java --without-erlang --without-nodejs --without-lua --without-python --without-perl --without-php --without-php_extension --without-ruby --without-haskell --without-go --without-d --with-cpp --prefix=$HOME/local && + make clean && + make install && + popd; + fi + - if [ $TRAVIS_OS_NAME == osx ]; then brew install thrift; fi # snappy and lz4 - ./download_thirdparty.sh - ./build_thirdparty.sh From 71be03bb93496aa1782a69f75d9e06e3659e6363 Mon Sep 17 00:00:00 2001 From: Kalon Mills Date: Wed, 22 Apr 2015 11:22:37 -0600 Subject: [PATCH 6/6] Add build status image to README.md. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aee1e4ec..3af78d62 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Parquet-cpp +Parquet-cpp [![Build Status](https://travis-ci.org/apache/parquet-cpp.svg)](https://travis-ci.org/apache/parquet-cpp) =========== A C++ library to read parquet files.