mirror of
https://github.com/apache/impala.git
synced 2025-12-25 02:03:09 -05:00
IMPALA-12929: Skip loading HDFS permissions in local-catalog mode
HDFS file/dir permissions are not used at all in local catalog mode - in LocalFsTable, hasWriteAccessToBaseDir() always returns true and getFirstLocationWithoutWriteAccess() always returns null. However, in catalogd, we still load them (in single thread for a table!) which could dominant the table loading time when there are lots of partitions. Note that the table loading process in catalogd is the same no matter what catalog mode is in used. The difference between catalog modes is mainly in how coordinators get metadata from catalogd. Local catalog mode is turned on by setting --catalog_topic_mode=minimal on catalogd and --use_local_catalog=true on coordinators. This patch skips loading HDFS permissions on catalogd when running in local catalog mode. We can revisit it in IMPALA-7539. Tests: - Ran CORE tests Change-Id: I5baa9f6ab0d3888a78ff161ae5caa19e85bc983a Reviewed-on: http://gerrit.cloudera.org:8080/21178 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
This commit is contained in:
committed by
Impala Public Jenkins
parent
74b6df7997
commit
0d49c9d6cc
@@ -877,6 +877,10 @@ public class HdfsTable extends Table implements FeFsTable {
|
||||
* {@link #getAvailableAccessLevel(String, Path, FsPermissionCache)}
|
||||
*/
|
||||
private static boolean assumeReadWriteAccess(FileSystem fs) {
|
||||
// Avoid loading permissions in local catalog mode since they are not used in
|
||||
// LocalFsTable. Remove this once we resolve IMPALA-7539.
|
||||
if (BackendConfig.INSTANCE.isMinimalTopicMode()) return true;
|
||||
|
||||
// Avoid calling getPermissions() on file path for S3 files, as that makes a round
|
||||
// trip to S3. Also, the S3A connector is currently unable to manage S3 permissions,
|
||||
// so for now it is safe to assume that all files(objects) have READ_WRITE
|
||||
|
||||
@@ -487,4 +487,8 @@ public class BackendConfig {
|
||||
public String queryLogTableName() {
|
||||
return backendCfg_.query_log_table_name;
|
||||
}
|
||||
|
||||
public boolean isMinimalTopicMode() {
|
||||
return backendCfg_.catalog_topic_mode.equalsIgnoreCase("minimal");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user