hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aengin...@apache.org
Subject [50/50] hadoop git commit: Merge branch 'trunk' into HDFS-1312
Date Mon, 23 May 2016 23:21:28 GMT
Merge branch 'trunk' into HDFS-1312


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/fa600a64
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/fa600a64
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/fa600a64

Branch: refs/heads/HDFS-1312
Commit: fa600a64790913046e920458998fcc3e64f5386c
Parents: 5c712dc 6d043aa
Author: Anu Engineer <aengineer@apache.org>
Authored: Mon May 23 15:47:36 2016 -0700
Committer: Anu Engineer <aengineer@apache.org>
Committed: Mon May 23 15:47:36 2016 -0700

----------------------------------------------------------------------
 BUILDING.txt                                    |   8 +-
 dev-support/docker/Dockerfile                   |  26 +-
 .../main/resources/assemblies/hadoop-tools.xml  |  56 +++
 .../hadoop-common/src/main/bin/hadoop           | 323 +++++++-----
 .../hadoop/crypto/key/JavaKeyStoreProvider.java |  79 +--
 .../org/apache/hadoop/crypto/key/KeyShell.java  | 183 +++----
 .../hadoop/fs/CommonConfigurationKeys.java      |   3 +
 .../fs/CommonConfigurationKeysPublic.java       |   7 +-
 .../java/org/apache/hadoop/fs/FileSystem.java   |  11 +-
 .../hadoop/fs/GlobalStorageStatistics.java      |   5 +-
 .../hadoop/fs/InvalidRequestException.java      |   4 +
 .../hadoop/fs/PathAccessDeniedException.java    |  12 +-
 .../apache/hadoop/fs/PathNotFoundException.java |  20 +-
 .../hadoop/fs/PathPermissionException.java      |  16 +-
 .../java/org/apache/hadoop/fs/QuotaUsage.java   |   4 +-
 .../java/org/apache/hadoop/io/SequenceFile.java |   7 +-
 .../hadoop/io/retry/FailoverProxyProvider.java  |  11 +
 .../hadoop/io/retry/RetryInvocationHandler.java | 350 ++++++-------
 .../main/java/org/apache/hadoop/ipc/Client.java | 119 ++---
 .../apache/hadoop/ipc/DecayRpcScheduler.java    |  15 +-
 .../apache/hadoop/ipc/ProtobufRpcEngine.java    |  62 ++-
 .../org/apache/hadoop/net/NetworkTopology.java  |  35 ++
 .../java/org/apache/hadoop/net/NodeBase.java    |   9 +
 .../hadoop/security/LdapGroupsMapping.java      | 228 +++++++--
 .../apache/hadoop/security/ProviderUtils.java   |  75 +++
 .../hadoop/security/ShellBasedIdMapping.java    |   2 +-
 .../alias/AbstractJavaKeyStoreProvider.java     |  77 +--
 .../hadoop/security/alias/CredentialShell.java  | 201 ++++----
 .../AbstractDelegationTokenIdentifier.java      |  33 +-
 .../DelegationTokenAuthenticationFilter.java    |   7 +-
 .../token/delegation/web/ServletUtils.java      |   7 +-
 .../org/apache/hadoop/tools/CommandShell.java   |   4 +-
 .../org/apache/hadoop/util/HostsFileReader.java | 159 ++++--
 .../apache/hadoop/util/concurrent/AsyncGet.java |  60 +++
 .../hadoop/util/concurrent/AsyncGetFuture.java  |  73 +++
 .../src/main/resources/core-default.xml         |  34 +-
 .../src/site/markdown/GroupsMapping.md          |   6 +
 .../src/site/markdown/UnixShellGuide.md         |  87 +++-
 .../apache/hadoop/crypto/key/TestKeyShell.java  |  11 +-
 .../hadoop/io/TestSequenceFileAppend.java       |  67 +++
 .../apache/hadoop/io/retry/TestRetryProxy.java  |  67 +--
 .../org/apache/hadoop/ipc/TestAsyncIPC.java     | 124 +++--
 .../hadoop/security/TestLdapGroupsMapping.java  |  31 +-
 .../security/TestLdapGroupsMappingBase.java     |  71 ++-
 .../TestLdapGroupsMappingWithOneQuery.java      | 100 ++++
 .../TestLdapGroupsMappingWithPosixGroup.java    |  41 +-
 .../security/TestShellBasedIdMapping.java       |  16 +-
 .../hadoop/security/alias/TestCredShell.java    |  11 +-
 .../apache/hadoop/util/TestHostsFileReader.java |  26 +
 .../scripts/hadoop-functions_test_helper.bash   |   4 +-
 .../src/test/scripts/hadoop_subcommands.bats    |  78 +++
 .../hadoop/hdfs/AsyncDistributedFileSystem.java |  24 +-
 .../org/apache/hadoop/hdfs/ClientContext.java   |  47 +-
 .../java/org/apache/hadoop/hdfs/DFSClient.java  |   2 +-
 .../org/apache/hadoop/hdfs/DataStreamer.java    |  32 +-
 .../apache/hadoop/hdfs/StripedDataStreamer.java |   2 +-
 .../ClientNamenodeProtocolTranslatorPB.java     |  33 +-
 .../delegation/DelegationTokenIdentifier.java   |  27 +-
 hadoop-hdfs-project/hadoop-hdfs/pom.xml         |  38 +-
 .../hadoop-hdfs/src/main/bin/hdfs               | 438 ++++++++--------
 .../apache/hadoop/hdfs/HDFSPolicyProvider.java  |   6 +-
 .../qjournal/server/JournalNodeRpcServer.java   |   6 +-
 .../hadoop/hdfs/server/common/Storage.java      |  65 ++-
 .../hadoop/hdfs/server/datanode/DataNode.java   |   3 +-
 .../hdfs/server/datanode/DataStorage.java       |   2 +-
 .../erasurecode/StripedReconstructor.java       |   4 +-
 .../datanode/metrics/DataNodeMetrics.java       |  14 +
 .../hadoop/hdfs/server/namenode/NNStorage.java  |  25 +-
 .../hadoop/hdfs/server/namenode/NameNode.java   |   4 +
 .../hdfs/server/namenode/NameNodeRpcServer.java |   8 +-
 .../namenode/RedundantEditLogInputStream.java   |   3 +-
 .../apache/hadoop/hdfs/tools/CacheAdmin.java    |   6 +-
 .../hdfs/tools/DelegationTokenFetcher.java      |  32 +-
 .../hadoop/hdfs/tools/NNHAServiceTarget.java    |   2 +-
 .../src/main/shellprofile.d/hadoop-hdfs.sh      |  36 ++
 .../hadoop-hdfs/src/main/shellprofile.d/hdfs.sh |  36 --
 .../site/markdown/CentralizedCacheManagement.md |   2 +-
 .../src/site/markdown/HDFSCommands.md           |   4 +-
 .../src/site/markdown/HdfsPermissionsGuide.md   |   2 +-
 .../org/apache/hadoop/hdfs/DFSTestUtil.java     | 278 +++++-----
 .../org/apache/hadoop/hdfs/MiniDFSCluster.java  |  36 +-
 .../apache/hadoop/hdfs/StripedFileTestUtil.java |  32 +-
 .../org/apache/hadoop/hdfs/TestDataStream.java  |  85 ++++
 .../hadoop/hdfs/TestDataTransferProtocol.java   |   4 +-
 .../hadoop/hdfs/TestDistributedFileSystem.java  |  57 ++-
 .../org/apache/hadoop/hdfs/TestFileAppend.java  |   4 +
 .../apache/hadoop/hdfs/TestFileCorruption.java  |   6 +-
 .../hadoop/hdfs/TestHDFSPolicyProvider.java     | 126 +++++
 .../java/org/apache/hadoop/hdfs/TestQuota.java  |   4 +-
 .../hadoop/hdfs/TestReconstructStripedFile.java |  27 +-
 .../org/apache/hadoop/hdfs/TestReplication.java |   3 +-
 .../hdfs/security/TestDelegationToken.java      |   2 +-
 .../blockmanagement/TestBlockManager.java       |   4 +-
 .../blockmanagement/TestHeartbeatHandling.java  |  14 +-
 .../TestOverReplicatedBlocks.java               |   8 +-
 .../server/datanode/BlockReportTestBase.java    |   2 +-
 .../hdfs/server/datanode/DataNodeTestUtils.java | 119 +----
 .../datanode/InternalDataNodeTestUtils.java     | 157 ++++++
 .../TestDataNodeErasureCodingMetrics.java       | 153 ++++++
 .../datanode/TestDataNodeHotSwapVolumes.java    |   2 +-
 .../datanode/TestDataNodeMetricsLogger.java     |   2 +-
 .../datanode/TestDataNodeReconfiguration.java   |   2 +-
 .../TestDataNodeVolumeFailureReporting.java     |  36 ++
 .../hdfs/server/datanode/TestDataStorage.java   |  26 +
 ...TestDnRespectsBlockReportSplitThreshold.java |   6 +-
 .../server/datanode/TestFsDatasetCache.java     |   2 +-
 .../datanode/TestIncrementalBlockReports.java   |   2 +-
 .../hdfs/server/datanode/TestStorageReport.java |   2 +-
 .../server/datanode/TestTriggerBlockReport.java |   2 +-
 .../hdfs/server/namenode/TestDeadDatanode.java  |  12 +-
 .../hdfs/server/namenode/TestDeleteRace.java    |   4 +-
 .../hdfs/server/namenode/TestSaveNamespace.java |  33 +-
 .../hdfs/server/namenode/ha/TestDNFencing.java  |   5 +-
 .../server/namenode/ha/TestNNHealthCheck.java   |  12 +-
 .../namenode/ha/TestPipelinesFailover.java      |   6 +-
 .../shortcircuit/TestShortCircuitLocalRead.java |   6 +-
 .../hdfs/tools/TestDelegationTokenFetcher.java  |  17 +
 .../apache/hadoop/net/TestNetworkTopology.java  |   9 +
 .../scripts/hdfs-functions_test_helper.bash     |  58 +++
 .../src/test/scripts/hdfs_subcommands.bats      |  78 +++
 .../hadoop-hdfs/src/test/scripts/run-bats.sh    |  43 ++
 hadoop-mapreduce-project/bin/mapred             | 230 +++++----
 .../hadoop/mapreduce/v2/app/MRAppMaster.java    |  32 +-
 .../mapreduce/v2/app/TestStagingCleanup.java    | 120 +++++
 .../v2/jobhistory/FileNameIndexUtils.java       |   2 +-
 .../mapreduce/v2/jobhistory/JHAdminConfig.java  |   8 +
 .../v2/jobhistory/TestFileNameIndexUtils.java   |  25 +
 .../apache/hadoop/mapreduce/JobSubmitter.java   |   7 +
 .../apache/hadoop/mapreduce/MRJobConfig.java    |   7 +
 .../org/apache/hadoop/mapreduce/tools/CLI.java  |  35 +-
 .../src/main/resources/mapred-default.xml       |  16 +
 .../src/site/markdown/MapredCommands.md         |   3 +-
 .../hadoop-mapreduce-client-hs/pom.xml          |   4 +
 .../mapreduce/v2/hs/HistoryClientService.java   |   1 +
 .../mapreduce/v2/hs/HistoryFileManager.java     |  20 +-
 .../mapreduce/v2/hs/webapp/HsJobBlock.java      |   2 +-
 .../v2/hs/webapp/dao/AMAttemptInfo.java         |   2 +-
 ...HistoryFileManagerInitWithNonRunningDFS.java |  75 +++
 ...estUnnecessaryBlockingOnHistoryFileInfo.java |   2 +-
 .../v2/hs/webapp/TestHsWebServicesJobs.java     |  12 +-
 .../hadoop/mapred/TestLocalJobSubmission.java   |  24 +-
 .../hadoop/mapreduce/TestMRJobClient.java       |  28 ++
 .../shellprofile.d/hadoop-mapreduce.sh          |  41 ++
 .../shellprofile.d/mapreduce.sh                 |  41 --
 hadoop-project-dist/pom.xml                     |  33 +-
 hadoop-project/pom.xml                          |  18 +-
 .../main/shellprofile.d/hadoop-archive-logs.sh  |  39 ++
 .../src/main/shellprofile.d/hadoop-archives.sh  |  58 +++
 hadoop-tools/hadoop-aws/pom.xml                 |  11 +
 .../hadoop/fs/s3a/AWSClientIOException.java     |  50 ++
 .../apache/hadoop/fs/s3a/AWSS3IOException.java  |  61 +++
 .../hadoop/fs/s3a/AWSServiceIOException.java    |  72 +++
 .../org/apache/hadoop/fs/s3a/Constants.java     |   4 +
 .../hadoop/fs/s3a/S3AFastOutputStream.java      |  87 ++--
 .../org/apache/hadoop/fs/s3a/S3AFileSystem.java | 502 +++++++++++++------
 .../apache/hadoop/fs/s3a/S3AInputStream.java    |  33 +-
 .../apache/hadoop/fs/s3a/S3AOutputStream.java   |  28 +-
 .../java/org/apache/hadoop/fs/s3a/S3AUtils.java | 189 +++++++
 .../org/apache/hadoop/fs/s3a/package-info.java  |  28 ++
 .../src/site/markdown/tools/hadoop-aws/index.md |  30 +-
 .../fs/contract/s3a/TestS3AContractDistCp.java  |  46 ++
 .../org/apache/hadoop/fs/s3a/S3ATestUtils.java  |  67 +++
 .../fs/s3a/TestS3AAWSCredentialsProvider.java   | 116 +++++
 .../hadoop/fs/s3a/TestS3AConfiguration.java     |  23 +-
 .../hadoop/fs/s3a/TestS3AFailureHandling.java   | 194 +++++++
 hadoop-tools/hadoop-azure/pom.xml               |  19 +
 .../contract/TestAzureNativeContractDistCp.java |  33 ++
 hadoop-tools/hadoop-distcp/pom.xml              |  16 +
 .../org/apache/hadoop/tools/DistCpOptions.java  |  32 +-
 .../org/apache/hadoop/tools/OptionsParser.java  |  49 +-
 .../apache/hadoop/tools/mapred/CopyMapper.java  |  10 +-
 .../apache/hadoop/tools/util/DistCpUtils.java   |  10 +-
 .../src/main/shellprofile.d/hadoop-distcp.sh    |  62 +++
 .../apache/hadoop/tools/TestDistCpViewFs.java   |  93 +---
 .../apache/hadoop/tools/TestOptionsParser.java  |  19 +-
 .../contract/AbstractContractDistCpTest.java    | 204 ++++++++
 .../src/main/shellprofile.d/hadoop-extras.sh    |  39 ++
 .../src/main/shellprofile.d/hadoop-gridmix.sh   |  36 ++
 .../src/main/shellprofile.d/hadoop-rumen.sh     |  58 +++
 .../hadoop-rumen/src/site/markdown/Rumen.md.vm  |  40 +-
 .../apache/hadoop/streaming/DumpTypedBytes.java |   3 +-
 .../hadoop/streaming/HadoopStreaming.java       |   3 +-
 .../apache/hadoop/streaming/LoadTypedBytes.java |   3 +-
 .../src/main/shellprofile.d/hadoop-streaming.sh |  55 ++
 .../src/site/markdown/HadoopStreaming.md.vm     |  30 +-
 hadoop-yarn-project/hadoop-yarn/bin/yarn        | 394 ++++++++-------
 .../dev-support/findbugs-exclude.xml            |   2 +-
 .../hadoop/yarn/conf/YarnConfiguration.java     |  66 ++-
 .../yarn/conf/TestYarnConfigurationFields.java  |  14 +-
 .../yarn/client/api/impl/AMRMClientImpl.java    |  10 -
 .../apache/hadoop/yarn/client/cli/LogsCLI.java  | 395 +++++++++------
 .../yarn/client/api/impl/TestAMRMClient.java    |  13 +-
 .../yarn/client/api/impl/TestAMRMProxy.java     |   6 +-
 .../api/impl/TestDistributedScheduling.java     | 307 ++++++++++++
 .../hadoop/yarn/client/cli/TestLogsCLI.java     | 106 +++-
 .../yarn/logaggregation/LogCLIHelpers.java      | 128 +++--
 .../org/apache/hadoop/yarn/webapp/WebApps.java  |  53 +-
 .../src/main/resources/yarn-default.xml         |  38 ++
 ...pplicationHistoryManagerOnTimelineStore.java |  15 +-
 .../ApplicationHistoryServer.java               |   1 +
 ...pplicationHistoryManagerOnTimelineStore.java |  12 +
 .../protocolrecords/NodeHeartbeatResponse.java  |   8 +
 .../RegisterNodeManagerResponse.java            |   6 +-
 .../impl/pb/NodeHeartbeatResponsePBImpl.java    |  88 +++-
 .../pb/RegisterNodeManagerResponsePBImpl.java   |  46 +-
 .../api/records/ContainerQueuingLimit.java      |  44 ++
 .../api/records/QueuedContainersStatus.java     |   2 +-
 .../impl/pb/ContainerQueuingLimitPBImpl.java    |  80 +++
 .../api/records/impl/pb/NodeStatusPBImpl.java   |  14 +-
 .../impl/pb/QueuedContainersStatusPBImpl.java   |   6 +-
 .../yarn_server_common_service_protos.proto     |   8 +
 .../hadoop/yarn/server/nodemanager/Context.java |   4 +-
 .../yarn/server/nodemanager/NodeManager.java    |   8 +-
 .../nodemanager/NodeStatusUpdaterImpl.java      | 258 +++++++---
 .../containermanager/ContainerManager.java      |  42 ++
 .../containermanager/ContainerManagerImpl.java  |  12 +-
 .../application/ApplicationImpl.java            |   8 +-
 .../container/ContainerImpl.java                |  16 +
 .../launcher/RecoveredContainerLaunch.java      |   7 +-
 .../logaggregation/AppLogAggregatorImpl.java    |  49 +-
 .../logaggregation/LogAggregationService.java   |  52 +-
 .../loghandler/NonAggregatingLogHandler.java    |   4 +
 .../queuing/QueuingContainerManagerImpl.java    |  39 ++
 .../nodemanager/scheduler/LocalScheduler.java   |   6 +-
 .../OpportunisticContainerAllocator.java        |  17 +-
 .../server/nodemanager/webapp/WebServer.java    |   5 +-
 .../nodemanager/TestNodeStatusUpdater.java      | 121 +++++
 .../amrmproxy/BaseAMRMProxyTest.java            |   3 +-
 .../TestContainerManagerRecovery.java           |  84 ++++
 .../container/TestContainer.java                |  34 ++
 .../TestNonAggregatingLogHandler.java           |  58 ++-
 .../monitor/TestContainerMetrics.java           |  11 -
 .../scheduler/TestLocalScheduler.java           |   9 +-
 .../server/resourcemanager/ClusterMonitor.java  |   6 +-
 .../DistributedSchedulingService.java           | 194 ++++---
 .../resourcemanager/NodesListManager.java       |  69 ++-
 .../yarn/server/resourcemanager/RMContext.java  |   4 +
 .../server/resourcemanager/RMContextImpl.java   |  14 +
 .../server/resourcemanager/ResourceManager.java |   3 +
 .../resourcemanager/ResourceTrackerService.java |  70 ++-
 .../server/resourcemanager/rmnode/RMNode.java   |   2 +-
 .../resourcemanager/rmnode/RMNodeImpl.java      |  32 +-
 .../scheduler/capacity/LeafQueue.java           |   4 +-
 .../distributed/NodeQueueLoadMonitor.java       | 273 ++++++++++
 .../distributed/QueueLimitCalculator.java       | 125 +++++
 .../scheduler/distributed/TopKNodeSelector.java | 223 --------
 .../scheduler/fair/FSAppAttempt.java            |   3 +-
 .../yarn/server/resourcemanager/MockNM.java     |  21 +-
 .../TestDistributedSchedulingService.java       |  68 ++-
 .../resourcemanager/TestRMAdminService.java     |  99 ++++
 .../capacity/TestApplicationLimits.java         |   9 +-
 .../distributed/TestNodeQueueLoadMonitor.java   | 195 +++++++
 .../distributed/TestTopKNodeSelector.java       | 147 ------
 .../scheduler/fair/TestFairScheduler.java       |  17 +-
 .../scheduler/fifo/TestFifoScheduler.java       |   3 +-
 .../webapp/TestRMWebServicesCapacitySched.java  |   5 +-
 .../hadoop/yarn/webapp/TestRMWithXFSFilter.java | 158 ++++++
 .../hadoop/yarn/server/MiniYARNCluster.java     |  67 ++-
 .../server/webproxy/WebAppProxyServlet.java     |  11 +-
 .../src/site/markdown/CapacityScheduler.md      |   2 +-
 .../hadoop-yarn/shellprofile.d/hadoop-yarn.sh   |  62 +++
 .../hadoop-yarn/shellprofile.d/yarn.sh          |  62 ---
 pom.xml                                         |   2 +-
 263 files changed, 9724 insertions(+), 3629 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/fa600a64/hadoop-hdfs-project/hadoop-hdfs/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/hadoop/blob/fa600a64/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs
