Skip to content

Commit

Permalink
[#232] Add more file types into FileTypeHistogram
Browse files Browse the repository at this point in the history
  • Loading branch information
pjeli authored May 31, 2019
1 parent c139c0d commit cd6cfd6
Showing 1 changed file with 26 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,27 @@ private enum Types {
PYTHON,
JAVA,
CLASS,
LOCK
LOCK,
APP_LOG,
AVSC,
NAMES,
NN,
GBT,
TEMP,
LZ4,
LZO,
DELTA,
SNAPSHOT,
SQL
}

private static final Map<String, String> startsWithMap =
new HashMap<String, String>() {
{
put("part_r", Types.PART_R.name());
put("part-r", Types.PART_R.name());
put("part_m", Types.PART_M.name());
put("part-m", Types.PART_M.name());
}
};

Expand All @@ -96,13 +109,15 @@ private enum Types {
private static final Map<String, String> suffixExtMap =
new HashMap<String, String>() {
{
put("_45454", Types.APP_LOG.name());
put(".batch", Types.BATCH.name());
put(".txt", Types.TXT.name());
put(".tsv", Types.TSV.name());
put(".bz2", Types.BZ2.name());
put(".csv", Types.CSV.name());
put(".log", Types.LOG.name());
put(".avro", Types.AVRO.name());
put(".avsc", Types.AVSC.name());
put(".snappy", Types.SNAPPY.name());
put(".parquet", Types.PARQUET.name());
put(".gz", Types.GZIP.name());
Expand All @@ -117,6 +132,16 @@ private enum Types {
put(".jar", Types.JAR.name());
put(".zip", Types.ZIP.name());
put(".gzip", Types.GZIP.name());
put(".names", Types.NAMES.name());
put(".nn", Types.NN.name());
put(".gbt", Types.GBT.name());
put(".tmp", Types.TEMP.name());
put(".temp", Types.TEMP.name());
put(".lz4", Types.LZ4.name());
put(".lzo", Types.LZO.name());
put(".delta", Types.DELTA.name());
put(".snapshot", Types.SNAPSHOT.name());
put(".sql", Types.SQL.name());
put(".dtdone", Types.DTDONE.name());
put(".done", Types.DONE.name());
put(".jhist", Types.JHIST.name());
Expand Down

0 comments on commit cd6cfd6

Please sign in to comment.