You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@parquet.apache.org by ju...@apache.org on 2016/03/02 02:35:55 UTC

parquet-cpp git commit: PARQUET-482: Organize public API headers

Repository: parquet-cpp
Updated Branches:
  refs/heads/master 57383cf3c -> 5a624c069


PARQUET-482: Organize public API headers

Feedback requested. I'll add some simple Markdown documentation for the public API if we agree on the general approach.

Author: Wes McKinney <we...@apache.org>

Closes #70 from wesm/PARQUET-482 and squashes the following commits:

60230ea [Wes McKinney] Organize public API headers in parquet/api. Remove unneeded dict-encoding.h and parquet/parquet.h


Project: http://git-wip-us.apache.org/repos/asf/parquet-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/parquet-cpp/commit/5a624c06
Tree: http://git-wip-us.apache.org/repos/asf/parquet-cpp/tree/5a624c06
Diff: http://git-wip-us.apache.org/repos/asf/parquet-cpp/diff/5a624c06

Branch: refs/heads/master
Commit: 5a624c06985aa148bc1456ead414db1c5453b609
Parents: 57383cf
Author: Wes McKinney <we...@apache.org>
Authored: Tue Mar 1 17:35:52 2016 -0800
Committer: Julien Le Dem <ju...@dremio.com>
Committed: Tue Mar 1 17:35:52 2016 -0800

----------------------------------------------------------------------
 CMakeLists.txt                              |  1 +
 example/decode_benchmark.cc                 |  1 -
 example/parquet-dump-schema.cc              |  7 ++--
 example/parquet_reader.cc                   |  4 +--
 src/parquet/CMakeLists.txt                  |  1 -
 src/parquet/api/CMakeLists.txt              | 23 ++++++++++++
 src/parquet/api/io.h                        | 26 ++++++++++++++
 src/parquet/api/reader.h                    | 32 +++++++++++++++++
 src/parquet/api/schema.h                    | 26 ++++++++++++++
 src/parquet/encodings/dictionary-encoding.h |  1 -
 src/parquet/encodings/encoding-test.cc      |  1 -
 src/parquet/parquet.h                       | 46 ------------------------
 src/parquet/public-api-test.cc              |  5 ++-
 src/parquet/util/CMakeLists.txt             |  4 +--
 src/parquet/util/dict-encoding.h            | 36 -------------------
 15 files changed, 119 insertions(+), 95 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/5a624c06/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b84c3f3..cf6b2a2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -345,6 +345,7 @@ if(APPLE)
 endif()
 
 add_subdirectory(src/parquet)
+add_subdirectory(src/parquet/api)
 add_subdirectory(src/parquet/column)
 add_subdirectory(src/parquet/compression)
 add_subdirectory(src/parquet/encodings)

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/5a624c06/example/decode_benchmark.cc
----------------------------------------------------------------------
diff --git a/example/decode_benchmark.cc b/example/decode_benchmark.cc
index a4fd697..63d0d14 100644
--- a/example/decode_benchmark.cc
+++ b/example/decode_benchmark.cc
@@ -15,7 +15,6 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <parquet/parquet.h>
 #include <iostream>
 #include <stdio.h>
 

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/5a624c06/example/parquet-dump-schema.cc
----------------------------------------------------------------------
diff --git a/example/parquet-dump-schema.cc b/example/parquet-dump-schema.cc
index d8eb2ee..63ec800 100644
--- a/example/parquet-dump-schema.cc
+++ b/example/parquet-dump-schema.cc
@@ -15,12 +15,11 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <parquet/parquet.h>
-#include <parquet/schema/converter.h>
-#include <parquet/schema/printer.h>
-
 #include <iostream>
 
