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 artifact in hdfs.
  :param local_file: source file path
  :param artifact_path: when specified will attempt to write under artifact_uri/artifact_path
docstr_tok: ["Log","artifact","in","hdfs",".",":","param","local_file",":","source","file","path",":","param","artifact_path",":","when","specified","will","attempt","to","write","under","artifact_uri\/artifact_path"]
code: def log_artifact(self, local_file, artifact_path=None):
      """
          Log artifact in hdfs.
      :param local_file: source file 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:
          _, file_name = os.path.split(local_file)
          destination = posixpath.join(hdfs_base_path, file_name)
          with open(local_file, "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 2 for calling the HdfsArtifactRepository obj's underlying member method code with example usage: obj.log_artifact(local_file, artifact_path) without return types