Пример #1
0
def _massage_uri(uri):
    if uri:
        if uri.startswith("hdfs:///"):
            uri = uri.replace("hdfs://", get_defaultfs())
        elif uri.startswith("/"):
            uri = get_defaultfs() + uri

    return uri
Пример #2
0
def _massage_uri(uri):
  if uri:
    if uri.startswith('hdfs:///'):
      uri = uri.replace('hdfs://', get_defaultfs())
    elif uri.startswith('/'):
      uri = get_defaultfs() + uri

  return uri
Пример #3
0
def _massage_uri(uri):
  if uri:
    if not isinstance(uri, str):
      uri = uri.decode('utf-8')
    if uri.startswith('hdfs:///'):
      uri = uri.replace('hdfs://', get_defaultfs())
    elif uri.startswith('/'):
      uri = get_defaultfs() + uri

  return uri