Skip to content

Commit 24eece3

Browse files
committed
ORC-2102: [C++] Remove HDFS support
### What changes were proposed in this pull request? This PR aims to remove HDFS support code from Apache ORC repository. ### Why are the changes needed? Apache ORC 2.0.1 deprecated HDFS Support to address the following issues. - #1885 - #1857 - #2134 ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: `Gemini 3.1 Pro (High)` on `Antigravity` This closes #2136 . Closes #2544 from dongjoon-hyun/ORC-2102. Authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
1 parent 029008e commit 24eece3

File tree

11 files changed

+2
-317
lines changed

11 files changed

+2
-317
lines changed

.github/workflows/build_and_test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ jobs:
155155
cd build
156156
cmake .. -G "Visual Studio 17 2022" \
157157
-DCMAKE_BUILD_TYPE=RELEASE \
158-
-DBUILD_LIBHDFSPP=OFF \
159158
-DBUILD_TOOLS=OFF \
160159
-DBUILD_JAVA=OFF \
161160
-DANALYZE_JAVA=OFF \

CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ option (ANALYZE_JAVA
4141
"Run static analysis of the Java"
4242
OFF)
4343

44-
option (BUILD_LIBHDFSPP
45-
"Include LIBHDFSPP library in the build process"
46-
OFF)
4744

