Today TFH refused to start with message of "org.apache.hadoop.ipc.RemoteException:The directory item limit of /tmp/hive/hive is exceeded: limit=1048576 items=1048576 ". I deleted a few thousands empty dirs and things started working.
Then I started tracing who has been producing the files, and found TFH is one of them. For example, I had one query with an Id of "a59a9acf-7b81-47ca-a8c7-1fbe0b397fcc that only executed in TFH, and no surprisingly, there is a /tmp/hive/hive/a59a9acf-7b81-47ca-a8c7-1fbe0b397fcc/_tmp_space.db dir.
I am using 1.2.3.