Skip to content

Commit 437a8a8

Browse files
harshith-212shubhluck
authored andcommitted
Revert "HDFS-15977. Call explicit_bzero only if it is available. (apache#2914)"
This reverts commit a277946.
1 parent 6be05eb commit 437a8a8

File tree

4 files changed

+0
-18
lines changed

4 files changed

+0
-18
lines changed

hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ find_package(GSasl)
4848
find_package(Threads)
4949

5050
include(CheckCXXSourceCompiles)
51-
include(CheckSymbolExists)
5251

5352
# Check if thread_local is supported
5453
unset (THREAD_LOCAL_SUPPORTED CACHE)
@@ -142,11 +141,6 @@ else (NOT NO_SASL)
142141
message(STATUS "Compiling with NO SASL SUPPORT")
143142
endif (NOT NO_SASL)
144143

145-
check_symbol_exists(explicit_bzero "string.h" HAVE_EXPLICIT_BZERO)
146-
if(HAVE_EXPLICIT_BZERO)
147-
add_definitions(-DHAVE_EXPLICIT_BZERO)
148-
endif()
149-
150144
add_definitions(-DASIO_STANDALONE -DASIO_CPP11_DATE_TIME)
151145

152146
# Disable optimizations if compiling debug

hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/bindings/c/hdfs.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1402,11 +1402,7 @@ int hdfsGetBlockLocations(hdfsFS fs, const char *path, struct hdfsBlockLocations
14021402
hdfsBlockLocations *locations = new struct hdfsBlockLocations();
14031403
(*locations_out) = locations;
14041404

1405-
#ifdef HAVE_EXPLICIT_BZERO
1406-
explicit_bzero(locations, sizeof(*locations));
1407-
#else
14081405
bzero(locations, sizeof(*locations));
1409-
#endif
14101406
locations->fileLength = ppLocations->getFileLength();
14111407
locations->isLastBlockComplete = ppLocations->isLastBlockComplete();
14121408
locations->isUnderConstruction = ppLocations->isUnderConstruction();

hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/hdfs_ext_test.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -475,11 +475,7 @@ TEST_F(HdfsExtTest, TestReadStats) {
475475
hdfsFile file = hdfsOpenFile(fs, path.c_str(), O_WRONLY, 0, 0, 0);
476476
EXPECT_NE(nullptr, file);
477477
void * buf = malloc(size);
478-
#ifdef HAVE_EXPLICIT_BZERO
479-
explicit_bzero(buf, size);
480-
#else
481478
bzero(buf, size);
482-
#endif
483479
EXPECT_EQ(size, hdfsWrite(fs, file, buf, size));
484480
free(buf);
485481
EXPECT_EQ(0, hdfsCloseFile(fs, file));

hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/tests/hdfspp_mini_dfs.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,7 @@ class HdfsHandle {
9292
hdfsFile file = hdfsOpenFile(*this, path.c_str(), O_WRONLY, 0, 0, 0);
9393
EXPECT_NE(nullptr, file);
9494
void * buf = malloc(size);
95-
#ifdef HAVE_EXPLICIT_BZERO
96-
explicit_bzero(buf, size);
97-
#else
9895
bzero(buf, size);
99-
#endif
10096
EXPECT_EQ(1024, hdfsWrite(*this, file, buf, size));
10197
EXPECT_EQ(0, hdfsCloseFile(*this, file));
10298
free(buf);

0 commit comments

Comments
 (0)