You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2017/01/05 19:53:20 UTC
[2/2] incubator-impala git commit: IMPALA-4676: remove vestigial
references to getBlockStorageLocations() API
IMPALA-4676: remove vestigial references to getBlockStorageLocations() API
The BlockStorageLocation import is unused.
Remove validation of config keys that only affect the
BlockStorageLocation API. See HDFS-10868 and HDFS-8895. We do not
need to validate these keys any more since we don't use that API.
These config keys are removed in Hadoop 3 so this patch is
required to build against it.
Change-Id: Ic12337a9f5b7d910282aaf7d8508a4176cf89cbc
Reviewed-on: http://gerrit.cloudera.org:8080/5526
Reviewed-by: Tim Armstrong <ta...@cloudera.com>
Tested-by: Impala Public Jenkins
Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/4ce5213d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/4ce5213d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/4ce5213d
Branch: refs/heads/master
Commit: 4ce5213d16397c009e9eec93655ca434b5f83ade
Parents: fac000d
Author: Tim Armstrong <ta...@cloudera.com>
Authored: Thu Dec 15 14:22:02 2016 -0800
Committer: Impala Public Jenkins <im...@gerrit.cloudera.org>
Committed: Thu Jan 5 19:40:08 2017 +0000
----------------------------------------------------------------------
.../org/apache/impala/catalog/HdfsTable.java | 1 -
.../org/apache/impala/service/JniFrontend.java | 37 --------------------
2 files changed, 38 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/4ce5213d/fe/src/main/java/org/apache/impala/catalog/HdfsTable.java
----------------------------------------------------------------------
diff --git a/fe/src/main/java/org/apache/impala/catalog/HdfsTable.java b/fe/src/main/java/org/apache/impala/catalog/HdfsTable.java
index 904c90f..339ab80 100644
--- a/fe/src/main/java/org/apache/impala/catalog/HdfsTable.java
+++ b/fe/src/main/java/org/apache/impala/catalog/HdfsTable.java
@@ -33,7 +33,6 @@ import java.util.TreeMap;
import org.apache.avro.Schema;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.BlockLocation;
-import org.apache.hadoop.fs.BlockStorageLocation;
import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.LocatedFileStatus;
http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/4ce5213d/fe/src/main/java/org/apache/impala/service/JniFrontend.java
----------------------------------------------------------------------
diff --git a/fe/src/main/java/org/apache/impala/service/JniFrontend.java b/fe/src/main/java/org/apache/impala/service/JniFrontend.java
index bff5342..5fcd54c 100644
--- a/fe/src/main/java/org/apache/impala/service/JniFrontend.java
+++ b/fe/src/main/java/org/apache/impala/service/JniFrontend.java
@@ -637,7 +637,6 @@ public class JniFrontend {
output.append(checkLogFilePermission());
output.append(checkFileSystem(CONF));
output.append(checkShortCircuitRead(CONF));
- output.append(checkBlockLocationTracking(CONF));
return output.toString();
}
@@ -715,42 +714,6 @@ public class JniFrontend {
}
/**
- * Return an empty string if block location tracking is properly enabled. If not,
- * return an error string describing the issues.
- */
- private String checkBlockLocationTracking(Configuration conf) {
- StringBuilder output = new StringBuilder();
- String errorMessage = "ERROR: block location tracking is not properly enabled " +
- "because\n";
- String prefix = " - ";
- StringBuilder errorCause = new StringBuilder();
- if (!conf.getBoolean(DFSConfigKeys.DFS_HDFS_BLOCKS_METADATA_ENABLED,
- DFSConfigKeys.DFS_HDFS_BLOCKS_METADATA_ENABLED_DEFAULT)) {
- errorCause.append(prefix);
- errorCause.append(DFSConfigKeys.DFS_HDFS_BLOCKS_METADATA_ENABLED);
- errorCause.append(" is not enabled.\n");
- }
-
- // dfs.client.file-block-storage-locations.timeout.millis should be >= 10 seconds
- int dfsClientFileBlockStorageLocationsTimeoutMs = conf.getInt(
- DFSConfigKeys.DFS_CLIENT_FILE_BLOCK_STORAGE_LOCATIONS_TIMEOUT_MS,
- DFSConfigKeys.DFS_CLIENT_FILE_BLOCK_STORAGE_LOCATIONS_TIMEOUT_MS_DEFAULT);
- if (dfsClientFileBlockStorageLocationsTimeoutMs <
- MIN_DFS_CLIENT_FILE_BLOCK_STORAGE_LOCATIONS_TIMEOUT_MS) {
- errorCause.append(prefix);
- errorCause.append(DFSConfigKeys.DFS_CLIENT_FILE_BLOCK_STORAGE_LOCATIONS_TIMEOUT_MS);
- errorCause.append(" is too low. It should be at least 10 seconds.\n");
- }
-
- if (errorCause.length() > 0) {
- output.append(errorMessage);
- output.append(errorCause);
- }
-
- return output.toString();
- }
-
- /**
* Return an empty string if the default FileSystem configured in CONF refers to a
* DistributedFileSystem and Impala can list the root directory "/". Otherwise,
* return an error string describing the issues.