aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/cloud
diff options
context:
space:
mode:
authorGravatar Derek Murray <mrry@google.com>2017-09-28 18:03:54 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-09-28 18:07:45 -0700
commit60205721e1edd791115f8266b84fdd55070d5f1b (patch)
tree300cdc0fec22b9c945785f9a8c7630a586b7802e /tensorflow/contrib/cloud
parentfe5ddeca3fd085194641a4b74aef53a66bcce7ad (diff)
Split `HttpRequest` into an abstract interface and concrete `CurlHttpRequest`.
This is a step towards implementing an HTTP client for platforms where we do not build libcurl. PiperOrigin-RevId: 170426868
Diffstat (limited to 'tensorflow/contrib/cloud')
-rw-r--r--tensorflow/contrib/cloud/kernels/BUILD1
-rw-r--r--tensorflow/contrib/cloud/kernels/bigquery_table_accessor.cc5
-rw-r--r--tensorflow/contrib/cloud/kernels/bigquery_table_accessor.h2
3 files changed, 5 insertions, 3 deletions
diff --git a/tensorflow/contrib/cloud/kernels/BUILD b/tensorflow/contrib/cloud/kernels/BUILD
index 35bab9abfb..09ec7e42c7 100644
--- a/tensorflow/contrib/cloud/kernels/BUILD
+++ b/tensorflow/contrib/cloud/kernels/BUILD
@@ -62,6 +62,7 @@ cc_library(
":bigquery_table_partition_proto_cc",
"//tensorflow/core:lib",
"//tensorflow/core:protos_all_cc",
+ "//tensorflow/core/platform/cloud:curl_http_request",
"//tensorflow/core/platform/cloud:google_auth_provider",
"//tensorflow/core/platform/cloud:http_request",
],
diff --git a/tensorflow/contrib/cloud/kernels/bigquery_table_accessor.cc b/tensorflow/contrib/cloud/kernels/bigquery_table_accessor.cc
index 5e95db55b6..51821f6653 100644
--- a/tensorflow/contrib/cloud/kernels/bigquery_table_accessor.cc
+++ b/tensorflow/contrib/cloud/kernels/bigquery_table_accessor.cc
@@ -142,7 +142,8 @@ BigQueryTableAccessor::BigQueryTableAccessor(
project_id, dataset_id, table_id, timestamp_millis, row_buffer_size,
end_point, columns, partition,
std::unique_ptr<AuthProvider>(new GoogleAuthProvider()),
- std::unique_ptr<HttpRequest::Factory>(new HttpRequest::Factory())) {
+ std::unique_ptr<HttpRequest::Factory>(
+ new CurlHttpRequest::Factory())) {
row_buffer_.resize(row_buffer_size);
}
@@ -392,7 +393,7 @@ Status BigQueryTableAccessor::AppendValueToExample(
}
string BigQueryTableAccessor::BigQueryTableAccessor::BigQueryUriPrefix() {
- HttpRequest request;
+ CurlHttpRequest request;
return strings::StrCat(bigquery_end_point_, "/projects/",
request.EscapeString(project_id_), "/datasets/",
request.EscapeString(dataset_id_), "/tables/",
diff --git a/tensorflow/contrib/cloud/kernels/bigquery_table_accessor.h b/tensorflow/contrib/cloud/kernels/bigquery_table_accessor.h
index 1cd0482186..7d0eee59ae 100644
--- a/tensorflow/contrib/cloud/kernels/bigquery_table_accessor.h
+++ b/tensorflow/contrib/cloud/kernels/bigquery_table_accessor.h
@@ -23,8 +23,8 @@ limitations under the License.
#include "tensorflow/contrib/cloud/kernels/bigquery_table_partition.pb.h"
#include "tensorflow/core/example/example.pb.h"
#include "tensorflow/core/lib/core/errors.h"
+#include "tensorflow/core/platform/cloud/curl_http_request.h"
#include "tensorflow/core/platform/cloud/google_auth_provider.h"
-#include "tensorflow/core/platform/cloud/http_request.h"
namespace tensorflow {