Skip to content

Commit e954120

Browse files
authoredDec 5, 2024
Fix sonar issue on HiveMetaDataLoader (#33924)
1 parent a9ce734 commit e954120

File tree

1 file changed

+2
-3
lines changed
  • infra/database/type/hive/src/main/java/org/apache/shardingsphere/infra/database/hive/metadata/data/loader

1 file changed

+2
-3
lines changed
 

‎infra/database/type/hive/src/main/java/org/apache/shardingsphere/infra/database/hive/metadata/data/loader/HiveMetaDataLoader.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ public Collection<SchemaMetaData> load(final MetaDataLoaderMaterial material) th
6868
HiveConf hiveConf = new HiveConf();
6969
hiveConf.set(HIVE_METASTORE_URIS, hiveMetastoreUris);
7070
storeClient = new HiveMetaStoreClient(hiveConf);
71-
return Collections.singletonList(new SchemaMetaData(material.getDefaultSchemaName(),
72-
getTableMetaData(storeClient.getAllTables(material.getDefaultSchemaName()), storeClient, material)));
71+
return Collections.singletonList(new SchemaMetaData(material.getDefaultSchemaName(), getTableMetaData(storeClient.getAllTables(material.getDefaultSchemaName()), storeClient, material)));
7372
} catch (final TException ignored) {
7473
throw new SQLException();
7574
} finally {
@@ -79,7 +78,7 @@ public Collection<SchemaMetaData> load(final MetaDataLoaderMaterial material) th
7978
}
8079
}
8180

82-
private Collection<TableMetaData> getTableMetaData(final Collection<String> tables, final HiveMetaStoreClient storeClient, final MetaDataLoaderMaterial material) throws TException, SQLException {
81+
private Collection<TableMetaData> getTableMetaData(final Collection<String> tables, final HiveMetaStoreClient storeClient, final MetaDataLoaderMaterial material) throws TException {
8382
Collection<TableMetaData> result = new LinkedList<>();
8483
for (String each : tables) {
8584
GetTableRequest req = new GetTableRequest(material.getDefaultSchemaName(), each);

0 commit comments

Comments
 (0)
Please sign in to comment.