summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorVijay Bellur <vbellur@redhat.com>2019-07-09 16:32:36 -0700
committerVijay Bellur <vbellur@redhat.com>2019-07-09 21:41:56 -0700
commitb82743a5822626e83b233956803421fda9b1c3f9 (patch)
treea799c827d4ee6d1756347811bfe4ce627fea0458 /xlators
parentad828d2e0c930b31b870c92fbaeac7a43fee08da (diff)
Remove hadoop related code from the codebase
As Hadoop is no longer supported, dropping code for handling Hadoop access. Fixes: bz#1728417 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Change-Id: I8fcf4faacb364f1c9a8abb0c48faec337087f845
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-mountbroker.c31
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-mountbroker.h3
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.c28
-rw-r--r--xlators/mount/fuse/src/fuse-bridge.c2
-rw-r--r--xlators/mount/fuse/src/fuse-helpers.c35
5 files changed, 15 insertions, 84 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-mountbroker.c b/xlators/mgmt/glusterd/src/glusterd-mountbroker.c
index c017ccb6b01..691b96fcf66 100644
--- a/xlators/mgmt/glusterd/src/glusterd-mountbroker.c
+++ b/xlators/mgmt/glusterd/src/glusterd-mountbroker.c
@@ -242,19 +242,6 @@ const char *georep_mnt_desc_template =
"%s"
")";
-const char *hadoop_mnt_desc_template =
- "SUP("
- "volfile-server=%s "
- "client-pid=%d "
- "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 *volnames, char *user)
{
@@ -322,24 +309,6 @@ out:
return ret;
}
-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,
- GF_CLIENT_PID_HADOOP, volname, user);
- if (ret == -1)
- return ret;
-
- ret = parse_mount_pattern_desc(mspec, hadoop_mnt_desc);
- GF_FREE(hadoop_mnt_desc);
-
- return ret;
-}
-
static gf_boolean_t
match_comp(char *str, char *patcomp)
{
diff --git a/xlators/mgmt/glusterd/src/glusterd-mountbroker.h b/xlators/mgmt/glusterd/src/glusterd-mountbroker.h
index 319e05188b4..c8715223f47 100644
--- a/xlators/mgmt/glusterd/src/glusterd-mountbroker.h
+++ b/xlators/mgmt/glusterd/src/glusterd-mountbroker.h
@@ -31,9 +31,6 @@ parse_mount_pattern_desc(gf_mount_spec_t *mspec, char *pdesc);
int
make_georep_mountspec(gf_mount_spec_t *mspec, const char *volname, char *user);
-int
-make_ghadoop_mountspec(gf_mount_spec_t *mspec, const char *volname, char *user,
- char *server);
int
glusterd_do_mount(char *label, dict_t *argdict, char **path, int *op_errno);
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c
index 131a3c2b7f2..0961f904b04 100644
--- a/xlators/mgmt/glusterd/src/glusterd.c
+++ b/xlators/mgmt/glusterd/src/glusterd.c
@@ -1018,26 +1018,19 @@ _install_mount_spec(dict_t *opts, char *key, data_t *value, void *data)
glusterd_conf_t *priv = THIS->private;
char *label = NULL;
gf_boolean_t georep = _gf_false;
- gf_boolean_t ghadoop = _gf_false;
char *pdesc = value->data;
char *volname = NULL;
int rv = 0;
gf_mount_spec_t *mspec = NULL;
char *user = NULL;
- char *volfile_server = NULL;
label = strtail(key, "mountbroker.");
- /* check for presence of geo-rep/hadoop label */
+ /* check for presence of geo-rep label */
if (!label) {
label = strtail(key, "mountbroker-" GEOREP ".");
if (label)
georep = _gf_true;
- else {
- label = strtail(key, "mountbroker-" GHADOOP ".");
- if (label)
- ghadoop = _gf_true;
- }
}
if (!label)
@@ -1048,7 +1041,7 @@ _install_mount_spec(dict_t *opts, char *key, data_t *value, void *data)
goto err;
mspec->label = label;
- if (georep || ghadoop) {
+ if (georep) {
volname = gf_strdup(pdesc);
if (!volname)
goto err;
@@ -1059,18 +1052,7 @@ _install_mount_spec(dict_t *opts, char *key, data_t *value, void *data)
} else
user = label;
- if (georep)
- rv = make_georep_mountspec(mspec, volname, user);
-
- if (ghadoop) {
- volfile_server = strchr(user, ':');
- if (volfile_server)
- *volfile_server++ = '\0';
- else
- volfile_server = "localhost";
-
- rv = make_ghadoop_mountspec(mspec, volname, user, volfile_server);
- }
+ rv = make_georep_mountspec(mspec, volname, user);
GF_FREE(volname);
if (rv != 0)
@@ -2157,10 +2139,6 @@ struct volume_options options[] = {
.type = GF_OPTION_TYPE_ANY,
},
{
- .key = {"mountbroker-" GHADOOP ".*"},
- .type = GF_OPTION_TYPE_ANY,
- },
- {
.key = {GEOREP "-log-group"},
.type = GF_OPTION_TYPE_ANY,
},
diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c
index 5fa3ff532f9..b9531dbc469 100644
--- a/xlators/mount/fuse/src/fuse-bridge.c
+++ b/xlators/mount/fuse/src/fuse-bridge.c
@@ -6665,7 +6665,7 @@ init(xlator_t *this_xl)
GF_OPTION_INIT("no-root-squash", priv->no_root_squash, bool, cleanup_exit);
/* change the client_pid to no-root-squash pid only if the
- client is none of defrag process, hadoop access and gsyncd process.
+ client is neither defrag process or gsyncd process.
*/
if (!priv->client_pid_set) {
if (priv->no_root_squash == _gf_true) {
diff --git a/xlators/mount/fuse/src/fuse-helpers.c b/xlators/mount/fuse/src/fuse-helpers.c
index 5bfc40c9fcb..3b00eee8f6a 100644
--- a/xlators/mount/fuse/src/fuse-helpers.c
+++ b/xlators/mount/fuse/src/fuse-helpers.c
@@ -581,30 +581,17 @@ fuse_flip_xattr_ns(fuse_private_t *priv, char *okey, char **nkey)
int ret = 0;
gf_boolean_t need_flip = _gf_false;
- switch (priv->client_pid) {
- case GF_CLIENT_PID_GSYNCD:
- /* valid xattr(s): *xtime, volume-mark* */
- gf_log("glusterfs-fuse", GF_LOG_DEBUG,
- "PID: %d, checking xattr(s): "
- "volume-mark*, *xtime",
- priv->client_pid);
- if ((strcmp(okey, UNPRIV_XA_NS ".glusterfs.volume-mark") == 0) ||
- (fnmatch(UNPRIV_XA_NS ".glusterfs.volume-mark.*", okey,
- FNM_PERIOD) == 0) ||
- (fnmatch(UNPRIV_XA_NS ".glusterfs.*.xtime", okey, FNM_PERIOD) ==
- 0))
- need_flip = _gf_true;
- break;
-
- case GF_CLIENT_PID_HADOOP:
- /* valid xattr(s): pathinfo */
- gf_log("glusterfs-fuse", GF_LOG_DEBUG,
- "PID: %d, checking xattr(s): "
- "pathinfo",
- priv->client_pid);
- if (strcmp(okey, UNPRIV_XA_NS ".glusterfs.pathinfo") == 0)
- need_flip = _gf_true;
- break;
+ if (GF_CLIENT_PID_GSYNCD == priv->client_pid) {
+ /* valid xattr(s): *xtime, volume-mark* */
+ gf_log("glusterfs-fuse", GF_LOG_DEBUG,
+ "PID: %d, checking xattr(s): "
+ "volume-mark*, *xtime",
+ priv->client_pid);
+ if ((strcmp(okey, UNPRIV_XA_NS ".glusterfs.volume-mark") == 0) ||
+ (fnmatch(UNPRIV_XA_NS ".glusterfs.volume-mark.*", okey,
+ FNM_PERIOD) == 0) ||
+ (fnmatch(UNPRIV_XA_NS ".glusterfs.*.xtime", okey, FNM_PERIOD) == 0))
+ need_flip = _gf_true;
}
if (need_flip) {