+#include <parquet/api/reader.h>
+#include <parquet/api/schema.h>
+
 using namespace parquet_cpp;
 
 int main(int argc, char** argv) {

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/5a624c06/example/parquet_reader.cc
----------------------------------------------------------------------
diff --git a/example/parquet_reader.cc b/example/parquet_reader.cc
index c4c2352..1712ce5 100644
--- a/example/parquet_reader.cc
+++ b/example/parquet_reader.cc
@@ -15,11 +15,11 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include <parquet/parquet.h>
-
 #include <iostream>
 #include <memory>
 
+#include <parquet/api/reader.h>
+
 using namespace parquet_cpp;
 
 int main(int argc, char** argv) {

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/5a624c06/src/parquet/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/parquet/CMakeLists.txt b/src/parquet/CMakeLists.txt
index 8a9b860..a2ebbad 100644
--- a/src/parquet/CMakeLists.txt
+++ b/src/parquet/CMakeLists.txt
@@ -17,7 +17,6 @@
 
 # Headers: top level
 install(FILES
-  parquet.h
   exception.h
   types.h
   DESTINATION include/parquet)

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/5a624c06/src/parquet/api/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/parquet/api/CMakeLists.txt b/src/parquet/api/CMakeLists.txt
new file mode 100644
index 0000000..89151f0
--- /dev/null
+++ b/src/parquet/api/CMakeLists.txt
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Headers: public api
+install(FILES
+  io.h
+  reader.h
+  schema.h
+  DESTINATION include/parquet/api)

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/5a624c06/src/parquet/api/io.h
----------------------------------------------------------------------
diff --git a/src/parquet/api/io.h b/src/parquet/api/io.h
new file mode 100644
index 0000000..a8e555d
--- /dev/null
+++ b/src/parquet/api/io.h
@@ -0,0 +1,26 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#ifndef PARQUET_API_IO_H
+#define PARQUET_API_IO_H
+
+#include "parquet/exception.h"
+#include "parquet/util/buffer.h"
+#include "parquet/util/input.h"
+#include "parquet/util/output.h"
+
+#endif // PARQUET_API_IO_H

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/5a624c06/src/parquet/api/reader.h
----------------------------------------------------------------------
diff --git a/src/parquet/api/reader.h b/src/parquet/api/reader.h
new file mode 100644
index 0000000..41cb06b
--- /dev/null
+++ b/src/parquet/api/reader.h
@@ -0,0 +1,32 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#ifndef PARQUET_API_READER_H
+#define PARQUET_API_READER_H
+
+// Column reader API
+#include "parquet/column/reader.h"
+#include "parquet/exception.h"
+#include "parquet/file/reader.h"
+
+// Schemas
+#include "parquet/api/schema.h"
+
+// IO
+#include "parquet/api/io.h"
+
+#endif // PARQUET_API_READER_H

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/5a624c06/src/parquet/api/schema.h
----------------------------------------------------------------------
diff --git a/src/parquet/api/schema.h b/src/parquet/api/schema.h
new file mode 100644
index 0000000..aca6c99
--- /dev/null
+++ b/src/parquet/api/schema.h
@@ -0,0 +1,26 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#ifndef PARQUET_API_SCHEMA_H
+#define PARQUET_API_SCHEMA_H
+
+// Schemas
+#include "parquet/schema/descriptor.h"
+#include "parquet/schema/printer.h"
+#include "parquet/schema/types.h"
+
+#endif // PARQUET_API_SCHEMA_H

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/5a624c06/src/parquet/encodings/dictionary-encoding.h
----------------------------------------------------------------------
diff --git a/src/parquet/encodings/dictionary-encoding.h b/src/parquet/encodings/dictionary-encoding.h
index 93780a1..43669b7 100644
--- a/src/parquet/encodings/dictionary-encoding.h
+++ b/src/parquet/encodings/dictionary-encoding.h
@@ -28,7 +28,6 @@
 #include "parquet/encodings/encoder.h"
 #include "parquet/encodings/plain-encoding.h"
 #include "parquet/util/cpu-info.h"
-#include "parquet/util/dict-encoding.h"
 #include "parquet/util/hash-util.h"
 #include "parquet/util/mem-pool.h"
 #include "parquet/util/rle-encoding.h"

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/5a624c06/src/parquet/encodings/encoding-test.cc
----------------------------------------------------------------------
diff --git a/src/parquet/encodings/encoding-test.cc b/src/parquet/encodings/encoding-test.cc
index e74f4ff..490047c 100644
--- a/src/parquet/encodings/encoding-test.cc
+++ b/src/parquet/encodings/encoding-test.cc
@@ -29,7 +29,6 @@
 #include "parquet/schema/types.h"
 #include "parquet/util/bit-util.h"
 #include "parquet/util/buffer.h"
-#include "parquet/util/dict-encoding.h"
 #include "parquet/util/output.h"
 #include "parquet/util/test-common.h"
 

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/5a624c06/src/parquet/parquet.h
----------------------------------------------------------------------
diff --git a/src/parquet/parquet.h b/src/parquet/parquet.h
deleted file mode 100644
index ea8ab5e..0000000
--- a/src/parquet/parquet.h
+++ /dev/null
@@ -1,46 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-#ifndef PARQUET_PARQUET_H
-#define PARQUET_PARQUET_H
-
-#include <exception>
-#include <cstdint>
-#include <cstring>
-#include <memory>
-#include <string>
-#include <unordered_map>
-#include <vector>
-
-#include "parquet/exception.h"
-
-// Column reader API
-#include "parquet/column/reader.h"
-
-// File API
-#include "parquet/file/reader.h"
-
-// Schemas
-#include "parquet/schema/descriptor.h"
-#include "parquet/schema/printer.h"
-#include "parquet/schema/types.h"
-
-// IO
-#include "parquet/util/input.h"
-#include "parquet/util/output.h"
-
-#endif

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/5a624c06/src/parquet/public-api-test.cc
----------------------------------------------------------------------
diff --git a/src/parquet/public-api-test.cc b/src/parquet/public-api-test.cc
index 4103714..951c13e 100644
--- a/src/parquet/public-api-test.cc
+++ b/src/parquet/public-api-test.cc
@@ -16,7 +16,10 @@
 // under the License.
 
 #include <gtest/gtest.h>
-#include "parquet/parquet.h"
+
+#include "parquet/api/io.h"
+#include "parquet/api/reader.h"
+#include "parquet/api/schema.h"
 
 namespace parquet_cpp {
 

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/5a624c06/src/parquet/util/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/parquet/util/CMakeLists.txt b/src/parquet/util/CMakeLists.txt
index c8d2c2f..5cb7b2f 100644
--- a/src/parquet/util/CMakeLists.txt
+++ b/src/parquet/util/CMakeLists.txt
@@ -20,10 +20,10 @@ install(FILES
   bit-stream-utils.h
   bit-stream-utils.inline.h
   bit-util.h
+  buffer.h
   buffer-builder.h
   compiler-util.h
   cpu-info.h
-  dict-encoding.h
   hash-util.h
   input.h
   logging.h
@@ -32,7 +32,7 @@ install(FILES
   output.h
   rle-encoding.h
   stopwatch.h
-  sse-info.h
+  sse-util.h
   DESTINATION include/parquet/util)
 
 add_library(parquet_util STATIC

http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/5a624c06/src/parquet/util/dict-encoding.h
----------------------------------------------------------------------
diff --git a/src/parquet/util/dict-encoding.h b/src/parquet/util/dict-encoding.h
deleted file mode 100644
index 315b88e..0000000
--- a/src/parquet/util/dict-encoding.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-#ifndef PARQUET_UTIL_DICT_ENCODING_H
-#define PARQUET_UTIL_DICT_ENCODING_H
-
-#include <algorithm>
-#include <cstdint>
-#include <limits>
-#include <vector>
-
-#include "parquet/types.h"
-#include "parquet/encodings/plain-encoding.h"
-#include "parquet/util/hash-util.h"
-#include "parquet/util/mem-pool.h"
-#include "parquet/util/rle-encoding.h"
-
-namespace parquet_cpp {
-
-} // namespace parquet_cpp
-
-#endif // PARQUET_UTIL_DICT_ENCODING_H