0.207 还不支持设置history file,只能是 HOME目录下的.presto_history
Central Repository: com/facebook/presto/presto-cli/0.207 (maven.org)
1 2 3 4 |
private static MemoryHistory getHistory() { return getHistory(new File(getUserHome(), ".presto_history")); } |
较新的版本(如: 0.284 )就可以通过环境变量 PRESTO_HISTORY_FILE 来设置了:
1 2 3 4 5 6 7 8 9 10 11 12 |
private static MemoryHistory getHistory() { String historyFilePath = System.getenv("PRESTO_HISTORY_FILE"); File historyFile; if (isNullOrEmpty(historyFilePath)) { historyFile = new File(getUserHome(), ".presto_history"); } else { historyFile = new File(historyFilePath); } return getHistory(historyFile); } |
查看presto版本号:
1 2 |
$ presto --version Presto CLI 0.207-dirty |