Toggle navigation
Home
org.apache.hadoop.hive.metastore.api.Partition to java.util.Optional<org.apache.hadoop.hive.metastore.api.Partition>
No. of Instances - 6
No. of Commits - 2
No. of Projects - {'presto'}
Hierarchy/Composition: -
Primitive Info: -
NameSpace: External -> Jdk
Mapping:
Cascading Type Change (Different)
ImmutableMap.Builder<HivePartitionName,Partition>
to
ImmutableMap.Builder<HivePartitionName,Optional<Partition>>
CacheLoader<HivePartitionName,Partition>
to
CacheLoader<HivePartitionName,Optional<Partition>>
Add or Remove Method invocation
stats.getGetPartitionsByNames().wrap(() -> { try (HiveMetastoreClient client=clientProvider.createMetastoreClient()){ ImmutableMap.Builder<HivePartitionName,Optional<Partition>> partitions=ImmutableMap.builder(); for ( Partition partition : client.get_partitions_by_names(databaseName,tableName,partitionsToFetch)) { String partitionId=FileUtils.makePartName(partitionColumnNames,partition.getValues(),null); partitions.put(HivePartitionName.partition(databaseName,tableName,partitionId),partition); } return partitions.build(); } } )
to
stats.getGetPartitionsByNames().wrap(() -> { try (HiveMetastoreClient client=clientProvider.createMetastoreClient()){ ImmutableMap.Builder<HivePartitionName,Optional<Partition>> partitions=ImmutableMap.builder(); for ( Partition partition : client.get_partitions_by_names(databaseName,tableName,partitionsToFetch)) { String partitionId=FileUtils.makePartName(partitionColumnNames,partition.getValues(),null); partitions.put(HivePartitionName.partition(databaseName,tableName,partitionId),Optional.of(partition)); } return partitions.build(); } } )
CacheBuilder.newBuilder().expireAfterWrite(expiresAfterWriteMillis,MILLISECONDS).refreshAfterWrite(refreshMills,MILLISECONDS).build(asyncReloading(new CacheLoader<HivePartitionName,Optional<Partition>>(){ @Override public Partition load( HivePartitionName partitionName) throws Exception { return loadPartitionByName(partitionName); } @Override public Map<HivePartitionName,Partition> loadAll( Iterable<? extends HivePartitionName> partitionNames) throws Exception { return loadPartitionsByNames(partitionNames); } } ,executor))
to
CacheBuilder.newBuilder().expireAfterWrite(expiresAfterWriteMillis,MILLISECONDS).refreshAfterWrite(refreshMills,MILLISECONDS).build(asyncReloading(new CacheLoader<HivePartitionName,Optional<Partition>>(){ @Override public Optional<Partition> load( HivePartitionName partitionName) throws Exception { return loadPartitionByName(partitionName); } @Override public Map<HivePartitionName,Optional<Partition>> loadAll( Iterable<? extends HivePartitionName> partitionNames) throws Exception { return loadPartitionsByNames(partitionNames); } } ,executor))
stats.getGetPartitionByName().wrap(() -> { try (HiveMetastoreClient client=clientProvider.createMetastoreClient()){ return client.get_partition_by_name(partitionName.getHiveTableName().getDatabaseName(),partitionName.getHiveTableName().getTableName(),partitionName.getPartitionName()); } } )
to
stats.getGetPartitionByName().wrap(() -> { try (HiveMetastoreClient client=clientProvider.createMetastoreClient()){ return Optional.of(client.get_partition_by_name(partitionName.getHiveTableName().getDatabaseName(),partitionName.getHiveTableName().getTableName(),partitionName.getPartitionName())); } } )
Other
partitionsByName.build()
to
partitionsByName.build()