Skip to content

Commit

Permalink
Remove redundant parameters from IcebergTableOperationsProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
findepi committed Oct 16, 2021
1 parent 55b5b9d commit 3dff0a5
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import com.google.common.collect.ImmutableMap;
import io.airlift.slice.Slice;
import io.airlift.slice.SliceUtf8;
import io.trino.plugin.hive.HdfsEnvironment.HdfsContext;
import io.trino.plugin.hive.metastore.HiveMetastore;
import io.trino.plugin.iceberg.catalog.IcebergTableOperations;
import io.trino.plugin.iceberg.catalog.IcebergTableOperationsProvider;
Expand Down Expand Up @@ -124,8 +123,6 @@ public static Table loadIcebergTable(HiveMetastore metastore, IcebergTableOperat
{
TableOperations operations = tableOperationsProvider.createTableOperations(
metastore,
new HdfsContext(session),
session.getQueryId(),
session,
table.getSchemaName(),
table.getTableName(),
Expand All @@ -143,8 +140,6 @@ public static Table getIcebergTableWithMetadata(
{
IcebergTableOperations operations = tableOperationsProvider.createTableOperations(
metastore,
new HdfsContext(session),
session.getQueryId(),
session,
table.getSchemaName(),
table.getTableName(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,6 @@ public Transaction newCreateTableTransaction(ConnectorSession session, SchemaTab
TableMetadata metadata = newTableMetadata(schema, partitionSpec, location, properties);
TableOperations ops = tableOperationsProvider.createTableOperations(
metastore,
new HdfsContext(session),
session.getQueryId(),
session,
schemaTableName.getSchemaName(),
schemaTableName.getTableName(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
*/
package io.trino.plugin.iceberg.catalog;

import io.trino.plugin.hive.HdfsEnvironment.HdfsContext;
import io.trino.plugin.hive.metastore.HiveMetastore;
import io.trino.spi.connector.ConnectorSession;

Expand All @@ -23,8 +22,6 @@ public interface IcebergTableOperationsProvider
{
IcebergTableOperations createTableOperations(
HiveMetastore hiveMetastore,
HdfsContext hdfsContext,
String queryId,
ConnectorSession session,
String database,
String table,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,14 @@ public FileMetastoreTableOperationsProvider(FileIoProvider fileIoProvider)
@Override
public IcebergTableOperations createTableOperations(
HiveMetastore hiveMetastore,
HdfsContext hdfsContext,
String queryId,
ConnectorSession session,
String database,
String table,
Optional<String> owner,
Optional<String> location)
{
return new FileMetastoreTableOperations(
fileIoProvider.createFileIo(hdfsContext, queryId),
fileIoProvider.createFileIo(new HdfsContext(session), session.getQueryId()),
hiveMetastore,
session,
database,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,14 @@ public HiveMetastoreTableOperationsProvider(FileIoProvider fileIoProvider, Thrif
@Override
public IcebergTableOperations createTableOperations(
HiveMetastore hiveMetastore,
HdfsContext hdfsContext,
String queryId,
ConnectorSession session,
String database,
String table,
Optional<String> owner,
Optional<String> location)
{
return new HiveMetastoreTableOperations(
fileIoProvider.createFileIo(hdfsContext, queryId),
fileIoProvider.createFileIo(new HdfsContext(session), session.getQueryId()),
hiveMetastore,
thriftMetastore,
session,
Expand Down

0 comments on commit 3dff0a5

Please sign in to comment.