XiaokunDing commented on a change in pull request #919: [ISSUE #672] Add 
SupportsNamespaces on HiveCatalog and HadoopCatalog
URL: https://github.com/apache/incubator-iceberg/pull/919#discussion_r407846042
 
 

 ##########
 File path: core/src/main/java/org/apache/iceberg/hadoop/HadoopCatalog.java
 ##########
 @@ -200,7 +210,101 @@ public void renameTable(TableIdentifier from, 
TableIdentifier to) {
   }
 
   @Override
-  public void close() throws IOException {
+  public void createNamespace(Namespace namespace, ImmutableMap<String, 
String> meta) {
+    Preconditions.checkArgument(
+        !namespace.isEmpty(),
+        "Cannot create namespace with invalid name: %s", namespace);
+    if (!meta.isEmpty()) {
+      throw new UnsupportedOperationException("Cannot create namespace " + 
namespace + " : metadata is not supported");
+    }
+
+    Path nsPath = new Path(warehouseLocation, SLASH.join(namespace.levels()));
+    FileSystem fs = Util.getFs(nsPath, conf);
 
 Review comment:
   OK

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to