fe/src/main/java/com/cloudera/impala/catalog/HdfsCompression.java
/* Given a file name return its compression type, if any. */
Given a file name return its compression type, if any.
Given a file name return its compression type if any .
public static HdfsCompression fromFileName(String fileName) {
    int index = fileName.lastIndexOf(".");
    if (index == -1) {
      return NONE;
    }
    String suffix = fileName.substring(index + 1);
    if (SUFFIX_MAP.containsKey(suffix)) {
      return SUFFIX_MAP.get(suffix);
    }
    return NONE;
  }
public static HdfsCompression fromFileName ( String fileName ) { int index = fileName . lastIndexOf ( "." ) ; if ( index == - 1 ) { return NONE ; } String suffix = fileName . substring ( index + 1 ) ; if ( SUFFIX_MAP . containsKey ( suffix ) ) { return SUFFIX_MAP . get ( suffix ) ; } return NONE ; }
Given a file name return its compression type, if any.
Given a file name return its compression type if any .