forked from tensorflow/tensorflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
File system implementation for Google Cloud Storage.
This code implements a file system for file paths starting with gs:// using the HTTP API to Google Cloud Storage. No authentication is implemented yet, so only GCS objects with public access can be used. Change: 122126085
- Loading branch information
1 parent
d03631a
commit ed65e69
Showing
14 changed files
with
2,009 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
licenses(["notice"]) # MIT | ||
|
||
JSON_HEADERS = [ | ||
"include/json/assertions.h", | ||
"include/json/autolink.h", | ||
"include/json/config.h", | ||
"include/json/features.h", | ||
"include/json/forwards.h", | ||
"include/json/json.h", | ||
"src/lib_json/json_batchallocator.h", | ||
"include/json/reader.h", | ||
"include/json/value.h", | ||
"include/json/writer.h", | ||
] | ||
|
||
JSON_SOURCES = [ | ||
"src/lib_json/json_reader.cpp", | ||
"src/lib_json/json_value.cpp", | ||
"src/lib_json/json_writer.cpp", | ||
"src/lib_json/json_tool.h", | ||
] | ||
|
||
INLINE_SOURCES = [ | ||
"src/lib_json/json_valueiterator.inl", | ||
] | ||
|
||
cc_library( | ||
name = "jsoncpp", | ||
srcs = JSON_SOURCES, | ||
hdrs = JSON_HEADERS, | ||
includes = ["include"], | ||
textual_hdrs = INLINE_SOURCES, | ||
visibility = ["//visibility:public"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# Description: | ||
# Cloud file system implementation. | ||
|
||
package( | ||
default_visibility = ["//visibility:private"], | ||
) | ||
|
||
licenses(["notice"]) # Apache 2.0 | ||
|
||
load( | ||
"//tensorflow:tensorflow.bzl", | ||
"tf_cc_test", | ||
) | ||
|
||
filegroup( | ||
name = "all_files", | ||
srcs = glob( | ||
["**/*"], | ||
exclude = [ | ||
"**/METADATA", | ||
"**/OWNERS", | ||
], | ||
), | ||
visibility = ["//tensorflow:__subpackages__"], | ||
) | ||
|
||
cc_library( | ||
name = "gcs_file_system", | ||
srcs = [ | ||
"gcs_file_system.cc", | ||
], | ||
hdrs = [ | ||
"gcs_file_system.h", | ||
], | ||
linkstatic = 1, # Needed since alwayslink is broken in bazel b/27630669 | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"@jsoncpp_git//:jsoncpp", | ||
":http_request", | ||
"//tensorflow/core:framework_headers_lib", | ||
"//tensorflow/core:lib_internal", | ||
], | ||
alwayslink = 1, | ||
) | ||
|
||
cc_library( | ||
name = "http_request", | ||
srcs = [ | ||
"http_request.cc", | ||
], | ||
hdrs = [ | ||
"http_request.h", | ||
], | ||
deps = [ | ||
"//tensorflow/core:framework_headers_lib", | ||
"//tensorflow/core:lib_internal", | ||
], | ||
) | ||
|
||
tf_cc_test( | ||
name = "gcs_file_system_test", | ||
size = "small", | ||
deps = [ | ||
":gcs_file_system", | ||
"//tensorflow/core:test", | ||
"//tensorflow/core:test_main", | ||
], | ||
) | ||
|
||
tf_cc_test( | ||
name = "http_request_test", | ||
size = "small", | ||
deps = [ | ||
":http_request", | ||
"//tensorflow/core:lib", | ||
"//tensorflow/core:test", | ||
"//tensorflow/core:test_main", | ||
], | ||
) |
Oops, something went wrong.