rdblue commented on a change in pull request #187: Catalog Implementation for 
hive and hadoop.
URL: https://github.com/apache/incubator-iceberg/pull/187#discussion_r284913239
 
 

 ##########
 File path: core/src/main/java/org/apache/iceberg/hadoop/HadoopCatalog.java
 ##########
 @@ -64,40 +61,73 @@ public Table load(String location) {
     return new BaseTable(ops, location);
   }
 
+  private TableOperations newTableOps(String location) {
+    return new HadoopTableOperations(new Path(location), conf);
+  }
+
+  @Override
+  public void setConf(Configuration conf) {
+    this.conf = conf;
+  }
+
+  @Override
+  public Configuration getConf() {
+    return conf;
+  }
+
   /**
-   * Create a table using the FileSystem implementation resolve from
-   * location.
+   * Create a table using the FileSystem implementation resolve from location.
    *
-   * @param schema iceberg schema used to create the table
-   * @param spec partition specification
-   * @param location a path URI (e.g. hdfs:///warehouse/my_table)
-   * @return newly created table implementation
+   * @param tableIdentifier an identifier to identify this table in a 
namespace.
+   * @param schema the schema for this table, can not be null.
+   * @param spec the partition spec for this table, can not be null.
+   * @param tableProperties can be null or empty
    */
   @Override
-  public Table create(Schema schema, PartitionSpec spec, Map<String, String> 
properties,
-                      String location) {
+  public Table createTable(
+      TableIdentifier tableIdentifier, Schema schema, PartitionSpec spec, 
Map<String, String> tableProperties) {
+    String location = location(tableIdentifier);
     TableOperations ops = newTableOps(location);
     if (ops.current() != null) {
       throw new AlreadyExistsException("Table already exists at location: " + 
location);
     }
 
-    TableMetadata metadata = TableMetadata.newTableMetadata(ops, schema, spec, 
location, properties);
+    TableMetadata metadata = TableMetadata.newTableMetadata(ops,
 
 Review comment:
   I think the preferred formatting is to keep arguments on the same line until 
you have to go to the next one. A newline before the first argument is optional.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

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

Reply via email to