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 79106bc23c..e696072d8c 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; 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 35645c66b6..73b4f97a3a 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 diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 277152efdd..fd28c0211c 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -1590,6 +1590,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