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
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
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