forked from 4ttty/winutils
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Hadoop-2.6.0/HDP-2.2 windows binaries
- Loading branch information
1 parent
14fe250
commit cf8218a
Showing
40 changed files
with
2,182 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
call %JAVA_HOME%\bin\jstack -F %1 > %2 | ||
call %JAVA_HOME%\bin\jmap %1 > %3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
@echo off | ||
@rem Licensed to the Apache Software Foundation (ASF) under one or more | ||
@rem contributor license agreements. See the NOTICE file distributed with | ||
@rem this work for additional information regarding copyright ownership. | ||
@rem The ASF licenses this file to You under the Apache License, Version 2.0 | ||
@rem (the "License"); you may not use this file except in compliance with | ||
@rem the License. You may obtain a copy of the License at | ||
@rem | ||
@rem http://www.apache.org/licenses/LICENSE-2.0 | ||
@rem | ||
@rem Unless required by applicable law or agreed to in writing, software | ||
@rem distributed under the License is distributed on an "AS IS" BASIS, | ||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
@rem See the License for the specific language governing permissions and | ||
@rem limitations under the License. | ||
|
||
start /min powershell.exe -NoProfile -InputFormat none -ExecutionPolicy unrestricted -File "%~dp0Start-HadoopAdminShell.ps1" -credentialFilePath "%HADOOP_NODE%singlenodecreds.xml" -hadoopHome "%HADOOP_HOME%" -shellCmd "set PATH=%PATH% && \"%HADOOP_HOME%\bin\hadoop.cmd\"" | ||
goto :eof |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
param( | ||
$credentialFilePath = "c:\hadoop\singlenodecreds.xml", | ||
$hadoopHome = "$env:HADOOP_HOME", | ||
$shellCmd = "`"$env:HADOOP_HOME\bin\hadoop.cmd`"" | ||
) | ||
|
||
function Start-HadoopShell($message, $credentials) | ||
{ | ||
if($credentials) | ||
{ | ||
Start-Process cmd.exe -ArgumentList @("/k pushd `"$hadoopHome`" && $shellCmd && title Hadoop Admin Command Line") -Credential $creds | ||
} | ||
else | ||
{ | ||
Start-Process cmd.exe -ArgumentList @("/k pushd `"$hadoopHome`" && $shellCmd && title Hadoop Command Line && echo: && echo $message") | ||
} | ||
} | ||
|
||
if (Test-Path ($credentialFilePath)) | ||
{ | ||
$import = Import-Clixml -Path $credentialFilePath | ||
$username = $import.Username | ||
try | ||
{ | ||
$securePassword = $import.Password | ConvertTo-SecureString -ErrorAction Stop | ||
} | ||
catch | ||
{ | ||
$message = "WARNING: Unable to decrypt credentials file for hadoop service user. The same user account used to install hadoop must be used to start the hadoop command shell. Hadoop admin commands will not be available." | ||
} | ||
if($securePassword) | ||
{ | ||
$creds = New-Object System.Management.Automation.PSCredential $username, $securePassword | ||
Start-HadoopShell -credentials $creds | ||
} | ||
else | ||
{ | ||
Start-HadoopShell -message $message | ||
} | ||
} | ||
else | ||
{ | ||
Start-HadoopShell -message "WARNING: Credentials file for hadoop service user not found at $credentialFilePath. Hadoop admin commands will not be available." | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<service> | ||
<id>datanode</id> | ||
<name>datanode</name> | ||
<description>This service runs Hadoop datanode</description> | ||
<executable>c:\java\jdk7\bin\java</executable> | ||
<arguments>-Xmx192m -Dhadoop.log.dir=c:\hadoop\logs\hadoop -Dhadoop.log.file=hadoop-datanode-MORZINE.log -Dhadoop.home.dir=c:\hdp\hadoop-2.6.0.2.2.0.0-2041 -Dhadoop.id.str=Administrator -Dhadoop.root.logger=INFO,DRFA -Djava.library.path=;c:\hdp\hadoop-2.6.0.2.2.0.0-2041\bin -Dhadoop.policy.file=hadoop-policy.xml -Djava.net.preferIPv4Stack=true -server -Dhadoop.security.logger=ERROR,RFAS -Dhadoop.security.logger=ERROR,RFAS -classpath c:\hdp\hadoop-2.6.0.2.2.0.0-2041\etc\hadoop;c:\hdp\hadoop-2.6.0.2.2.0.0-2041\share\hadoop\common\lib\*;c:\hdp\hadoop-2.6.0.2.2.0.0-2041\share\hadoop\common\*;c:\hdp\hadoop-2.6.0.2.2.0.0-2041\share\hadoop\hdfs;c:\hdp\hadoop-2.6.0.2.2.0.0-2041\share\hadoop\hdfs\lib\*;c:\hdp\hadoop-2.6.0.2.2.0.0-2041\share\hadoop\hdfs\*;c:\hdp\hadoop-2.6.0.2.2.0.0-2041\share\hadoop\yarn\lib\*;c:\hdp\hadoop-2.6.0.2.2.0.0-2041\share\hadoop\yarn\*;c:\hdp\hadoop-2.6.0.2.2.0.0-2041\share\hadoop\mapreduce\lib\*;c:\hdp\hadoop-2.6.0.2.2.0.0-2041\share\hadoop\mapreduce\* org.apache.hadoop.hdfs.server.datanode.DataNode</arguments> | ||
</service> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# This script runs the hadoop core commands. | ||
|
||
bin=`which $0` | ||
bin=`dirname ${bin}` | ||
bin=`cd "$bin"; pwd` | ||
|
||
DEFAULT_LIBEXEC_DIR="$bin"/../libexec | ||
|
||
if [ -n "$HADOOP_HOME" ]; then | ||
DEFAULT_LIBEXEC_DIR="$HADOOP_HOME"/libexec | ||
fi | ||
|
||
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR} | ||
. $HADOOP_LIBEXEC_DIR/hadoop-config.sh | ||
|
||
function print_usage(){ | ||
echo "Usage: hadoop [--config confdir] COMMAND" | ||
echo " where COMMAND is one of:" | ||
echo " fs run a generic filesystem user client" | ||
echo " version print the version" | ||
echo " jar <jar> run a jar file" | ||
echo " checknative [-a|-h] check native hadoop and compression libraries availability" | ||
echo " distcp <srcurl> <desturl> copy file or directories recursively" | ||
echo " archive -archiveName NAME -p <parent path> <src>* <dest> create a hadoop archive" | ||
echo " classpath prints the class path needed to get the" | ||
echo " credential interact with credential providers" | ||
echo " Hadoop jar and the required libraries" | ||
echo " daemonlog get/set the log level for each daemon" | ||
echo " trace view and modify Hadoop tracing settings" | ||
echo " or" | ||
echo " CLASSNAME run the class named CLASSNAME" | ||
echo "" | ||
echo "Most commands print help when invoked w/o parameters." | ||
} | ||
|
||
if [ $# = 0 ]; then | ||
print_usage | ||
exit | ||
fi | ||
|
||
COMMAND=$1 | ||
case $COMMAND in | ||
# usage flags | ||
--help|-help|-h) | ||
print_usage | ||
exit | ||
;; | ||
|
||
#hdfs commands | ||
namenode|secondarynamenode|datanode|dfs|dfsadmin|fsck|balancer|fetchdt|oiv|dfsgroups|portmap|nfs3) | ||
echo "DEPRECATED: Use of this script to execute hdfs command is deprecated." 1>&2 | ||
echo "Instead use the hdfs command for it." 1>&2 | ||
echo "" 1>&2 | ||
#try to locate hdfs and if present, delegate to it. | ||
shift | ||
if [ -f "${HADOOP_HDFS_HOME}"/bin/hdfs ]; then | ||
exec "${HADOOP_HDFS_HOME}"/bin/hdfs ${COMMAND/dfsgroups/groups} "$@" | ||
elif [ -f "${HADOOP_PREFIX}"/bin/hdfs ]; then | ||
exec "${HADOOP_PREFIX}"/bin/hdfs ${COMMAND/dfsgroups/groups} "$@" | ||
else | ||
echo "HADOOP_HDFS_HOME not found!" | ||
exit 1 | ||
fi | ||
;; | ||
|
||
#mapred commands for backwards compatibility | ||
pipes|job|queue|mrgroups|mradmin|jobtracker|tasktracker) | ||
echo "DEPRECATED: Use of this script to execute mapred command is deprecated." 1>&2 | ||
echo "Instead use the mapred command for it." 1>&2 | ||
echo "" 1>&2 | ||
#try to locate mapred and if present, delegate to it. | ||
shift | ||
if [ -f "${HADOOP_MAPRED_HOME}"/bin/mapred ]; then | ||
exec "${HADOOP_MAPRED_HOME}"/bin/mapred ${COMMAND/mrgroups/groups} "$@" | ||
elif [ -f "${HADOOP_PREFIX}"/bin/mapred ]; then | ||
exec "${HADOOP_PREFIX}"/bin/mapred ${COMMAND/mrgroups/groups} "$@" | ||
else | ||
echo "HADOOP_MAPRED_HOME not found!" | ||
exit 1 | ||
fi | ||
;; | ||
|
||
#core commands | ||
*) | ||
# the core commands | ||
if [ "$COMMAND" = "fs" ] ; then | ||
CLASS=org.apache.hadoop.fs.FsShell | ||
elif [ "$COMMAND" = "version" ] ; then | ||
CLASS=org.apache.hadoop.util.VersionInfo | ||
elif [ "$COMMAND" = "jar" ] ; then | ||
CLASS=org.apache.hadoop.util.RunJar | ||
elif [ "$COMMAND" = "key" ] ; then | ||
CLASS=org.apache.hadoop.crypto.key.KeyShell | ||
elif [ "$COMMAND" = "checknative" ] ; then | ||
CLASS=org.apache.hadoop.util.NativeLibraryChecker | ||
elif [ "$COMMAND" = "distcp" ] ; then | ||
CLASS=org.apache.hadoop.tools.DistCp | ||
CLASSPATH=${CLASSPATH}:${TOOL_PATH} | ||
elif [ "$COMMAND" = "daemonlog" ] ; then | ||
CLASS=org.apache.hadoop.log.LogLevel | ||
elif [ "$COMMAND" = "archive" ] ; then | ||
CLASS=org.apache.hadoop.tools.HadoopArchives | ||
CLASSPATH=${CLASSPATH}:${TOOL_PATH} | ||
elif [ "$COMMAND" = "credential" ] ; then | ||
CLASS=org.apache.hadoop.security.alias.CredentialShell | ||
elif [ "$COMMAND" = "trace" ] ; then | ||
CLASS=org.apache.hadoop.tracing.TraceAdmin | ||
elif [ "$COMMAND" = "classpath" ] ; then | ||
if [ "$#" -eq 1 ]; then | ||
# No need to bother starting up a JVM for this simple case. | ||
echo $CLASSPATH | ||
exit | ||
else | ||
CLASS=org.apache.hadoop.util.Classpath | ||
fi | ||
elif [[ "$COMMAND" = -* ]] ; then | ||
# class and package names cannot begin with a - | ||
echo "Error: No command named \`$COMMAND' was found. Perhaps you meant \`hadoop ${COMMAND#-}'" | ||
exit 1 | ||
else | ||
CLASS=$COMMAND | ||
fi | ||
shift | ||
|
||
# Always respect HADOOP_OPTS and HADOOP_CLIENT_OPTS | ||
HADOOP_OPTS="$HADOOP_OPTS $HADOOP_CLIENT_OPTS" | ||
|
||
#make sure security appender is turned off | ||
HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.security.logger=${HADOOP_SECURITY_LOGGER:-INFO,NullAppender}" | ||
|
||
export CLASSPATH=$CLASSPATH | ||
exec "$JAVA" $JAVA_HEAP_MAX $HADOOP_OPTS $CLASS "$@" | ||
;; | ||
|
||
esac |
Oops, something went wrong.