summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-mountbroker.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-mountbroker.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-mountbroker.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-mountbroker.c b/xlators/mgmt/glusterd/src/glusterd-mountbroker.c
index 03767ee6de6..590a3f96848 100644
--- a/xlators/mgmt/glusterd/src/glusterd-mountbroker.c
+++ b/xlators/mgmt/glusterd/src/glusterd-mountbroker.c
@@ -277,6 +277,17 @@ const char *georep_mnt_desc_template =
"log-level=* "
")";
+const char *hadoop_mnt_desc_template =
+ "SUP("
+ "volfile-server=%s "
+ "volfile-id=%s "
+ "user-map-root=%s "
+ ")"
+ "SUB+("
+ "log-file="DEFAULT_LOG_FILE_DIRECTORY"/"GHADOOP"*/* "
+ "log-level=* "
+ ")";
+
int
make_georep_mountspec (gf_mount_spec_t *mspec, const char *volname,
char *user)
@@ -292,6 +303,21 @@ make_georep_mountspec (gf_mount_spec_t *mspec, const char *volname,
return parse_mount_pattern_desc (mspec, georep_mnt_desc);
}
+int
+make_ghadoop_mountspec (gf_mount_spec_t *mspec, const char *volname,
+ char *user, char *server)
+{
+ char *hadoop_mnt_desc = NULL;
+ int ret = 0;
+
+ ret = gf_asprintf (&hadoop_mnt_desc, hadoop_mnt_desc_template,
+ server, volname, user);
+ if (ret == -1)
+ return ret;
+
+ return parse_mount_pattern_desc (mspec, hadoop_mnt_desc);
+}
+
static gf_boolean_t
match_comp (char *str, char *patcomp)
{