Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 636BF200D43 for ; Mon, 16 Oct 2017 16:19:46 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 61AF21609EC; Mon, 16 Oct 2017 14:19:46 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0B388160C00 for ; Mon, 16 Oct 2017 16:19:41 +0200 (CEST) Received: (qmail 90526 invoked by uid 500); 16 Oct 2017 14:19:41 -0000 Mailing-List: contact commits-help@arrow.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@arrow.apache.org Delivered-To: mailing list commits@arrow.apache.org Received: (qmail 90175 invoked by uid 99); 16 Oct 2017 14:19:40 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Oct 2017 14:19:40 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 9A188DFCDE; Mon, 16 Oct 2017 14:19:40 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: wesm@apache.org To: commits@arrow.apache.org Date: Mon, 16 Oct 2017 14:20:05 -0000 Message-Id: <2826f2082d844fecb1cb4eefab3a82c3@git.apache.org> In-Reply-To: <7c9f1061d5dc49e4b51356bc4d9a83d8@git.apache.org> References: <7c9f1061d5dc49e4b51356bc4d9a83d8@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [27/51] [partial] arrow-site git commit: Add Ray serialization blog post, update API docs archived-at: Mon, 16 Oct 2017 14:19:46 -0000 http://git-wip-us.apache.org/repos/asf/arrow-site/blob/7a2e5ece/docs/cpp/interfaces_8h_source.html ---------------------------------------------------------------------- diff --git a/docs/cpp/interfaces_8h_source.html b/docs/cpp/interfaces_8h_source.html index 4c57a09..e0de47c 100644 --- a/docs/cpp/interfaces_8h_source.html +++ b/docs/cpp/interfaces_8h_source.html @@ -5,7 +5,7 @@ -Apache Arrow (C++): /home/wesm/code/arrow/cpp/src/arrow/io/interfaces.h Source File +Apache Arrow (C++): /apache-arrow/arrow/cpp/src/arrow/io/interfaces.h Source File @@ -67,16 +67,16 @@ $(function() {
interfaces.h
-Go to the documentation of this file.
1 // Licensed to the Apache Software Foundation (ASF) under one
2 // or more contributor license agreements. See the NOTICE file
3 // distributed with this work for additional information
4 // regarding copyright ownership. The ASF licenses this file
5 // to you under the Apache License, Version 2.0 (the
6 // "License"); you may not use this file except in compliance
7 // with the License. You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing,
12 // software distribute d under the License is distributed on an
13 // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 // KIND, either express or implied. See the License for the
15 // specific language governing permissions and limitations
16 // under the License.
17 
18 #ifndef ARROW_IO_INTERFACES_H
19 #define ARROW_IO_INTERFACES_H
20 
21 #include <cstdint>
22 #include <memory>
23 #include <mutex>
24 #include <string>
25 #include <vector>
26 
27 #include "arrow/util/macros.h"
28 #include "arrow/util/visibility.h"
29 
30 namespace arrow {
31 
32 class Buffer;
33 class Status;
34 
35 namespace io {
36 
37 struct FileMode {
38  enum type { READ, WRITE, READWRITE };
39 };
40 
41 struct ObjectType {
42  enum type { FILE, DIRECTORY };
43 };
44 
45 struct ARROW_EXPORT FileStatistics {
47  int64_t size;
49 
51  FileStatistics(int64_t size, ObjectType::type kind) : size(size), kind(kind) {}
52 };
53 
54 class ARROW_EXPORT FileSystem {
55  public:
56  virtual ~FileSystem() {}
57 
58  virtual Status MakeDirectory(const std::string& path) = 0;
59 
60  virtual Status DeleteDirectory(const std::string& path) = 0;
61 
62  virtual Statu s GetChildren(const std::string& path,
63  std::vector<std::string>* listing) = 0;
64 
65  virtual Status Rename(const std::string& src, const std::string& dst) = 0;
66 
67  virtual Status Stat(const std::string& path, FileStatistics* stat) = 0;
68 };
69 
70 class ARROW_EXPORT FileInterface {
71  public:
72  virtual ~FileInterface() = 0;
73  virtual Status Close() = 0;
74  virtual Status Tell(int64_t* position) const = 0;
75 
76  FileMode::type mode() const { return mode_; }
77 
< span class="lineno"> 78  protected:
81  void set_mode(FileMode::type mode) { mode_ = mode; }
82 
83  private:
85 };
86 
87 class ARROW_EXPORT Seekable {
88  public:
89  virtual Status Seek(int64_t position) = 0;
90 };
91 
92 class ARROW_EXPORT Writeable {
93  public:
94  virtual Status Write(const uint8_t* data, int64_t nbytes) = 0;
95 
97  virtual Status Flush();
98 
99  Status Write(const std::string& data);
100& #160;};
101 
102 class ARROW_EXPORT Readable {
103  public:
104  virtual Status Read(int64_t nbytes, int64_t* bytes_read, uint8_t* out) = 0;
105 
106  // Does not copy if not necessary
107  virtual Status Read(int64_t nbytes, std::shared_ptr<Buffer>* out) = 0;
108 };
109 
110 class ARROW_EXPORT OutputStream : virtual public FileInterface, public Writeable {
111   protected:
113 };
114 
115 class ARROW_EXPORT InputStream : virtual public FileInterface, public Readable {
116  protected:
118 };
119 
120 class ARROW_EXPORT RandomAccessFile : public InputStream, public Seekable {
121  public:
122  virtual Status GetSize(int64_t* size) = 0;
123 
124  virtual bool supports_zero_copy() const = 0;
125 
130  virtual Status ReadAt(int64_t position, int64_t nbytes, int64_t* bytes_read,
131  uint8_t* out);
132 
134  virtual Status ReadAt(int64_t position, int64_t nbytes, std::shared_ptr<Buffer>* out);
135 
136  std::mutex& lock() { return lock_; }
137 
138  protected:
139  std::mutex lock_;
140 
142 };
143 
144 class ARROW_EXPORT WriteableFile : public OutputStream, public Seekable {
145  public:
146  virtual Status WriteAt(int64_t position, const uint8_t* data, int64_t nbytes) = 0;
147 
148  protected:
149  WriteableFile() { set_mode(FileMode::READ); }
150 };
151 
152 class ARROW_EX PORT ReadWriteFileInterface : public RandomAccessFile,
153  public WriteableFile {
154  protected:
156 };
157 
159 
160 } // namespace io
161 } // namespace arrow
162 
163 #endif // ARROW_IO_INTERFACES_H
Definition: interfaces.h:41
+Go to the documentation of this file.
1 // Licensed to the Apache Software Foundation (ASF) under one
2 // or more contributor license agreements. See the NOTICE file
3 // distributed with this work for additional information
4 // regarding copyright ownership. The ASF licenses this file
5 // to you under the Apache License, Version 2.0 (the
6 // "License"); you may not use this file except in compliance
7 // with the License. You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing,
12 // software distribute d under the License is distributed on an
13 // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 // KIND, either express or implied. See the License for the
15 // specific language governing permissions and limitations
16 // under the License.
17 
18 #ifndef ARROW_IO_INTERFACES_H
19 #define ARROW_IO_INTERFACES_H
20 
21 #include <cstdint>
22 #include <memory>
23 #include <mutex>
24 #include <string>
25 #include <vector>
26 
27 #include "arrow/util/macros.h"
28 #include "arrow/util/visibility.h"
29 
30 namespace arrow {
31 
32 class Buffer;
33 class Status;
34 
35 namespace io {
36 
37 struct FileMode {
38  enum type { READ, WRITE, READWRITE };
39 };
40 
41 struct ObjectType {
42  enum type { FILE, DIRECTORY };
43 };
44 
45 struct ARROW_EXPORT FileStatistics {
47  int64_t size;
49 
51  FileStatistics(int64_t size, ObjectType::type kind) : size(size), kind(kind) {}
52 };
53 
54 class ARROW_EXPORT FileSystem {
55  public:
56  virtual ~FileSystem() {}
57 
58  virtual Status MakeDirectory(const std::string& path) = 0;
59 
60  virtual Status DeleteDirectory(const std::string& path) = 0;
61 
62  virtual Statu s GetChildren(const std::string& path,
63  std::vector<std::string>* listing) = 0;
64 
65  virtual Status Rename(const std::string& src, const std::string& dst) = 0;
66 
67  virtual Status Stat(const std::string& path, FileStatistics* stat) = 0;
68 };
69 
70 class ARROW_EXPORT FileInterface {
71  public:
72  virtual ~FileInterface() = 0;
73  virtual Status Close() = 0;
74  virtual Status Tell(int64_t* position) const = 0;
75 
76  FileMode::type mode() const { return mode_; }
77 
< span class="lineno"> 78  protected:
81  void set_mode(FileMode::type mode) { mode_ = mode; }
82 
83  private:
85 };
86 
87 class ARROW_EXPORT Seekable {
88  public:
89  virtual ~Seekable() = default;
90  virtual Status Seek(int64_t position) = 0;
91 };
92 
93 class ARROW_EXPORT Writeable {
94  public:
95  virtual ~Writeable() = default;
96 
97  virtual Status Write(const uint8_t* data, int64_t nbytes) = 0;
98 
100  virtual Status Flush();
101 
102  Status Write(const std::string& data);
103 };
104 
105 class ARROW_EXPORT Readable {
106  public:
107  virtual ~Readable() = default;
108 
109  virtual Status Read(int64_t nbytes, int64_t* bytes_read, uint8_t* out) = 0;
110 
111  // Does not copy if not necessary
112  virtual Status Read(int64_t nbytes, std::shared_ptr<Buffer>* out) = 0;
113 };
114 
115 class ARROW_EXPORT OutputStream : virtual public FileInterface, public Writeable {
116  protected:
118 };
119 
120 class ARROW_EXPORT InputStream : virtual public FileInterface, public Readable {
121  protected:
123 };
124 
125 class ARROW_EXPORT RandomAccessFile : public InputStream, public Seekable {
126  public:
127  virtual Status GetSize(int64_t* size) = 0;
128 
129  virtual bool supports_zero_copy() const = 0;
130 
135  virtual Status ReadAt(int64_t p osition, int64_t nbytes, int64_t* bytes_read,
136  uint8_t* out);
137 
139  virtual Status ReadAt(int64_t position, int64_t nbytes, std::shared_ptr<Buffer>* out);
140 
141  std::mutex& lock() { return lock_; }
142 
143  protected:
144  std::mutex lock_;
145 
147 };
148 
149 class ARROW_EXPORT WriteableFile : public OutputStream, public Seekable {
150  public:
151  virtual Status WriteAt(int64_t position, const uint8_t* data, int64_t nbytes) = 0;
152 
153  protected:
154  WriteableFile() { set_mode(FileMode::READ); }
155 };
156 
157 class ARROW_EXPORT ReadWriteFileInterface : public RandomAccessFile,
158  public WriteableFile {
159  protected:
161 };
162 
164 
165 } // namespace io
166 } // namespace arrow
167 
168 #endif // ARROW_IO_INTERFACES_H
Definition: interfaces.h:41
FileMode::type mode() const
Definition: interfaces.h:76
-
Definition: interfaces.h:110
+
Definition: interfaces.h:115
Definition: interfaces.h:45
type
Definition: interfaces.h:42
-
Definition: interfaces.h:144
+
Definition: interfaces.h:149
Definition: interfaces.h:87
-
Definition: interfaces.h:92
-
Definition: interfaces.h:115
-
Definition: interfaces.h:120
+
Definition: interfaces.h:93
+
Definition: interfaces.h:120
+
Definition: interfaces.h:125
FileStatistics()
Definition: interfaces.h:50
FileInterface()
Definition: interfaces.h:79
FileMode::type mode_
Definition: interfaces.h:80
@@ -86,22 +86,22 @@ $(function() {
Definition: status.h:106
Definition: interfaces.h:37
-
WriteableFile()
Definition: interfaces.h:149
-
std::mutex & lock()
Definition: interfaces.h:136
+
WriteableFile()
Definition: interfaces.h:154
+
std::mutex & lock()
Definition: interfaces.h:141
-
OutputStream()
Definition: interfaces.h:112
-
std::mutex lock_
Definition: interfaces.h:139
+
OutputStream()
Definition: interfaces.h:117
+
std::mutex lock_
Definition: interfaces.h:144
virtual ~FileSystem()
Definition: interfaces.h:56
-
Definition: interfaces.h:152
+
Definition: interfaces.h:157
Definition: interfaces.h:38
void set_mode(FileMode::type mode)
Definition: interfaces.h:81
Top-level namespace for Apache Arrow C++ API.
Definition: allocator.h:28
FileStatistics(int64_t size, ObjectType::type kind)
Definition: interfaces.h:51
Definition: interfaces.h:54
-
ReadWriteFileInterface()
Definition: interfaces.h:155
+
ReadWriteFileInterface()
Definition: interfaces.h:160
type
Definition: interfaces.h:38
-
InputStream()
Definition: interfaces.h:117
-
Definition: interfaces.h:102
+
InputStream()
Definition: interfaces.h:122
+
Definition: interfaces.h:105
int64_t size
Size of file, -1 if finding length is unsupported.
Definition: interfaces.h:47
#define ARROW_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition: macros.h:23
Definition: interfaces.h:38
http://git-wip-us.apache.org/repos/asf/arrow-site/blob/7a2e5ece/docs/cpp/io-util_8h.html ---------------------------------------------------------------------- diff --git a/docs/cpp/io-util_8h.html b/docs/cpp/io-util_8h.html index 01b1574..3b25d9d 100644 --- a/docs/cpp/io-util_8h.html +++ b/docs/cpp/io-util_8h.html @@ -5,7 +5,7 @@ -Apache Arrow (C++): /home/wesm/code/arrow/cpp/src/arrow/util/io-util.h File Reference +Apache Arrow (C++): /apache-arrow/arrow/cpp/src/arrow/util/io-util.h File Reference