4845
option (BUILD_SPARSEHASH
4946
"Include sparsehash library in the build process"

c++/include/orc/OrcFile.hh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,6 @@ namespace orc {
135135
std::unique_ptr<InputStream> readLocalFile(const std::string& path,
136136
ReaderMetrics* metrics = nullptr);
137137

138-
/**
139-
* Create a stream to an HDFS file.
140-
* @param path the uri of the file in HDFS
141-
* @param metrics the metrics of the reader
142-
*/
143-
[[deprecated("readHdfsFile is deprecated in 2.0.1")]] std::unique_ptr<InputStream> readHdfsFile(
144-
const std::string& path, ReaderMetrics* metrics = nullptr);
145-
146138
/**
147139
* Create a reader to read the ORC file.
148140
* @param stream the stream to read

c++/libs/libhdfspp/imported_timestamp

Lines changed: 0 additions & 10 deletions
This file was deleted.
-927 KB
Binary file not shown.

c++/libs/libhdfspp/pull_hdfs.sh

Lines changed: 0 additions & 32 deletions
This file was deleted.

c++/src/CMakeLists.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,6 @@ set(SOURCE_FILES
191191
Vector.cc
192192
Writer.cc)
193193

194-
if(BUILD_LIBHDFSPP)
195-
set(SOURCE_FILES ${SOURCE_FILES} OrcHdfsFile.cc)
196-
endif(BUILD_LIBHDFSPP)
197194

198195
if(BUILD_ENABLE_AVX512)
199196
set(SOURCE_FILES
@@ -212,7 +209,6 @@ target_link_libraries (orc
212209
$<BUILD_INTERFACE:orc::Snappy>
213210
$<BUILD_INTERFACE:orc::lz4>
214211
$<BUILD_INTERFACE:orc::zstd>
215-
$<BUILD_INTERFACE:${LIBHDFSPP_LIBRARIES}>
216212
$<BUILD_INTERFACE:$<TARGET_NAME_IF_EXISTS:orc::sparsehash>>
217213
)
218214

@@ -227,16 +223,12 @@ target_include_directories (orc
227223
PRIVATE
228224
${CMAKE_CURRENT_BINARY_DIR}
229225
${CMAKE_CURRENT_SOURCE_DIR}
230-
${LIBHDFSPP_INCLUDE_DIR}
231226
)
232227

233228
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
234229
target_compile_options(orc PRIVATE -Wall -Wextra $<$<BOOL:${STOP_BUILD_ON_WARNING}>:-Werror>)
235230
endif ()
236231

237-
if (BUILD_LIBHDFSPP)
238-
target_compile_definitions(orc PUBLIC -DBUILD_LIBHDFSPP)
239-
endif (BUILD_LIBHDFSPP)
240232

241233
if (BUILD_SPARSEHASH)
242234
target_compile_definitions(orc PUBLIC -DBUILD_SPARSEHASH)

c++/src/OrcFile.cc

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,7 @@ namespace orc {
103103
}
104104

105105
std::unique_ptr<InputStream> readFile(const std::string& path, ReaderMetrics* metrics) {
106-
#ifdef BUILD_LIBHDFSPP
107-
if (strncmp(path.c_str(), "hdfs://", 7) == 0) {
108-
return orc::readHdfsFile(std::string(path), metrics);
109-
} else {
110-
#endif
111-
return orc::readLocalFile(std::string(path), metrics);
112-
#ifdef BUILD_LIBHDFSPP
113-
}
114-
#endif
106+
return orc::readLocalFile(std::string(path), metrics);
115107
}
116108

117109
DIAGNOSTIC_POP

c++/src/OrcHdfsFile.cc

Lines changed: 0 additions & 178 deletions
This file was deleted.

cmake_modules/ThirdpartyToolchain.cmake

Lines changed: 1 addition & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -702,70 +702,4 @@ if(BUILD_SPARSEHASH)
702702
endblock()
703703
endif()
704704

705-
# ----------------------------------------------------------------------
706-
# LIBHDFSPP
707-
if(BUILD_LIBHDFSPP)
708-
set (BUILD_LIBHDFSPP FALSE)
709-
if(ORC_CXX_HAS_THREAD_LOCAL)
710-
find_package(CyrusSASL)
711-
find_package(OpenSSL)
712-
find_package(Threads)
713-
if (CYRUS_SASL_SHARED_LIB AND OPENSSL_LIBRARIES)
714-
set (BUILD_LIBHDFSPP TRUE)
715-
set (LIBHDFSPP_PREFIX "${THIRDPARTY_DIR}/libhdfspp_ep-install")
716-
set (LIBHDFSPP_INCLUDE_DIR "${LIBHDFSPP_PREFIX}/include")
717-
set (LIBHDFSPP_STATIC_LIB_NAME hdfspp_static)
718-
set (LIBHDFSPP_STATIC_LIB "${LIBHDFSPP_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${LIBHDFSPP_STATIC_LIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}")
719-
set (LIBHDFSPP_SRC_URL "${PROJECT_SOURCE_DIR}/c++/libs/libhdfspp/libhdfspp.tar.gz")
720-
set (LIBHDFSPP_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
721-
-DCMAKE_INSTALL_PREFIX=${LIBHDFSPP_PREFIX}
722-
-DPROTOBUF_INCLUDE_DIR=${PROTOBUF_INCLUDE_DIR}
723-
-DPROTOBUF_LIBRARY=${PROTOBUF_STATIC_LIB}
724-
-DPROTOBUF_PROTOC_LIBRARY=${PROTOC_STATIC_LIB}
725-
-DPROTOBUF_PROTOC_EXECUTABLE=${PROTOBUF_EXECUTABLE}
726-
-DOPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR}
727-
-DCMAKE_C_FLAGS=${EP_C_FLAGS}
728-
-DBUILD_SHARED_LIBS=OFF
729-
-DHDFSPP_LIBRARY_ONLY=TRUE
730-
-DBUILD_SHARED_HDFSPP=FALSE)
731-
732-
if (BUILD_POSITION_INDEPENDENT_LIB)
733-
set(LIBHDFSPP_CMAKE_ARGS ${LIBHDFSPP_CMAKE_ARGS} -DCMAKE_POSITION_INDEPENDENT_CODE=ON)
734-
endif ()
735-
736-
ExternalProject_Add (libhdfspp_ep
737-
DEPENDS orc::protobuf
738-
URL ${LIBHDFSPP_SRC_URL}
739-
LOG_DOWNLOAD 0
740-
LOG_CONFIGURE 0
741-
LOG_BUILD 0
742-
LOG_INSTALL 0
743-
BUILD_BYPRODUCTS "${LIBHDFSPP_STATIC_LIB}"
744-
CMAKE_ARGS ${LIBHDFSPP_CMAKE_ARGS})
745-
746-
orc_add_built_library(libhdfspp_ep libhdfspp ${LIBHDFSPP_STATIC_LIB} ${LIBHDFSPP_INCLUDE_DIR})
747-
748-
set (LIBHDFSPP_LIBRARIES
749-
libhdfspp
750-
${CYRUS_SASL_SHARED_LIB}
751-
${OPENSSL_LIBRARIES}
752-
${CMAKE_THREAD_LIBS_INIT})
753-
754-
elseif(CYRUS_SASL_SHARED_LIB)
755-
message(STATUS
756-
"WARNING: Libhdfs++ library was not built because the required OpenSSL library was not found")
757-
elseif(OPENSSL_LIBRARIES)
758-
message(STATUS
759-
"WARNING: Libhdfs++ library was not built because the required CyrusSASL library was not found")
760-
else ()
761-
message(STATUS
762-
"WARNING: Libhdfs++ library was not built because the required CyrusSASL and OpenSSL libraries were not found")
763-
endif(CYRUS_SASL_SHARED_LIB AND OPENSSL_LIBRARIES)
764-
else(ORC_CXX_HAS_THREAD_LOCAL)
765-
message(STATUS
766-
"WARNING: Libhdfs++ library was not built because the required feature
767-
thread_local storage is not supported by your compiler. Known compilers that
768-
support this feature: GCC, Visual Studio, Clang (community version),
769-
Clang (version for iOS 9 and later), Clang (version for Xcode 8 and later)")
770-
endif(ORC_CXX_HAS_THREAD_LOCAL)
771-
endif(BUILD_LIBHDFSPP)
705+

0 commit comments

Comments
 (0)