Skip to content

Commit 90ff9d1

Browse files
committed
Support new filesystem
1 parent 2d0c38e commit 90ff9d1

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

tensorflow_io/core/filesystems/filesystem_plugins.cc

+4-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ limitations under the License.
2929
TFIO_PLUGIN_EXPORT void TF_InitPlugin(TF_FilesystemPluginInfo* info) {
3030
info->plugin_memory_allocate = tensorflow::io::plugin_memory_allocate;
3131
info->plugin_memory_free = tensorflow::io::plugin_memory_free;
32-
info->num_schemes = 7;
33-
#if !defined(_MSC_VER)
3432
info->num_schemes = 8;
33+
#if !defined(_MSC_VER)
34+
info->num_schemes = 9;
3535
#endif
3636
info->ops = static_cast<TF_FilesystemPluginOps*>(
3737
tensorflow::io::plugin_memory_allocate(info->num_schemes *
@@ -43,7 +43,8 @@ TFIO_PLUGIN_EXPORT void TF_InitPlugin(TF_FilesystemPluginInfo* info) {
4343
tensorflow::io::hdfs::ProvideFilesystemSupportFor(&info->ops[4], "hdfs");
4444
tensorflow::io::hdfs::ProvideFilesystemSupportFor(&info->ops[5], "viewfs");
4545
tensorflow::io::hdfs::ProvideFilesystemSupportFor(&info->ops[6], "har");
46+
tensorflow::io::hdfs::ProvideFilesystemSupportFor(&info->ops[7], "qbfs");
4647
#if !defined(_MSC_VER)
47-
tensorflow::io::oss::ProvideFilesystemSupportFor(&info->ops[7], "oss");
48+
tensorflow::io::oss::ProvideFilesystemSupportFor(&info->ops[8], "oss");
4849
#endif
4950
}

tensorflow_io/core/filesystems/hdfs/hadoop_filesystem.cc

+2
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,8 @@ hdfsFS Connect(tf_hdfs_filesystem::HadoopFileSystemImplementation* hadoop_file,
541541
std::string path_har = path;
542542
SplitArchiveNameAndPath(&path_har, &namenode, status);
543543
if (TF_GetCode(status) != TF_OK) return nullptr;
544+
} else if (scheme == "qbfs") {
545+
namenode = path;
544546
} else {
545547
if (namenode.empty()) {
546548
namenode = "default";

0 commit comments

Comments
 (0)