----------------------------------------------------------------------
diff --cc hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs
index d6579ea,2a29d17..7952560
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs
@@@ -57,7 -61,194 +62,199 @@@ function hadoop_usag
    hadoop_add_subcommand "storagepolicies" "list/get/set block storage policies"
    hadoop_add_subcommand "version" "print the version"
    hadoop_add_subcommand "zkfc" "run the ZK Failover Controller daemon"
-   hadoop_generate_usage "${MYNAME}" false
+   hadoop_generate_usage "${HADOOP_SHELL_EXECNAME}" false
+ }
+ 
+ ## @description  Default command handler for hadoop command
+ ## @audience     public
+ ## @stability    stable
+ ## @replaceable  no
+ ## @param        CLI arguments
+ function hdfscmd_case
+ {
+   subcmd=$1
+   shift
+ 
+   case ${subcmd} in
+     balancer)
+       HADOOP_SUBCMD_SUPPORTDAEMONIZATION="true"
+       HADOOP_CLASSNAME=org.apache.hadoop.hdfs.server.balancer.Balancer
+       hadoop_debug "Appending HADOOP_BALANCER_OPTS onto HADOOP_OPTS"
+       HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_BALANCER_OPTS}"
+     ;;
+     cacheadmin)
+       HADOOP_CLASSNAME=org.apache.hadoop.hdfs.tools.CacheAdmin
+     ;;
+     classpath)
+       hadoop_do_classpath_subcommand HADOOP_CLASSNAME "$@"
+     ;;
+     crypto)
+       HADOOP_CLASSNAME=org.apache.hadoop.hdfs.tools.CryptoAdmin
+     ;;
+     datanode)
+       HADOOP_SUBCMD_SUPPORTDAEMONIZATION="true"
+       # Determine if we're starting a secure datanode, and
+       # if so, redefine appropriate variables
+       if [[ -n "${HADOOP_SECURE_DN_USER}" ]]; then
+         HADOOP_SUBCMD_SECURESERVICE="true"
+         HADOOP_SUBCMD_SECUREUSER="${HADOOP_SECURE_DN_USER}"
+ 
+         # backward compatiblity
+         HADOOP_SECURE_PID_DIR="${HADOOP_SECURE_PID_DIR:-$HADOOP_SECURE_DN_PID_DIR}"
+         HADOOP_SECURE_LOG_DIR="${HADOOP_SECURE_LOG_DIR:-$HADOOP_SECURE_DN_LOG_DIR}"
+ 
+         hadoop_debug "Appending HADOOP_DATANODE_OPTS onto HADOOP_OPTS"
+         hadoop_debug "Appending HADOOP_DN_SECURE_EXTRA_OPTS onto HADOOP_OPTS"
+         HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_DATANODE_OPTS} ${HADOOP_DN_SECURE_EXTRA_OPTS}"
+         HADOOP_CLASSNAME="org.apache.hadoop.hdfs.server.datanode.SecureDataNodeStarter"
+       else
+         hadoop_debug "Appending HADOOP_DATANODE_OPTS onto HADOOP_OPTS"
+         HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_DATANODE_OPTS}"
+         HADOOP_CLASSNAME='org.apache.hadoop.hdfs.server.datanode.DataNode'
+       fi
+     ;;
+     debug)
+       HADOOP_CLASSNAME='org.apache.hadoop.hdfs.tools.DebugAdmin'
+     ;;
+     dfs)
+       HADOOP_CLASSNAME=org.apache.hadoop.fs.FsShell
+       hadoop_debug "Appending HADOOP_CLIENT_OPTS onto HADOOP_OPTS"
+       HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_CLIENT_OPTS}"
+     ;;
+     dfsadmin)
+       HADOOP_CLASSNAME=org.apache.hadoop.hdfs.tools.DFSAdmin
+       hadoop_debug "Appending HADOOP_CLIENT_OPTS onto HADOOP_OPTS"
+       HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_CLIENT_OPTS}"
+     ;;
++    diskbalancer)
++      HADOOP_CLASSNAME=org.apache.hadoop.hdfs.tools.DiskBalancer
++      hadoop_debug "Appending HADOOP_CLIENT_OPTS onto HADOOP_OPTS"
++      HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_CLIENT_OPTS}"
++    ;;
+     envvars)
+       echo "JAVA_HOME='${JAVA_HOME}'"
+       echo "HADOOP_HDFS_HOME='${HADOOP_HDFS_HOME}'"
+       echo "HDFS_DIR='${HDFS_DIR}'"
+       echo "HDFS_LIB_JARS_DIR='${HDFS_LIB_JARS_DIR}'"
+       echo "HADOOP_CONF_DIR='${HADOOP_CONF_DIR}'"
+       echo "HADOOP_TOOLS_HOME='${HADOOP_TOOLS_HOME}'"
+       echo "HADOOP_TOOLS_DIR='${HADOOP_TOOLS_DIR}'"
+       echo "HADOOP_TOOLS_LIB_JARS_DIR='${HADOOP_TOOLS_LIB_JARS_DIR}'"
+       exit 0
+     ;;
+     erasurecode)
+       HADOOP_CLASSNAME=org.apache.hadoop.hdfs.tools.erasurecode.ECCli
+       hadoop_debug "Appending HADOOP_CLIENT_OPTS onto HADOOP_OPTS"
+       HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_CLIENT_OPTS}"
+     ;;
+     fetchdt)
+       HADOOP_CLASSNAME=org.apache.hadoop.hdfs.tools.DelegationTokenFetcher
+     ;;
+     fsck)
+       HADOOP_CLASSNAME=org.apache.hadoop.hdfs.tools.DFSck
+       hadoop_debug "Appending HADOOP_CLIENT_OPTS onto HADOOP_OPTS"
+       HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_CLIENT_OPTS}"
+     ;;
+     getconf)
+       HADOOP_CLASSNAME=org.apache.hadoop.hdfs.tools.GetConf
+     ;;
+     groups)
+       HADOOP_CLASSNAME=org.apache.hadoop.hdfs.tools.GetGroups
+     ;;
+     haadmin)
+       HADOOP_CLASSNAME=org.apache.hadoop.hdfs.tools.DFSHAAdmin
+       hadoop_debug "Appending HADOOP_CLIENT_OPTS onto HADOOP_OPTS"
+       HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_CLIENT_OPTS}"
+     ;;
+     journalnode)
+       HADOOP_SUBCMD_SUPPORTDAEMONIZATION="true"
+       HADOOP_CLASSNAME='org.apache.hadoop.hdfs.qjournal.server.JournalNode'
+       hadoop_debug "Appending HADOOP_JOURNALNODE_OPTS onto HADOOP_OPTS"
+       HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_JOURNALNODE_OPTS}"
+     ;;
+     jmxget)
+       HADOOP_CLASSNAME=org.apache.hadoop.hdfs.tools.JMXGet
+     ;;
+     lsSnapshottableDir)
+       HADOOP_CLASSNAME=org.apache.hadoop.hdfs.tools.snapshot.LsSnapshottableDir
+     ;;
+     mover)
+       HADOOP_SUBCMD_SUPPORTDAEMONIZATION="true"
+       HADOOP_CLASSNAME=org.apache.hadoop.hdfs.server.mover.Mover
+       hadoop_debug "Appending HADOOP_MOVER_OPTS onto HADOOP_OPTS"
+       HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_MOVER_OPTS}"
+     ;;
+     namenode)
+       HADOOP_SUBCMD_SUPPORTDAEMONIZATION="true"
+       HADOOP_CLASSNAME='org.apache.hadoop.hdfs.server.namenode.NameNode'
+       hadoop_debug "Appending HADOOP_NAMENODE_OPTS onto HADOOP_OPTS"
+       HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_NAMENODE_OPTS}"
+       hadoop_add_param HADOOP_OPTS hdfs.audit.logger "-Dhdfs.audit.logger=${HDFS_AUDIT_LOGGER}"
+     ;;
+     nfs3)
+       HADOOP_SUBCMD_SUPPORTDAEMONIZATION="true"
+       if [[ -n "${HADOOP_PRIVILEGED_NFS_USER}" ]]; then
+         HADOOP_SUBCMD_SECURESERVICE="true"
+         HADOOP_SUBCMD_SECUREUSER="${HADOOP_PRIVILEGED_NFS_USER}"
+ 
+         # backward compatiblity
+         HADOOP_SECURE_PID_DIR="${HADOOP_SECURE_PID_DIR:-$HADOOP_SECURE_NFS3_PID_DIR}"
+         HADOOP_SECURE_LOG_DIR="${HADOOP_SECURE_LOG_DIR:-$HADOOP_SECURE_NFS3_LOG_DIR}"
+ 
+         hadoop_debug "Appending HADOOP_NFS3_OPTS onto HADOOP_OPTS"
+         hadoop_debug "Appending HADOOP_NFS3_SECURE_EXTRA_OPTS onto HADOOP_OPTS"
+         HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_NFS3_OPTS} ${HADOOP_NFS3_SECURE_EXTRA_OPTS}"
+         HADOOP_CLASSNAME=org.apache.hadoop.hdfs.nfs.nfs3.PrivilegedNfsGatewayStarter
+       else
+         hadoop_debug "Appending HADOOP_NFS3_OPTS onto HADOOP_OPTS"
+         HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_NFS3_OPTS}"
+         HADOOP_CLASSNAME=org.apache.hadoop.hdfs.nfs.nfs3.Nfs3
+       fi
+     ;;
+     oev)
+       HADOOP_CLASSNAME=org.apache.hadoop.hdfs.tools.offlineEditsViewer.OfflineEditsViewer
+     ;;
+     oiv)
+       HADOOP_CLASSNAME=org.apache.hadoop.hdfs.tools.offlineImageViewer.OfflineImageViewerPB
+     ;;
+     oiv_legacy)
+       HADOOP_CLASSNAME=org.apache.hadoop.hdfs.tools.offlineImageViewer.OfflineImageViewer
+     ;;
+     portmap)
+       HADOOP_SUBCMD_SUPPORTDAEMONIZATION="true"
+       HADOOP_CLASSNAME=org.apache.hadoop.portmap.Portmap
+       hadoop_debug "Appending HADOOP_PORTMAP_OPTS onto HADOOP_OPTS"
+       HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_PORTMAP_OPTS}"
+     ;;
+     secondarynamenode)
+       HADOOP_SUBCMD_SUPPORTDAEMONIZATION="true"
+       HADOOP_CLASSNAME='org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode'
+       hadoop_debug "Appending HADOOP_SECONDARYNAMENODE_OPTS onto HADOOP_OPTS"
+       HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_SECONDARYNAMENODE_OPTS}"
+       hadoop_add_param HADOOP_OPTS hdfs.audit.logger "-Dhdfs.audit.logger=${HDFS_AUDIT_LOGGER}"
+     ;;
+     snapshotDiff)
+       HADOOP_CLASSNAME=org.apache.hadoop.hdfs.tools.snapshot.SnapshotDiff
+     ;;
+     storagepolicies)
+       HADOOP_CLASSNAME=org.apache.hadoop.hdfs.tools.StoragePolicyAdmin
+     ;;
+     version)
+       HADOOP_CLASSNAME=org.apache.hadoop.util.VersionInfo
+     ;;
+     zkfc)
+       HADOOP_SUBCMD_SUPPORTDAEMONIZATION="true"
+       HADOOP_CLASSNAME='org.apache.hadoop.hdfs.tools.DFSZKFailoverController'
+       hadoop_debug "Appending HADOOP_ZKFC_OPTS onto HADOOP_OPTS"
+       HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_ZKFC_OPTS}"
+     ;;
+     *)
+       HADOOP_CLASSNAME="${subcmd}"
+       if ! hadoop_validate_classname "${HADOOP_CLASSNAME}"; then
+         hadoop_exit_with_usage 1
+       fi
+     ;;
+   esac
  }
  
  # let's locate libexec...

http://git-wip-us.apache.org/repos/asf/hadoop/blob/fa600a64/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java
----------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message