DanielZhu58 commented on code in PR #3477:
URL: https://github.com/apache/hive/pull/3477#discussion_r942221981


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java:
##########
@@ -1399,6 +1403,43 @@ public void create_database(final Database db)
     }
   }
 
+  @Override
+  public void create_database_req(final CreateDatabaseRequest req)
+          throws AlreadyExistsException, InvalidObjectException, MetaException 
{
+    Database db = req.getDatabase();
+    boolean skipFSWrites = req.isSkipFSWrites();
+    startFunction("create_database_req", ": " + db.toString());
+    boolean success = false;
+    Exception ex = null;
+    if (!db.isSetCatalogName()) {
+      db.setCatalogName(getDefaultCatalog(conf));
+    }
+    try {
+      try {
+        if (null != get_database_core(db.getCatalogName(), db.getName())) {
+          throw new AlreadyExistsException("Database " + db.getName() + " 
already exists");
+        }
+      } catch (NoSuchObjectException e) {
+        // expected
+      }
+      create_database_core(getMS(), db, skipFSWrites);
+      success = true;
+    } catch (Exception e) {
+      ex = e;

Review Comment:
   Yes, I can.



##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HMSHandler.java:
##########
@@ -1400,6 +1405,43 @@ public void create_database(final Database db)
     }
   }
 
+  @Override
+  public void create_database_req(final CreateDatabaseRequest req)
+          throws AlreadyExistsException, InvalidObjectException, MetaException 
{
+    Database db = req.getDatabase();
+    boolean skipFSWrites = req.isSkipFSWrites();

Review Comment:
   Sure.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to