Skip to content

Commit ee759af

Browse files
authored
Revert "merge all commit to my forked repo (#1)"
This reverts commit 1de128f.
1 parent 1de128f commit ee759af

File tree

2,326 files changed

+105709
-155565
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,326 files changed

+105709
-155565
lines changed

.editorconfig

Lines changed: 0 additions & 693 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,3 @@ linklint-*.zip
2020
linklint/
2121
.checkstyle
2222
**/.checkstyle
23-
.java-version

.rubocop.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

NOTICE.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,3 @@ This product includes portions of the Guava project v14 and v21, specifically
4545
Copyright (C) 2007 The Guava Authors
4646

4747
Licensed under the Apache License, Version 2.0
48-
--
49-
This product includes portions of Jetty project, specially
50-
'hbase-shaded-hbase-shaded-testing-util/src/main/resources/org/apache/hadoop/hbase/shaded/org/mortbay/jetty/webapp/webdefault.xml'

bin/draining_servers.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
# Return array of servernames where servername is hostname+port+startcode
5050
# comma-delimited
5151
def getServers(admin)
52-
serverInfos = admin.getClusterMetrics.getLiveServerMetrics.keySet
52+
serverInfos = admin.getClusterStatus.getServers
5353
servers = []
5454
serverInfos.each do |server|
5555
servers << server.getServerName

bin/hbase

