class_docstr: Stores artifacts on HDFS.
  
  This repository is used with URIs of the form ``hdfs:/<path>``. The repository can only be used
  together with the RestStore.
docstr:     Log artifacts in hdfs.
      Missing remote sub-directories will be created if needed.
  :param local_dir: source dir path
  :param artifact_path: when specified will attempt to write under artifact_uri/artifact_path
docstr_tok: ["Log","artifacts","in","hdfs",".","Missing","remote","sub-directories","will","be","created","if","needed",".",":","param","local_dir",":","source","dir","path",":","param","artifact_path",":","when","specified","will","attempt","to","write","under","artifact_uri\/artifact_path"]
code: def log_artifacts(self, local_dir, artifact_path=None):
      """
          Log artifacts in hdfs.
          Missing remote sub-directories will be created if needed.
      :param local_dir: source dir path
      :param artifact_path: when specified will attempt to write under artifact_uri/artifact_path
      """
      hdfs_base_path = _resolve_base_path(self.path, artifact_path)
  
      with hdfs_system(
          scheme=self.scheme, host=self.host, port=self.port
      ) as hdfs:
          if not hdfs.exists(hdfs_base_path):
              hdfs.mkdir(hdfs_base_path)
  
          for subdir_path, _, files in os.walk(local_dir):
              relative_path = _relative_path_local(
                  local_dir, subdir_path
              )
  
              hdfs_subdir_path = (
                  posixpath.join(hdfs_base_path, relative_path)
                  if relative_path
                  else hdfs_base_path
              )
  
              if not hdfs.exists(hdfs_subdir_path):
                  hdfs.mkdir(hdfs_subdir_path)
  
              for each_file in files:
                  source = os.path.join(subdir_path, each_file)
                  destination = posixpath.join(
                      hdfs_subdir_path, each_file
                  )
                  with open(source, "rb") as f:
                      hdfs.upload(destination, f)
  
imports: import os
  import posixpath
  import tempfile
  import urllib.parse
  from contextlib import contextmanager
  import packaging.version
  from mlflow.entities import FileInfo
  from mlflow.environment_variables import MLFLOW_KERBEROS_TICKET_CACHE, MLFLOW_KERBEROS_USER, MLFLOW_PYARROW_EXTRA_CONF
  from mlflow.exceptions import MlflowException
  from mlflow.store.artifact.artifact_repo import ArtifactRepository
  from mlflow.utils.file_utils import mkdir, relative_path_to_artifact_path
label_desc: Use image node_id 3 for calling the HdfsArtifactRepository obj's underlying member method code with example usage: obj.log_artifacts(local_dir, artifact_path) without return types