forked from apache/arrow
-
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.
ARROW-3289: [C++] Implement Flight DoPut
Implements server/client side DoPut in C++ and extends the integration tests to exercise this. We may want a different API for client-side DoPut that exposes any potential server response; I made it give the client a RecordBatchWriter to be symmetric with DoGet for now though. Author: David Li <[email protected]> Closes apache#3524 from lihalite/arrow-3289 and squashes the following commits: 13fb29a <David Li> Document why VectorUnloader must align batches in Flight f32c0b2 <David Li> Indicate error to client in DoPut if no message sent cd56782 <David Li> Warn about undefined behavior in Flight source 1f816e8 <David Li> Move serialization helpers out of gRPC namespace 21b315a <David Li> Hide FlightPutWriter from public interface for now 6edf2e2 <David Li> Introduce FlightPutWriter 58d6936 <David Li> Enable building with non-CMake c-ares cfa4ca5 <David Li> Properly quote arguments to gRPC CMake build 302dd33 <David Li> Explicitly link Protobuf for Flight 419ad68 <David Li> Log (de)serialization failures in Flight fast-path 562b861 <David Li> Factor out FlightData->Message conversion 65d6ba2 <David Li> Clean up C++ Flight integration client 3e185cb <David Li> Add convenience to parse JSON from file 111b3e6 <David Li> Fix style/lint issues 3cb51ba <David Li> Test all returned locations in Flight integration tests 905ef38 <David Li> Implement C++ Flight DoPut 138141f <David Li> Fix FromProto for FlightDescriptor a11a5ac <David Li> Don't hang in Flight DoPut if server sends exception b3ac01a <David Li> Align RecordBatch on client side in Flight DoPut 846df73 <David Li> Implement put in Java Flight integration server
- Loading branch information
Showing
21 changed files
with
1,039 additions
and
569 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# Tries to find c-ares headers and libraries. | ||
# | ||
# Usage of this module as follows: | ||
# | ||
# find_package(c-ares) | ||
# | ||
# Variables used by this module, they can change the default behaviour and need | ||
# to be set before calling find_package: | ||
# | ||
# CARES_HOME - When set, this path is inspected instead of standard library | ||
# locations as the root of the c-ares installation. | ||
# The environment variable CARES_HOME overrides this variable. | ||
# | ||
# - Find CARES | ||
# This module defines | ||
# CARES_INCLUDE_DIR, directory containing headers | ||
# CARES_SHARED_LIB, path to c-ares's shared library | ||
# CARES_FOUND, whether c-ares has been found | ||
|
||
if( NOT "${CARES_HOME}" STREQUAL "") | ||
file( TO_CMAKE_PATH "${CARES_HOME}" _native_path ) | ||
list( APPEND _cares_roots ${_native_path} ) | ||
elseif ( CARES_HOME ) | ||
list( APPEND _cares_roots ${CARES_HOME} ) | ||
endif() | ||
|
||
if (MSVC) | ||
set(CARES_LIB_NAME cares.lib) | ||
else () | ||
set(CARES_LIB_NAME | ||
${CMAKE_SHARED_LIBRARY_PREFIX}cares${CMAKE_SHARED_LIBRARY_SUFFIX}) | ||
set(CARES_STATIC_LIB_NAME | ||
${CMAKE_STATIC_LIBRARY_PREFIX}cares${CMAKE_STATIC_LIBRARY_SUFFIX}) | ||
endif () | ||
|
||
# Try the parameterized roots, if they exist | ||
if (_cares_roots) | ||
find_path(CARES_INCLUDE_DIR NAMES ares.h | ||
PATHS ${_cares_roots} NO_DEFAULT_PATH | ||
PATH_SUFFIXES "include") | ||
find_library(CARES_SHARED_LIB | ||
NAMES ${CARES_LIB_NAME} | ||
PATHS ${_cares_roots} NO_DEFAULT_PATH | ||
PATH_SUFFIXES "lib") | ||
find_library(CARES_STATIC_LIB | ||
NAMES ${CARES_STATIC_LIB_NAME} | ||
PATHS ${_cares_roots} NO_DEFAULT_PATH | ||
PATH_SUFFIXES "lib") | ||
else () | ||
pkg_check_modules(PKG_CARES cares) | ||
if (PKG_CARES_FOUND) | ||
set(CARES_INCLUDE_DIR ${PKG_CARES_INCLUDEDIR}) | ||
find_library(CARES_SHARED_LIB | ||
NAMES ${CARES_LIB_NAME} | ||
PATHS ${PKG_CARES_LIBDIR} NO_DEFAULT_PATH) | ||
else () | ||
find_path(CARES_INCLUDE_DIR NAMES cares.h) | ||
find_library(CARES_SHARED_LIB NAMES ${CARES_LIB_NAME}) | ||
endif () | ||
endif () | ||
|
||
if (CARES_INCLUDE_DIR AND CARES_SHARED_LIB) | ||
set(CARES_FOUND TRUE) | ||
else () | ||
set(CARES_FOUND FALSE) | ||
endif () | ||
|
||
if (CARES_FOUND) | ||
if (NOT CARES_FIND_QUIETLY) | ||
if (CARES_SHARED_LIB) | ||
message(STATUS "Found the c-ares shared library: ${CARES_SHARED_LIB}") | ||
endif () | ||
endif () | ||
else () | ||
if (NOT CARES_FIND_QUIETLY) | ||
set(CARES_ERR_MSG "Could not find the c-ares library. Looked in ") | ||
if ( _cares_roots ) | ||
set(CARES_ERR_MSG "${CARES_ERR_MSG} ${_cares_roots}.") | ||
else () | ||
set(CARES_ERR_MSG "${CARES_ERR_MSG} system search paths.") | ||
endif () | ||
if (CARES_FIND_REQUIRED) | ||
message(FATAL_ERROR "${CARES_ERR_MSG}") | ||
else (CARES_FIND_REQUIRED) | ||
message(STATUS "${CARES_ERR_MSG}") | ||
endif (CARES_FIND_REQUIRED) | ||
endif () | ||
endif () | ||
|
||
mark_as_advanced( | ||
CARES_INCLUDE_DIR | ||
CARES_LIBRARIES | ||
CARES_SHARED_LIB | ||
CARES_STATIC_LIB | ||
) |
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
Oops, something went wrong.