Repository: hadoop Updated Branches: refs/heads/branch-2 bb87b4222 -> 7eb0daefc
HDFS-9307. fuseConnect should be private to fuse_connect.c (Mingliang Liu via Colin P. McCabe) (cherry picked from commit faeb6a3f89f3580a5b1a40c6a1f6205269a5aa7a) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/7eb0daef Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/7eb0daef Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/7eb0daef Branch: refs/heads/branch-2 Commit: 7eb0daefc89dc1700cadab800b25f0f69cc6f3d4 Parents: bb87b42 Author: Colin Patrick Mccabe <[email protected]> Authored: Tue Oct 27 11:41:05 2015 -0700 Committer: Colin Patrick Mccabe <[email protected]> Committed: Tue Oct 27 11:41:27 2015 -0700 ---------------------------------------------------------------------- .../src/main/native/fuse-dfs/fuse_connect.c | 16 +++++++++++++++- .../src/main/native/fuse-dfs/fuse_connect.h | 18 ++---------------- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ 3 files changed, 20 insertions(+), 17 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/7eb0daef/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/fuse_connect.c ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/fuse_connect.c b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/fuse_connect.c index 79106bc..e696072 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/fuse_connect.c +++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/fuse_connect.c @@ -522,7 +522,21 @@ error: return ret; } -int fuseConnect(const char *usrname, struct fuse_context *ctx, +/** + * Get a libhdfs connection. + * + * If there is an existing connection, it will be reused. If not, a new one + * will be created. + * + * You must call hdfsConnRelease on the connection you get back! + * + * @param usrname The username to use + * @param ctx The FUSE context to use (contains UID, PID of requestor) + * @param conn (out param) The HDFS connection + * + * @return 0 on success; error code otherwise + */ +static int fuseConnect(const char *usrname, struct fuse_context *ctx, struct hdfsConn **out) { int ret; http://git-wip-us.apache.org/repos/asf/hadoop/blob/7eb0daef/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/fuse_connect.h ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/fuse_connect.h b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/fuse_connect.h index 35645c6..73b4f97 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/fuse_connect.h +++ b/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/fuse-dfs/fuse_connect.h @@ -39,25 +39,11 @@ int fuseConnectInit(const char *nnUri, int port); * Get a libhdfs connection. * * If there is an existing connection, it will be reused. If not, a new one - * will be created. + * will be created. The username will be determined from the FUSE thread + * context. * * You must call hdfsConnRelease on the connection you get back! * - * @param usrname The username to use - * @param ctx The FUSE context to use (contains UID, PID of requestor) - * @param conn (out param) The HDFS connection - * - * @return 0 on success; error code otherwise - */ -int fuseConnect(const char *usrname, struct fuse_context *ctx, - struct hdfsConn **out); - -/** - * Get a libhdfs connection. - * - * The same as fuseConnect, except the username will be determined from the FUSE - * thread context. - * * @param conn (out param) The HDFS connection * * @return 0 on success; error code otherwise http://git-wip-us.apache.org/repos/asf/hadoop/blob/7eb0daef/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 c7a867a..0118dbe 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -754,6 +754,9 @@ Release 2.8.0 - UNRELEASED HDFS-9299. Give ReplicationMonitor a readable thread name (Staffan Friberg via Colin P. McCabe) + HDFS-9307. fuseConnect should be private to fuse_connect.c (Mingliang Liu + via Colin P. McCabe) + OPTIMIZATIONS HDFS-8026. Trace FSOutputSummer#writeChecksumChunks rather than
