'Take an HDFS path (hdfs://nn:port/foo) or just (/foo) and split it into
the standard urlsplit\'s 5-tuple.'

@staticmethod
def urlsplit(url):

    i = url.find('://')
    if (i == (-1)):
        return ('hdfs', '', normpath(url), '', '')
    schema = url[:i]
    if (schema not in ('hdfs', 'viewfs')):
        return urlparse.urlsplit(url)
    url = url[(i + 3):]
    i = url.find('/')
    if (i == (-1)):
        return (schema, url, '/', '', '')
    netloc = url[:i]
    path = url[i:]
    return (schema, netloc, normpath(path), '', '')
