drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkorukanti <...@git.apache.org>
Subject [GitHub] drill pull request: DRILL-4577: Construct a specific path for quer...
Date Wed, 06 Apr 2016 18:06:58 GMT
Github user vkorukanti commented on a diff in the pull request:

    --- Diff: contrib/storage-hive/core/src/main/java/org/apache/drill/exec/store/hive/schema/HiveDatabaseSchema.java
    @@ -72,4 +80,76 @@ public String getTypeName() {
         return HiveStoragePluginConfig.NAME;
    +  @Override
    +  public List<Pair<String, ? extends Table>> getTablesByNames(final List<String>
tableNames) {
    +    final String schemaName = getName();
    +    final List<Pair<String, ? extends Table>> tableNameToTable = Lists.newArrayList();
    +    List<org.apache.hadoop.hive.metastore.api.Table> tables;
    +    // Retries once if the first call to fetch the metadata fails
    +    synchronized(mClient) {
    +      final List<String> tableNamesWithAuth = Lists.newArrayList();
    +      for(String tableName : tableNames) {
    +        try {
    +          if(mClient.tableExists(schemaName, tableName)) {
    --- End diff --
    Here you are making a RPC call for every table. I thought for perf reasons we wanted to
avoid the RPC call per table and instead use ```getTableObjectsByName``` to get all tables
data in one RPC call. How does this patch improve the perf?

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message