Lines changed: 42 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -91,37 +91,35 @@ if [ $# = 0 ]; then
9191
echo ""
9292
echo "Commands:"
9393
echo "Some commands take arguments. Pass no args or -h for usage."
94-
echo " shell Run the HBase shell"
95-
echo " hbck Run the HBase 'fsck' tool. Defaults read-only hbck1."
96-
echo " Pass '-j /path/to/HBCK2.jar' to run hbase-2.x HBCK2."
97-
echo " snapshot Tool for managing snapshots"
94+
echo " shell Run the HBase shell"
95+
echo " hbck Run the HBase 'fsck' tool. Defaults read-only hbck1."
96+
echo " Pass '-j /path/to/HBCK2.jar' to run hbase-2.x HBCK2."
97+
echo " snapshot Tool for managing snapshots"
9898
if [ "${in_omnibus_tarball}" = "true" ]; then
99-
echo " wal Write-ahead-log analyzer"
100-
echo " hfile Store file analyzer"
101-
echo " zkcli Run the ZooKeeper shell"
102-
echo " master Run an HBase HMaster node"
103-
echo " regionserver Run an HBase HRegionServer node"
104-
echo " zookeeper Run a ZooKeeper server"
105-
echo " rest Run an HBase REST server"
106-
echo " thrift Run the HBase Thrift server"
107-
echo " thrift2 Run the HBase Thrift2 server"
108-
echo " clean Run the HBase clean up script"
109-
fi
110-
echo " classpath Dump hbase CLASSPATH"
111-
echo " mapredcp Dump CLASSPATH entries required by mapreduce"
112-
echo " pe Run PerformanceEvaluation"
113-
echo " ltt Run LoadTestTool"
114-
echo " canary Run the Canary tool"
115-
echo " version Print the version"
116-
echo " backup Backup tables for recovery"
117-
echo " restore Restore tables from existing backup image"
118-
echo " completebulkload Run BulkLoadHFiles tool"
119-
echo " regionsplitter Run RegionSplitter tool"
120-
echo " rowcounter Run RowCounter tool"
121-
echo " cellcounter Run CellCounter tool"
122-
echo " pre-upgrade Run Pre-Upgrade validator tool"
123-
echo " hbtop Run HBTop tool"
124-
echo " CLASSNAME Run the class named CLASSNAME"
99+
echo " wal Write-ahead-log analyzer"
100+
echo " hfile Store file analyzer"
101+
echo " zkcli Run the ZooKeeper shell"
102+
echo " master Run an HBase HMaster node"
103+
echo " regionserver Run an HBase HRegionServer node"
104+
echo " zookeeper Run a ZooKeeper server"
105+
echo " rest Run an HBase REST server"
106+
echo " thrift Run the HBase Thrift server"
107+
echo " thrift2 Run the HBase Thrift2 server"
108+
echo " clean Run the HBase clean up script"
109+
fi
110+
echo " classpath Dump hbase CLASSPATH"
111+
echo " mapredcp Dump CLASSPATH entries required by mapreduce"
112+
echo " pe Run PerformanceEvaluation"
113+
echo " ltt Run LoadTestTool"
114+
echo " canary Run the Canary tool"
115+
echo " version Print the version"
116+
echo " backup Backup tables for recovery"
117+
echo " restore Restore tables from existing backup image"
118+
echo " regionsplitter Run RegionSplitter tool"
119+
echo " rowcounter Run RowCounter tool"
120+
echo " cellcounter Run CellCounter tool"
121+
echo " pre-upgrade Run Pre-Upgrade validator tool"
122+
echo " CLASSNAME Run the class named CLASSNAME"
125123
exit 1
126124
fi
127125

@@ -184,11 +182,20 @@ if [ -d "$HBASE_HOME/hbase-server/target/hbase-webapps" ]; then
184182
add_to_cp_if_exists "${HBASE_HOME}/hbase-rest/target"
185183
else
186184
add_to_cp_if_exists "${HBASE_HOME}/hbase-server/target"
187-
# Needed for GetJavaProperty check below
188-
add_to_cp_if_exists "${HBASE_HOME}/hbase-server/target/classes"
189185
fi
190186
fi
191187

188+
#add the hbase jars for each module
189+
for f in $HBASE_HOME/hbase-jars/hbase*.jar; do
190+
if [[ $f = *sources.jar ]]
191+
then
192+
: # Skip sources.jar
193+
elif [ -f $f ]
194+
then
195+
CLASSPATH=${CLASSPATH}:$f;
196+
fi
197+
done
198+
192199
#If avail, add Hadoop to the CLASSPATH and to the JAVA_LIBRARY_PATH
193200
# Allow this functionality to be disabled
194201
if [ "$HBASE_DISABLE_HADOOP_CLASSPATH_LOOKUP" != "true" ] ; then
@@ -215,7 +222,7 @@ if [ "${INTERNAL_CLASSPATH}" != "true" ]; then
215222
done
216223

217224
# If command can use our shaded client, use it
218-
declare -a commands_in_client_jar=("classpath" "version" "hbtop")
225+
declare -a commands_in_client_jar=("classpath" "version")
219226
for c in "${commands_in_client_jar[@]}"; do
220227
if [ "${COMMAND}" = "${c}" ]; then
221228
if [ -n "${HADOOP_IN_PATH}" ] && [ -f "${HADOOP_IN_PATH}" ]; then
@@ -309,15 +316,7 @@ fi
309316

310317
#If configured and available, add Hadoop to the CLASSPATH and to the JAVA_LIBRARY_PATH
311318
if [ -n "${HADOOP_IN_PATH}" ] && [ -f "${HADOOP_IN_PATH}" ]; then
312-
# If built hbase, temporarily add hbase-server*.jar to classpath for GetJavaProperty
313-
# Exclude hbase-server*-tests.jar
314-
temporary_cp=
315-
for f in "${HBASE_HOME}"/lib/hbase-server*.jar; do
316-
if [[ ! "${f}" =~ ^.*\-tests\.jar$ ]]; then
317-
temporary_cp=":$f"
318-
fi
319-
done
320-
HADOOP_JAVA_LIBRARY_PATH=$(HADOOP_CLASSPATH="$CLASSPATH${temporary_cp}" "${HADOOP_IN_PATH}" \
319+
HADOOP_JAVA_LIBRARY_PATH=$(HADOOP_CLASSPATH="$CLASSPATH" "${HADOOP_IN_PATH}" \
321320
org.apache.hadoop.hbase.util.GetJavaProperty java.library.path)
322321
if [ -n "$HADOOP_JAVA_LIBRARY_PATH" ]; then
323322
JAVA_LIBRARY_PATH=$(append_path "${JAVA_LIBRARY_PATH}" "$HADOOP_JAVA_LIBRARY_PATH")
@@ -442,14 +441,6 @@ add_maven_deps_to_classpath() {
442441
CLASSPATH=${CLASSPATH}:$(cat "${f}")
443442
}
444443

445-
add_jdk11_deps_to_classpath() {
446-
for f in ${HBASE_HOME}/lib/jdk11/*; do
447-
if [ -f "${f}" ]; then
448-
CLASSPATH="${CLASSPATH}:${f}"
449-
fi
450-
done
451-
}
452-
453444
#Add the development env class path stuff
454445
if $in_dev_env; then
455446
add_maven_deps_to_classpath "cached_classpath.txt"
@@ -642,7 +633,7 @@ elif [ "$COMMAND" = "ltt" ] ; then
642633
CLASS='org.apache.hadoop.hbase.util.LoadTestTool'
643634
HBASE_OPTS="$HBASE_OPTS $HBASE_LTT_OPTS"
644635
elif [ "$COMMAND" = "canary" ] ; then
645-
CLASS='org.apache.hadoop.hbase.tool.CanaryTool'
636+
CLASS='org.apache.hadoop.hbase.tool.Canary'
646637
HBASE_OPTS="$HBASE_OPTS $HBASE_CANARY_OPTS"
647638
elif [ "$COMMAND" = "version" ] ; then
648639
CLASS='org.apache.hadoop.hbase.util.VersionInfo'
@@ -654,88 +645,10 @@ elif [ "$COMMAND" = "cellcounter" ] ; then
654645
CLASS='org.apache.hadoop.hbase.mapreduce.CellCounter'
655646
elif [ "$COMMAND" = "pre-upgrade" ] ; then
656647
CLASS='org.apache.hadoop.hbase.tool.PreUpgradeValidator'
657-
elif [ "$COMMAND" = "completebulkload" ] ; then
658-
CLASS='org.apache.hadoop.hbase.tool.BulkLoadHFilesTool'
659-
elif [ "$COMMAND" = "hbtop" ] ; then
660-
CLASS='org.apache.hadoop.hbase.hbtop.HBTop'
661-
if [ -n "${shaded_jar}" ] ; then
662-
for f in "${HBASE_HOME}"/lib/hbase-hbtop*.jar; do
663-
if [ -f "${f}" ]; then
664-
CLASSPATH="${CLASSPATH}:${f}"
665-
break
666-
fi
667-
done
668-
for f in "${HBASE_HOME}"/lib/commons-lang3*.jar; do
669-
if [ -f "${f}" ]; then
670-
CLASSPATH="${CLASSPATH}:${f}"
671-
break
672-
fi
673-
done
674-
fi
675-
676-
if [ -f "${HBASE_HOME}/conf/log4j-hbtop.properties" ] ; then
677-
HBASE_HBTOP_OPTS="${HBASE_HBTOP_OPTS} -Dlog4j.configuration=file:${HBASE_HOME}/conf/log4j-hbtop.properties"
678-
fi
679-
HBASE_OPTS="${HBASE_OPTS} ${HBASE_HBTOP_OPTS}"
680648
else
681649
CLASS=$COMMAND
682650
fi
683651

684-
# Add lib/jdk11 jars to the classpath
685-
686-
if [ "${DEBUG}" = "true" ]; then
687-
echo "Deciding on addition of lib/jdk11 jars to the classpath"
688-
fi
689-
690-
addJDK11Jars=false
691-
692-
if [ "${HBASE_JDK11}" != "" ]; then
693-
# Use the passed Environment Variable HBASE_JDK11
694-
if [ "${HBASE_JDK11}" = "include" ]; then
695-
addJDK11Jars=true
696-
if [ "${DEBUG}" = "true" ]; then
697-
echo "HBASE_JDK11 set as 'include' hence adding JDK11 jars to classpath."
698-
fi
699-
elif [ "${HBASE_JDK11}" = "exclude" ]; then
700-
if [ "${DEBUG}" = "true" ]; then
701-
echo "HBASE_JDK11 set as 'exclude' hence skipping JDK11 jars to classpath."
702-
fi
703-
else
704-
echo "[HBASE_JDK11] contains unsupported value(s) - ${HBASE_JDK11}. Ignoring passed value."
705-
echo "[HBASE_JDK11] supported values: [include, exclude]."
706-
fi
707-
else
708-
# Use JDK detection
709-
JAVA=$JAVA_HOME/bin/java
710-
711-
version=$($JAVA -version 2>&1 | awk -F '"' '/version/ {print $2}')
712-
# '-' check is for cases such as "13-ea"
713-
version_number=$(echo "$version" | cut -d'.' -f1 | cut -d'-' -f1)
714-
715-
if [ "${DEBUG}" = "true" ]; then
716-
echo "HBASE_JDK11 not set hence using JDK detection."
717-
echo "Extracted JDK version - ${version}, version_number - ${version_number}"
718-
fi
719-
720-
if [[ "$version_number" -ge "11" ]]; then
721-
if [ "${DEBUG}" = "true" ]; then
722-
echo "Version ${version} is greater-than/equal to 11 hence adding JDK11 jars to classpath."
723-
fi
724-
addJDK11Jars=true
725-
elif [ "${DEBUG}" = "true" ]; then
726-
echo "Version ${version} is lesser than 11 hence skipping JDK11 jars from classpath."
727-
fi
728-
fi
729-
730-
if [ "${addJDK11Jars}" = "true" ]; then
731-
add_jdk11_deps_to_classpath
732-
if [ "${DEBUG}" = "true" ]; then
733-
echo "Added JDK11 jars to classpath."
734-
fi
735-
elif [ "${DEBUG}" = "true" ]; then
736-
echo "JDK11 jars skipped from classpath."
737-
fi
738-
739652
# Have JVM dump heap if we run out of memory. Files will be 'launch directory'
740653
# and are named like the following: java_pid21612.hprof. Apparently it doesn't
741654
# 'cost' to have this flag enabled. Its a 1.6 flag only. See:
@@ -776,6 +689,5 @@ fi
776689
if [ "${HBASE_NOEXEC}" != "" ]; then
777690
"$JAVA" -Dproc_$COMMAND -XX:OnOutOfMemoryError="kill -9 %p" $HEAP_SETTINGS $HBASE_OPTS $CLASS "$@"
778691
else
779-
export JVM_PID="$$"
780692
exec "$JAVA" -Dproc_$COMMAND -XX:OnOutOfMemoryError="kill -9 %p" $HEAP_SETTINGS $HBASE_OPTS $CLASS "$@"
781693
fi

bin/region_status.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
$TableName = TableName.valueOf($tablename.to_java_bytes) unless $tablename.nil?
133133
loop do
134134
if $tablename.nil?
135-
server_count = admin.getClusterMetrics.getRegionCount
135+
server_count = admin.getClusterStatus.getRegionsCount
136136
else
137137
connection = ConnectionFactory.createConnection(config)
138138
server_count = MetaTableAccessor.allTableRegions(connection, $TableName).size

conf/hbase-env.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
@rem see http://hbase.apache.org/book.html#performance
4141
@rem JDK6 on Windows has a known bug for IPv6, use preferIPv4Stack unless JDK7.
4242
@rem @rem See TestIPv6NIOServerSocketChannel.
43-
set HBASE_OPTS=%HBASE_OPTS% "-XX:+UseConcMarkSweepGC" "-Djava.net.preferIPv4Stack=true"
43+
set HBASE_OPTS="-XX:+UseConcMarkSweepGC" "-Djava.net.preferIPv4Stack=true"
4444

4545
@rem Uncomment below to enable java garbage collection logging for the server-side processes
4646
@rem this enables basic gc logging for the server processes to the .out file

conf/log4j-hbtop.properties

Lines changed: 0 additions & 27 deletions
This file was deleted.

dev-support/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#
2121
# Specifically, it's used for the flaky test reporting job defined in
2222
# dev-support/flaky-tests/flaky-reporting.Jenkinsfile
23-
FROM ubuntu:18.04
23+
FROM ubuntu:14.04
2424

2525
ADD . /hbase/dev-support
2626

0 commit comments

Comments
 (0)