Explorar el Código

HUE-2467 [sentry] Check NN plugin prefixes for exact match of subpath

Do not match /user/hive/warehouse3 if prefix is /user/hive/warehouse
Romain Rigaux hace 11 años
padre
commit
94d7717
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      desktop/libs/hadoop/src/hadoop/fs/webhdfs.py

+ 1 - 1
desktop/libs/hadoop/src/hadoop/fs/webhdfs.py

@@ -110,7 +110,7 @@ class WebHdfs(Hdfs):
   def is_sentry_managed(cls, path):
     prefixes = get_nn_sentry_prefixes().split(',')
 
-    return any([path.startswith(p) for p in prefixes if p])
+    return any([path == p or path.startswith(p + '/') for p in prefixes if p])
 
   @property
   def fs_defaultfs(self):