You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by zj...@apache.org on 2015/05/09 02:42:13 UTC

[19/50] hadoop git commit: HDFS-8346. libwebhdfs build fails during link due to unresolved external symbols. Contributed by Chris Nauroth.

HDFS-8346. libwebhdfs build fails during link due to unresolved external symbols. Contributed by Chris Nauroth.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/6658007c
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/6658007c
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/6658007c

Branch: refs/heads/YARN-2928
Commit: 6658007cdbd9dc075e72c81938730c4a34423ee3
Parents: deec508
Author: Haohui Mai <wh...@apache.org>
Authored: Fri May 8 09:57:20 2015 -0700
Committer: Zhijie Shen <zj...@apache.org>
Committed: Fri May 8 17:32:48 2015 -0700

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt               |  3 +++
 .../hadoop-hdfs/src/contrib/libwebhdfs/CMakeLists.txt     |  3 +++
 .../src/contrib/libwebhdfs/src/hdfs_http_client.c         | 10 +++++++++-
 .../src/contrib/libwebhdfs/src/hdfs_http_client.h         |  2 +-
 4 files changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/6658007c/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index a83b8a7..d9a1c3a 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -695,6 +695,9 @@ Release 2.8.0 - UNRELEASED
 
     HDFS-6285. tidy an error log inside BlockReceiver. (Liang Xie via umamahesh)
 
+    HDFS-8346. libwebhdfs build fails during link due to unresolved external
+    symbols. (Chris Nauroth via wheat9)
+
 Release 2.7.1 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/6658007c/hadoop-hdfs-project/hadoop-hdfs/src/contrib/libwebhdfs/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/contrib/libwebhdfs/CMakeLists.txt b/hadoop-hdfs-project/hadoop-hdfs/src/contrib/libwebhdfs/CMakeLists.txt
index 25f95b2..44f0c42 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/contrib/libwebhdfs/CMakeLists.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/contrib/libwebhdfs/CMakeLists.txt
@@ -31,6 +31,9 @@ add_dual_library(webhdfs
     src/hdfs_json_parser.c
     ../../main/native/libhdfs/exception.c
     ../../main/native/libhdfs/jni_helper.c
+    ../../${OS_DIR}/mutexes.c
+    ../../${OS_DIR}/thread_local_storage.c
+    ../../main/native/libhdfs/common/htable.c
 )
 target_link_dual_libraries(webhdfs
     ${JAVA_JVM_LIBRARY}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/6658007c/hadoop-hdfs-project/hadoop-hdfs/src/contrib/libwebhdfs/src/hdfs_http_client.c
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/contrib/libwebhdfs/src/hdfs_http_client.c b/hadoop-hdfs-project/hadoop-hdfs/src/contrib/libwebhdfs/src/hdfs_http_client.c
index dc58318..dc5ca41 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/contrib/libwebhdfs/src/hdfs_http_client.c
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/contrib/libwebhdfs/src/hdfs_http_client.c
@@ -28,7 +28,15 @@ static volatile int curlGlobalInited = 0;
 
 const char *hdfs_strerror(int errnoval)
 {
-  return terror(errnoval);
+#if defined(__sun)
+// MT-Safe under Solaris which doesn't support sys_errlist/sys_nerr
+  return strerror(errnoval);
+#else
+  if ((errnoval < 0) || (errnoval >= sys_nerr)) {
+    return "unknown error.";
+  }
+  return sys_errlist[errnoval];
+#endif
 }
 
 int initResponseBuffer(struct ResponseBuffer **buffer)

http://git-wip-us.apache.org/repos/asf/hadoop/blob/6658007c/hadoop-hdfs-project/hadoop-hdfs/src/contrib/libwebhdfs/src/hdfs_http_client.h
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/contrib/libwebhdfs/src/hdfs_http_client.h b/hadoop-hdfs-project/hadoop-hdfs/src/contrib/libwebhdfs/src/hdfs_http_client.h
index 0e70dec..8d1c3db 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/contrib/libwebhdfs/src/hdfs_http_client.h
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/contrib/libwebhdfs/src/hdfs_http_client.h
@@ -284,7 +284,7 @@ int launchDnAPPEND(const char *url, struct webhdfsBuffer *buffer,
                    struct Response **response) __attribute__ ((warn_unused_result));
 
 /**
- * Call sys_errlist to get the error message string for the given error code
+ * Thread-safe strerror alternative.
  *
  * @param errnoval  The error code value
  * @return          The error message string mapped to the given error code