Skip to content

Commit 27f8fef

Browse files
committed
switch to gcs on tensorflow-io according to tensorflow/tensorflow#47247
1 parent 28bc7d3 commit 27f8fef

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tensorflow_io/core/plugins/file_system_plugins.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,12 @@ void TF_InitPlugin(TF_FilesystemPluginInfo* info) {
3535
tensorflow::io::hdfs::ProvideFilesystemSupportFor(&info->ops[3], "hdfse");
3636
tensorflow::io::hdfs::ProvideFilesystemSupportFor(&info->ops[4], "viewfse");
3737
tensorflow::io::hdfs::ProvideFilesystemSupportFor(&info->ops[5], "hare");
38+
tensorflow::io::gs::ProvideFilesystemSupportFor(&info->ops[6], "gse");
3839
} else {
3940
tensorflow::io::s3::ProvideFilesystemSupportFor(&info->ops[2], "s3");
4041
tensorflow::io::hdfs::ProvideFilesystemSupportFor(&info->ops[3], "hdfs");
4142
tensorflow::io::hdfs::ProvideFilesystemSupportFor(&info->ops[4], "viewfs");
4243
tensorflow::io::hdfs::ProvideFilesystemSupportFor(&info->ops[5], "har");
44+
tensorflow::io::gs::ProvideFilesystemSupportFor(&info->ops[6], "gs");
4345
}
44-
tensorflow::io::gs::ProvideFilesystemSupportFor(&info->ops[6], "gse");
4546
}

tests/test_gcs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def test_read_file():
4545

4646
# Setup the GCS bucket and key
4747
key_name = "TEST"
48-
bucket_name = "gse{}e".format(int(time.time()))
48+
bucket_name = "gs{}e".format(int(time.time()))
4949
bucket = client.create_bucket(bucket_name)
5050

5151
blob = bucket.blob(key_name)
@@ -56,5 +56,5 @@ def test_read_file():
5656

5757
os.environ["CLOUD_STORAGE_TESTBENCH_ENDPOINT"] = "http://localhost:9099"
5858

59-
content = tf.io.read_file("gse://{}/{}".format(bucket_name, key_name))
59+
content = tf.io.read_file("gs://{}/{}".format(bucket_name, key_name))
6060
assert content == body

0 commit comments

Comments
 (0)