You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ko...@apache.org on 2022/04/22 08:21:05 UTC

[arrow] branch master updated: ARROW-16247: [GLib] Add GArrowGCSFileSystem

This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 65e8863052 ARROW-16247: [GLib] Add GArrowGCSFileSystem
65e8863052 is described below

commit 65e8863052ec1fea4ff92d0cf54ea0602ac8eebc
Author: Sutou Kouhei <ko...@clear-code.com>
AuthorDate: Fri Apr 22 17:20:52 2022 +0900

    ARROW-16247: [GLib] Add GArrowGCSFileSystem
    
    Closes #12931 from kou/glib-gcs-file-system
    
    Authored-by: Sutou Kouhei <ko...@clear-code.com>
    Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
 c_glib/arrow-glib/file-system.cpp | 19 +++++++++++++++++++
 c_glib/arrow-glib/file-system.h   | 12 ++++++++++++
 2 files changed, 31 insertions(+)

diff --git a/c_glib/arrow-glib/file-system.cpp b/c_glib/arrow-glib/file-system.cpp
index bb2e19513b..9cd6e79734 100644
--- a/c_glib/arrow-glib/file-system.cpp
+++ b/c_glib/arrow-glib/file-system.cpp
@@ -54,6 +54,8 @@ G_BEGIN_DECLS
  * #GArrowS3GlobalOptions is a class for options to initialize S3 APIs.
  *
  * #GArrowS3FileSystem is a class for S3-backed file system.
+ *
+ * #GArrowGCSFileSystem is a class for GCS-backed file system.
  */
 
 /* arrow::fs::FileInfo */
@@ -1593,6 +1595,21 @@ garrow_s3_file_system_class_init(GArrowS3FileSystemClass *klass)
 }
 
 
+G_DEFINE_TYPE(GArrowGCSFileSystem,
+              garrow_gcs_file_system,
+              GARROW_TYPE_FILE_SYSTEM)
+
+static void
+garrow_gcs_file_system_init(GArrowGCSFileSystem *file_system)
+{
+}
+
+static void
+garrow_gcs_file_system_class_init(GArrowGCSFileSystemClass *klass)
+{
+}
+
+
 G_END_DECLS
 
 GArrowFileInfo *
@@ -1623,6 +1640,8 @@ garrow_file_system_new_raw(
     file_system_type = GARROW_TYPE_HDFS_FILE_SYSTEM;
   } else if (type_name == "s3") {
     file_system_type = GARROW_TYPE_S3_FILE_SYSTEM;
+  } else if (type_name == "gcs") {
+    file_system_type = GARROW_TYPE_GCS_FILE_SYSTEM;
   } else if (type_name == "mock") {
     file_system_type = GARROW_TYPE_MOCK_FILE_SYSTEM;
   }
diff --git a/c_glib/arrow-glib/file-system.h b/c_glib/arrow-glib/file-system.h
index 7ab356e424..687404734a 100644
--- a/c_glib/arrow-glib/file-system.h
+++ b/c_glib/arrow-glib/file-system.h
@@ -333,4 +333,16 @@ struct _GArrowS3FileSystemClass
 };
 
 
+#define GARROW_TYPE_GCS_FILE_SYSTEM (garrow_gcs_file_system_get_type())
+G_DECLARE_DERIVABLE_TYPE(GArrowGCSFileSystem,
+                         garrow_gcs_file_system,
+                         GARROW,
+                         GCS_FILE_SYSTEM,
+                         GArrowFileSystem)
+struct _GArrowGCSFileSystemClass
+{
+  GArrowFileSystemClass parent_class;
+};
+
+
 G_END_DECLS