[go: nahoru, domu]

Skip to content

Commit

Permalink
Support new filesystem
Browse files Browse the repository at this point in the history
  • Loading branch information
daugraph committed Feb 7, 2023
1 parent 2d0c38e commit 90ff9d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tensorflow_io/core/filesystems/filesystem_plugins.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ limitations under the License.
TFIO_PLUGIN_EXPORT void TF_InitPlugin(TF_FilesystemPluginInfo* info) {
info->plugin_memory_allocate = tensorflow::io::plugin_memory_allocate;
info->plugin_memory_free = tensorflow::io::plugin_memory_free;
info->num_schemes = 7;
#if !defined(_MSC_VER)
info->num_schemes = 8;
#if !defined(_MSC_VER)
info->num_schemes = 9;
#endif
info->ops = static_cast<TF_FilesystemPluginOps*>(
tensorflow::io::plugin_memory_allocate(info->num_schemes *
Expand All @@ -43,7 +43,8 @@ TFIO_PLUGIN_EXPORT void TF_InitPlugin(TF_FilesystemPluginInfo* info) {
tensorflow::io::hdfs::ProvideFilesystemSupportFor(&info->ops[4], "hdfs");
tensorflow::io::hdfs::ProvideFilesystemSupportFor(&info->ops[5], "viewfs");
tensorflow::io::hdfs::ProvideFilesystemSupportFor(&info->ops[6], "har");
tensorflow::io::hdfs::ProvideFilesystemSupportFor(&info->ops[7], "qbfs");
#if !defined(_MSC_VER)
tensorflow::io::oss::ProvideFilesystemSupportFor(&info->ops[7], "oss");
tensorflow::io::oss::ProvideFilesystemSupportFor(&info->ops[8], "oss");
#endif
}
2 changes: 2 additions & 0 deletions tensorflow_io/core/filesystems/hdfs/hadoop_filesystem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,8 @@ hdfsFS Connect(tf_hdfs_filesystem::HadoopFileSystemImplementation* hadoop_file,
std::string path_har = path;
SplitArchiveNameAndPath(&path_har, &namenode, status);
if (TF_GetCode(status) != TF_OK) return nullptr;
} else if (scheme == "qbfs") {
namenode = path;
} else {
if (namenode.empty()) {
namenode = "default";
Expand Down

0 comments on commit 90ff9d1

Please sign in to comment.