Skip to content

Commit

Permalink
Remove unused TableParameterCodec
Browse files Browse the repository at this point in the history
  • Loading branch information
electrum committed Mar 11, 2019
1 parent 7662f71 commit f6754be
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ public void configure(Binder binder)
newSetBinder(binder, EventClient.class).addBinding().to(HiveEventClient.class).in(Scopes.SINGLETON);
binder.bind(HivePartitionManager.class).in(Scopes.SINGLETON);
binder.bind(LocationService.class).to(HiveLocationService.class).in(Scopes.SINGLETON);
binder.bind(TableParameterCodec.class).in(Scopes.SINGLETON);
binder.bind(HiveMetadataFactory.class).in(Scopes.SINGLETON);
binder.bind(new TypeLiteral<Supplier<TransactionalMetadata>>() {}).to(HiveMetadataFactory.class).in(Scopes.SINGLETON);
binder.bind(HiveTransactionManager.class).in(Scopes.SINGLETON);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ public class HiveMetadata
private final DateTimeZone timeZone;
private final TypeManager typeManager;
private final LocationService locationService;
private final TableParameterCodec tableParameterCodec;
private final JsonCodec<PartitionUpdate> partitionUpdateCodec;
private final boolean writesToNonManagedTablesEnabled;
private final boolean createsOfNonManagedTablesEnabled;
Expand All @@ -256,7 +255,6 @@ public HiveMetadata(
boolean createsOfNonManagedTablesEnabled,
TypeManager typeManager,
LocationService locationService,
TableParameterCodec tableParameterCodec,
JsonCodec<PartitionUpdate> partitionUpdateCodec,
TypeTranslator typeTranslator,
String prestoVersion,
Expand All @@ -271,7 +269,6 @@ public HiveMetadata(
this.timeZone = requireNonNull(timeZone, "timeZone is null");
this.typeManager = requireNonNull(typeManager, "typeManager is null");
this.locationService = requireNonNull(locationService, "locationService is null");
this.tableParameterCodec = requireNonNull(tableParameterCodec, "tableParameterCodec is null");
this.partitionUpdateCodec = requireNonNull(partitionUpdateCodec, "partitionUpdateCodec is null");
this.writesToNonManagedTablesEnabled = writesToNonManagedTablesEnabled;
this.createsOfNonManagedTablesEnabled = createsOfNonManagedTablesEnabled;
Expand Down Expand Up @@ -495,9 +492,6 @@ private ConnectorTableMetadata doGetTableMetadata(SchemaTableName tableName)
properties.put(AVRO_SCHEMA_URL, avroSchemaUrl);
}

// Hook point for extended versions of the Hive Plugin
properties.putAll(tableParameterCodec.decode(table.get().getParameters()));

Optional<String> comment = Optional.ofNullable(table.get().getParameters().get(TABLE_COMMENT));

return new ConnectorTableMetadata(tableName, columns.build(), properties.build(), comment);
Expand Down Expand Up @@ -742,9 +736,6 @@ private Map<String, String> getEmptyTableProperties(ConnectorTableMetadata table
{
ImmutableMap.Builder<String, String> tableProperties = ImmutableMap.builder();

// Hook point for extended versions of the Hive Plugin
tableProperties.putAll(tableParameterCodec.encode(tableMetadata.getProperties()));

// ORC format specific properties
List<String> columns = getOrcBloomFilterColumns(tableMetadata.getProperties());
if (columns != null && !columns.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public class HiveMetadataFactory
private final DateTimeZone timeZone;
private final TypeManager typeManager;
private final LocationService locationService;
private final TableParameterCodec tableParameterCodec;
private final JsonCodec<PartitionUpdate> partitionUpdateCodec;
private final BoundedExecutor renameExecution;
private final TypeTranslator typeTranslator;
Expand All @@ -64,7 +63,6 @@ public HiveMetadataFactory(
@ForHiveClient ExecutorService executorService,
TypeManager typeManager,
LocationService locationService,
TableParameterCodec tableParameterCodec,
JsonCodec<PartitionUpdate> partitionUpdateCodec,
TypeTranslator typeTranslator,
NodeVersion nodeVersion)
Expand All @@ -84,7 +82,6 @@ public HiveMetadataFactory(
hiveClientConfig.getMaxPartitionsPerScan(),
typeManager,
locationService,
tableParameterCodec,
partitionUpdateCodec,
executorService,
typeTranslator,
Expand All @@ -106,7 +103,6 @@ public HiveMetadataFactory(
int maxPartitions,
TypeManager typeManager,
LocationService locationService,
TableParameterCodec tableParameterCodec,
JsonCodec<PartitionUpdate> partitionUpdateCodec,
ExecutorService executorService,
TypeTranslator typeTranslator,
Expand All @@ -125,7 +121,6 @@ public HiveMetadataFactory(
this.timeZone = requireNonNull(timeZone, "timeZone is null");
this.typeManager = requireNonNull(typeManager, "typeManager is null");
this.locationService = requireNonNull(locationService, "locationService is null");
this.tableParameterCodec = requireNonNull(tableParameterCodec, "tableParameterCodec is null");
this.partitionUpdateCodec = requireNonNull(partitionUpdateCodec, "partitionUpdateCodec is null");
this.typeTranslator = requireNonNull(typeTranslator, "typeTranslator is null");
this.prestoVersion = requireNonNull(prestoVersion, "prestoVersion is null");
Expand Down Expand Up @@ -161,7 +156,6 @@ public HiveMetadata get()
createsOfNonManagedTablesEnabled,
typeManager,
locationService,
tableParameterCodec,
partitionUpdateCodec,
typeTranslator,
prestoVersion,
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,6 @@ protected final void setup(String databaseName, HiveClientConfig hiveClientConfi
getHiveClientConfig().getMaxPartitionsPerScan(),
TYPE_MANAGER,
locationService,
new TableParameterCodec(),
partitionUpdateCodec,
newFixedThreadPool(2),
new HiveTypeTranslator(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ protected void setup(String host, int port, String databaseName, Function<HiveCl
newDirectExecutorService(),
TYPE_MANAGER,
locationService,
new TableParameterCodec(),
partitionUpdateCodec,
new HiveTypeTranslator(),
new NodeVersion("test_version"));
Expand Down

0 comments on commit f6754be

Please sign in to comment.