Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-20916

Fix typo in JSONCreateDatabaseMessage and add test for alter database

    XMLWordPrintableJSON

Details

    Description

      public JSONCreateDatabaseMessage(String server, String servicePrincipal, Database db,
            Long timestamp) {
          this.server = server;
          this.servicePrincipal = servicePrincipal;
          this.db = db.getName();
          this.timestamp = timestamp;
          try {
            this.dbJson = MessageBuilder.createDatabaseObjJson(db);
          } catch (TException ex) {
            throw new IllegalArgumentException("Could not serialize Function object", ex);
          }
          checkValid();
        }
      

      The exception message should say Database instead of Function. Also, the TestDbNotificationListener#createDatabase should be modified to make sure that the deserialized database object from the dbJson field matches with the original database object

      Attachments

        1. HIVE-20916.03.patch
          4 kB
          Vihang Karajgaonkar
        2. HIVE-20916.02.patch
          4 kB
          Vihang Karajgaonkar
        3. HIVE-20916.01.patch
          4 kB
          Vihang Karajgaonkar

        Activity

          People

            vihangk1 Vihang Karajgaonkar
            vihangk1 Vihang Karajgaonkar
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: