diff options
author | Venky Shankar <venky@gluster.com> | 2011-09-13 11:36:55 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-09-13 10:14:04 -0700 |
commit | d705b28fd1bb066632854da493031118776d00df (patch) | |
tree | fa1e2710695b2c0ad6d9bc93d7b235922c634f7e /xlators/mgmt/glusterd/src/glusterd-mountbroker.c | |
parent | b039cb193eddc51c6f31bf9a230281faada475fe (diff) |
GlusterFS Hadoop specific DSL for mountbroker
Change-Id: Ie379992bdea0974c8c5e1a4d7bc3e87cefe0d256
BUG: 3539
Reviewed-on: http://review.gluster.com/404
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-mountbroker.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-mountbroker.c | 26 |
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) { |