Hive 蜂巢历史通信无法工作

Hive 蜂巢历史通信无法工作,hive,Hive,您好,我是hadoop hive的基础学习者。$HOME/.hivehistory不起作用,或者让我知道在哪里键入该命令。由于某些原因,我关闭了终端,过了一段时间才打开。现在我如何打开以前的命令历史记录。请帮助我。我无法进行排序。。hivehistory位于调用CLI的用户,例如- 当使用usercloudera调用时(这是我当前使用的用户) 使用用户配置单元调用时 bash-4.1$ ls -l ~hive/.hivehistory -rw-r--r-- 1 hive hive 20 May

您好,我是hadoop hive的基础学习者。$HOME/.hivehistory不起作用,或者让我知道在哪里键入该命令。由于某些原因,我关闭了终端,过了一段时间才打开。现在我如何打开以前的命令历史记录。请帮助我。我无法进行排序。

。hivehistory
位于调用CLI的用户,例如-

当使用user
cloudera
调用时(这是我当前使用的用户)

使用用户
配置单元调用时

bash-4.1$ ls -l ~hive/.hivehistory 
-rw-r--r-- 1 hive hive 20 May  6 10:53 /var/lib/hive/.hivehistory

源代码:

bash-4.1$ ls -l ~hive/.hivehistory 
-rw-r--r-- 1 hive hive 20 May  6 10:53 /var/lib/hive/.hivehistory
  private void setupCmdHistory() {
    final String HISTORYFILE = ".hivehistory";
    String historyDirectory = System.getProperty("user.home");
    PersistentHistory history = null;
    try {
      if ((new File(historyDirectory)).exists()) {
        String historyFile = historyDirectory + File.separator + HISTORYFILE;
        history = new FileHistory(new File(historyFile));
        reader.setHistory(history);
      } else {
        System.err.println("WARNING: Directory for Hive history file: " + historyDirectory +
                           " does not exist.   History will not be available during this session.");
      }
    } catch (Exception e) {
      System.err.println("WARNING: Encountered an error while trying to initialize Hive's " +
                         "history file.  History will not be available during this session.");
      System.err.println(e.getMessage());
    }