Skip to content

Commit

Permalink
[Datastore] Fix HdfsStore.rm() (#5471)
Browse files Browse the repository at this point in the history
  • Loading branch information
gtopper committed Apr 30, 2024
1 parent b0e1c6c commit 75fcc2d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mlrun/datastore/hdfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import os
from urllib.parse import urlparse

import fsspec

Expand Down Expand Up @@ -49,3 +50,7 @@ def url(self):
@property
def spark_url(self):
return f"hdfs://{self.host}:{self.port}"

def rm(self, url, recursive=False, maxdepth=None):
path = urlparse(url).path
self.filesystem.rm(path=path, recursive=recursive, maxdepth=maxdepth)

0 comments on commit 75fcc2d

Please sign in to comment.