You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2017/09/06 23:25:57 UTC
arrow git commit: ARROW-1451: [C++] Add public API file for IO
section in arrow/io/api.h
Repository: arrow
Updated Branches:
refs/heads/master 54d624b2e -> 3d285c69d
ARROW-1451: [C++] Add public API file for IO section in arrow/io/api.h
Author: Wes McKinney <we...@twosigma.com>
Closes #1057 from wesm/ARROW-1451 and squashes the following commits:
deb802f9 [Wes McKinney] Add public API file for IO tools in arrow/io/api.h, use in pyarrow
Project: http://git-wip-us.apache.org/repos/asf/arrow/repo
Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/3d285c69
Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/3d285c69
Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/3d285c69
Branch: refs/heads/master
Commit: 3d285c69dd7ece1821f4042ed9fdc87dbb1eb623
Parents: 54d624b
Author: Wes McKinney <we...@twosigma.com>
Authored: Wed Sep 6 19:25:52 2017 -0400
Committer: Wes McKinney <we...@twosigma.com>
Committed: Wed Sep 6 19:25:52 2017 -0400
----------------------------------------------------------------------
cpp/src/arrow/io/CMakeLists.txt | 1 +
cpp/src/arrow/io/api.h | 26 ++++++++++++++++++++++++++
python/pyarrow/includes/libarrow.pxd | 10 +++-------
3 files changed, 30 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/arrow/blob/3d285c69/cpp/src/arrow/io/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/cpp/src/arrow/io/CMakeLists.txt b/cpp/src/arrow/io/CMakeLists.txt
index 544b4b7..f355738 100644
--- a/cpp/src/arrow/io/CMakeLists.txt
+++ b/cpp/src/arrow/io/CMakeLists.txt
@@ -28,6 +28,7 @@ ADD_ARROW_BENCHMARK(io-memory-benchmark)
# Headers: top level
install(FILES
+ api.h
file.h
hdfs.h
interfaces.h
http://git-wip-us.apache.org/repos/asf/arrow/blob/3d285c69/cpp/src/arrow/io/api.h
----------------------------------------------------------------------
diff --git a/cpp/src/arrow/io/api.h b/cpp/src/arrow/io/api.h
new file mode 100644
index 0000000..9f26d95
--- /dev/null
+++ b/cpp/src/arrow/io/api.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 ARROW_IO_API_H
+#define ARROW_IO_API_H
+
+#include "arrow/io/file.h"
+#include "arrow/io/hdfs.h"
+#include "arrow/io/interfaces.h"
+#include "arrow/io/memory.h"
+
+#endif // ARROW_IO_API_H
http://git-wip-us.apache.org/repos/asf/arrow/blob/3d285c69/python/pyarrow/includes/libarrow.pxd
----------------------------------------------------------------------
diff --git a/python/pyarrow/includes/libarrow.pxd b/python/pyarrow/includes/libarrow.pxd
index 6bb8702..756b213 100644
--- a/python/pyarrow/includes/libarrow.pxd
+++ b/python/pyarrow/includes/libarrow.pxd
@@ -419,7 +419,7 @@ cdef extern from "arrow/api.h" namespace "arrow" nogil:
shared_ptr[CTable]* result)
-cdef extern from "arrow/io/interfaces.h" namespace "arrow::io" nogil:
+cdef extern from "arrow/io/api.h" namespace "arrow::io" nogil:
enum FileMode" arrow::io::FileMode::type":
FileMode_READ" arrow::io::FileMode::READ"
FileMode_WRITE" arrow::io::FileMode::WRITE"
@@ -473,9 +473,6 @@ cdef extern from "arrow/io/interfaces.h" namespace "arrow::io" nogil:
cdef cppclass FileSystem:
CStatus Stat(const c_string& path, FileStatistics* stat)
-
-cdef extern from "arrow/io/file.h" namespace "arrow::io" nogil:
-
cdef cppclass FileOutputStream(OutputStream):
@staticmethod
CStatus Open(const c_string& path, shared_ptr[FileOutputStream]* file)
@@ -505,8 +502,9 @@ cdef extern from "arrow/io/file.h" namespace "arrow::io" nogil:
int file_descriptor()
+ # ----------------------------------------------------------------------
+ # HDFS
-cdef extern from "arrow/io/hdfs.h" namespace "arrow::io" nogil:
CStatus HaveLibHdfs()
CStatus HaveLibHdfs3()
@@ -574,8 +572,6 @@ cdef extern from "arrow/io/hdfs.h" namespace "arrow::io" nogil:
int64_t default_block_size,
shared_ptr[HdfsOutputStream]* handle)
-
-cdef extern from "arrow/io/memory.h" namespace "arrow::io" nogil:
cdef cppclass CBufferReader \
" arrow::io::BufferReader"(RandomAccessFile):
CBufferReader(const shared_ptr[CBuffer]& buffer)