Skip to content

Commit cf8218a

Browse files
committed
Add Hadoop-2.6.0/HDP-2.2 windows binaries
1 parent 14fe250 commit cf8218a

40 files changed

+2182
-0
lines changed

hadoop-2.6.0/bin/OnOutOfMemory.cmd

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
call %JAVA_HOME%\bin\jstack -F %1 > %2
2+
call %JAVA_HOME%\bin\jmap %1 > %3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@echo off
2+
@rem Licensed to the Apache Software Foundation (ASF) under one or more
3+
@rem contributor license agreements. See the NOTICE file distributed with
4+
@rem this work for additional information regarding copyright ownership.
5+
@rem The ASF licenses this file to You under the Apache License, Version 2.0
6+
@rem (the "License"); you may not use this file except in compliance with
7+
@rem the License. You may obtain a copy of the License at
8+
@rem
9+
@rem http://www.apache.org/licenses/LICENSE-2.0
10+
@rem
11+
@rem Unless required by applicable law or agreed to in writing, software
12+
@rem distributed under the License is distributed on an "AS IS" BASIS,
13+
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
@rem See the License for the specific language governing permissions and
15+
@rem limitations under the License.
16+
17+
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\""
18+
goto :eof
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
param(
2+
$credentialFilePath = "c:\hadoop\singlenodecreds.xml",
3+
$hadoopHome = "$env:HADOOP_HOME",
4+
$shellCmd = "`"$env:HADOOP_HOME\bin\hadoop.cmd`""
5+
)
6+
7+
function Start-HadoopShell($message, $credentials)
8+
{
9+
if($credentials)
10+
{
11+
Start-Process cmd.exe -ArgumentList @("/k pushd `"$hadoopHome`" && $shellCmd && title Hadoop Admin Command Line") -Credential $creds
12+
}
13+
else
14+
{
15+
Start-Process cmd.exe -ArgumentList @("/k pushd `"$hadoopHome`" && $shellCmd && title Hadoop Command Line && echo: && echo $message")
16+
}
17+
}
18+
19+
if (Test-Path ($credentialFilePath))
20+
{
21+
$import = Import-Clixml -Path $credentialFilePath
22+
$username = $import.Username
23+
try
24+
{
25+
$securePassword = $import.Password | ConvertTo-SecureString -ErrorAction Stop
26+
}
27+
catch
28+
{
29+
$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."
30+
}
31+
if($securePassword)
32+
{
33+
$creds = New-Object System.Management.Automation.PSCredential $username, $securePassword
34+
Start-HadoopShell -credentials $creds
35+
}
36+
else
37+
{
38+
Start-HadoopShell -message $message
39+
}
40+
}
41+
else
42+
{
43+
Start-HadoopShell -message "WARNING: Credentials file for hadoop service user not found at $credentialFilePath. Hadoop admin commands will not be available."
44+
}

hadoop-2.6.0/bin/datanode.exe

13.5 KB
Binary file not shown.

hadoop-2.6.0/bin/datanode.xml

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<service>
2+
<id>datanode</id>
3+
<name>datanode</name>
4+
<description>This service runs Hadoop datanode</description>
5+
<executable>c:\java\jdk7\bin\java</executable>
6+
<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>
7+
</service>

hadoop-2.6.0/bin/gplcompression.dll

15.5 KB
Binary file not shown.

hadoop-2.6.0/bin/hadoop

+152
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
#!/usr/bin/env bash
2+
3+
# Licensed to the Apache Software Foundation (ASF) under one or more
4+
# contributor license agreements. See the NOTICE file distributed with
5+
# this work for additional information regarding copyright ownership.
6+
# The ASF licenses this file to You under the Apache License, Version 2.0
7+
# (the "License"); you may not use this file except in compliance with
8+
# the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
18+
# This script runs the hadoop core commands.
19+
20+
bin=`which $0`
21+
bin=`dirname ${bin}`
22+
bin=`cd "$bin"; pwd`
23+
24+
DEFAULT_LIBEXEC_DIR="$bin"/../libexec
25+
26+
if [ -n "$HADOOP_HOME" ]; then
27+
DEFAULT_LIBEXEC_DIR="$HADOOP_HOME"/libexec
28+
fi
29+
30+
HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}
31+
. $HADOOP_LIBEXEC_DIR/hadoop-config.sh
32+
33+
function print_usage(){
34+
echo "Usage: hadoop [--config confdir] COMMAND"
35+
echo " where COMMAND is one of:"
36+
echo " fs run a generic filesystem user client"
37+
echo " version print the version"
38+
echo " jar <jar> run a jar file"
39+
echo " checknative [-a|-h] check native hadoop and compression libraries availability"
40+
echo " distcp <srcurl> <desturl> copy file or directories recursively"
41+
echo " archive -archiveName NAME -p <parent path> <src>* <dest> create a hadoop archive"
42+
echo " classpath prints the class path needed to get the"
43+
echo " credential interact with credential providers"
44+
echo " Hadoop jar and the required libraries"
45+
echo " daemonlog get/set the log level for each daemon"
46+
echo " trace view and modify Hadoop tracing settings"
47+
echo " or"
48+
echo " CLASSNAME run the class named CLASSNAME"
49+
echo ""
50+
echo "Most commands print help when invoked w/o parameters."
51+
}
52+
53+
if [ $# = 0 ]; then
54+
print_usage
55+
exit
56+
fi
57+
58+
COMMAND=$1
59+
case $COMMAND in
60+
# usage flags
61+
--help|-help|-h)
62+
print_usage
63+
exit
64+
;;
65+
66+
#hdfs commands
67+
namenode|secondarynamenode|datanode|dfs|dfsadmin|fsck|balancer|fetchdt|oiv|dfsgroups|portmap|nfs3)
68+
echo "DEPRECATED: Use of this script to execute hdfs command is deprecated." 1>&2
69+
echo "Instead use the hdfs command for it." 1>&2
70+
echo "" 1>&2
71+
#try to locate hdfs and if present, delegate to it.
72+
shift
73+
if [ -f "${HADOOP_HDFS_HOME}"/bin/hdfs ]; then
74+
exec "${HADOOP_HDFS_HOME}"/bin/hdfs ${COMMAND/dfsgroups/groups} "$@"
75+
elif [ -f "${HADOOP_PREFIX}"/bin/hdfs ]; then
76+
exec "${HADOOP_PREFIX}"/bin/hdfs ${COMMAND/dfsgroups/groups} "$@"
77+
else
78+
echo "HADOOP_HDFS_HOME not found!"
79+
exit 1
80+
fi
81+
;;
82+
83+
#mapred commands for backwards compatibility
84+
pipes|job|queue|mrgroups|mradmin|jobtracker|tasktracker)
85+
echo "DEPRECATED: Use of this script to execute mapred command is deprecated." 1>&2
86+
echo "Instead use the mapred command for it." 1>&2
87+
echo "" 1>&2
88+
#try to locate mapred and if present, delegate to it.
89+
shift
90+
if [ -f "${HADOOP_MAPRED_HOME}"/bin/mapred ]; then
91+
exec "${HADOOP_MAPRED_HOME}"/bin/mapred ${COMMAND/mrgroups/groups} "$@"
92+
elif [ -f "${HADOOP_PREFIX}"/bin/mapred ]; then
93+
exec "${HADOOP_PREFIX}"/bin/mapred ${COMMAND/mrgroups/groups} "$@"
94+
else
95+
echo "HADOOP_MAPRED_HOME not found!"
96+
exit 1
97+
fi
98+
;;
99+
100+
#core commands
101+
*)
102+
# the core commands
103+
if [ "$COMMAND" = "fs" ] ; then
104+
CLASS=org.apache.hadoop.fs.FsShell
105+
elif [ "$COMMAND" = "version" ] ; then
106+
CLASS=org.apache.hadoop.util.VersionInfo
107+
elif [ "$COMMAND" = "jar" ] ; then
108+
CLASS=org.apache.hadoop.util.RunJar
109+
elif [ "$COMMAND" = "key" ] ; then
110+
CLASS=org.apache.hadoop.crypto.key.KeyShell
111+
elif [ "$COMMAND" = "checknative" ] ; then
112+
CLASS=org.apache.hadoop.util.NativeLibraryChecker
113+
elif [ "$COMMAND" = "distcp" ] ; then
114+
CLASS=org.apache.hadoop.tools.DistCp
115+
CLASSPATH=${CLASSPATH}:${TOOL_PATH}
116+
elif [ "$COMMAND" = "daemonlog" ] ; then
117+
CLASS=org.apache.hadoop.log.LogLevel
118+
elif [ "$COMMAND" = "archive" ] ; then
119+
CLASS=org.apache.hadoop.tools.HadoopArchives
120+
CLASSPATH=${CLASSPATH}:${TOOL_PATH}
121+
elif [ "$COMMAND" = "credential" ] ; then
122+
CLASS=org.apache.hadoop.security.alias.CredentialShell
123+
elif [ "$COMMAND" = "trace" ] ; then
124+
CLASS=org.apache.hadoop.tracing.TraceAdmin
125+
elif [ "$COMMAND" = "classpath" ] ; then
126+
if [ "$#" -eq 1 ]; then
127+
# No need to bother starting up a JVM for this simple case.
128+
echo $CLASSPATH
129+
exit
130+
else
131+
CLASS=org.apache.hadoop.util.Classpath
132+
fi
133+
elif [[ "$COMMAND" = -* ]] ; then
134+
# class and package names cannot begin with a -
135+
echo "Error: No command named \`$COMMAND' was found. Perhaps you meant \`hadoop ${COMMAND#-}'"
136+
exit 1
137+
else
138+
CLASS=$COMMAND
139+
fi
140+
shift
141+
142+
# Always respect HADOOP_OPTS and HADOOP_CLIENT_OPTS
143+
HADOOP_OPTS="$HADOOP_OPTS $HADOOP_CLIENT_OPTS"
144+
145+
#make sure security appender is turned off
146+
HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.security.logger=${HADOOP_SECURITY_LOGGER:-INFO,NullAppender}"
147+
148+
export CLASSPATH=$CLASSPATH
149+
exec "$JAVA" $JAVA_HEAP_MAX $HADOOP_OPTS $CLASS "$@"
150+
;;
151+
152+
esac

0 commit comments

Comments
 (0)