コード例 #1
0
ファイル: hive.py プロジェクト: shobull/hue
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
ファイル: sentry.py プロジェクト: wdai-aa/hue
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