init package

This commit is contained in:
wang--ge 2021-08-10 09:26:01 +08:00
parent ac32cab7a4
commit 3910db6696
12 changed files with 1012 additions and 0 deletions

View File

@ -0,0 +1,231 @@
From db5c4b4d03d06cd21e27e1abf50f6c5dadff8e5b Mon Sep 17 00:00:00 2001
From: wang--ge <wang__ge@126.com>
Date: Fri, 6 Aug 2021 10:05:11 +0800
Subject: [PATCH] modify maven-dependency-plugin
---
pom.xml | 205 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 203 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index 84a90b5..d487fac 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1010,11 +1010,212 @@
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
- <id>analyze</id>
+ <id>copy</id>
<goals>
- <goal>analyze-only</goal>
+ <goal>copy</goal>
</goals>
+ <phase>package</phase>
<configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>commons-beanutils</groupId>
+ <artifactId>commons-beanutils</artifactId>
+ <version>1.9.3</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-collections4</artifactId>
+ <version>4.3</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-configuration2</artifactId>
+ <version>2.5</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ <version>3.9</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-text</artifactId>
+ <version>1.6</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-vfs2</artifactId>
+ <version>2.3</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.freemarker</groupId>
+ <artifactId>freemarker</artifactId>
+ <version>2.3.28</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.glassfish.hk2</groupId>
+ <artifactId>hk2-api</artifactId>
+ <version>2.5.0</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.glassfish.hk2</groupId>
+ <artifactId>hk2-locator</artifactId>
+ <version>2.5.0</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.glassfish.hk2</groupId>
+ <artifactId>hk2-utils</artifactId>
+ <version>2.5.0</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.apache.htrace</groupId>
+ <artifactId>htrace-core</artifactId>
+ <version>${htrace.version}</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.apache.htrace</groupId>
+ <artifactId>htrace-core4</artifactId>
+ <version>${htrace.hadoop.version}</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-core</artifactId>
+ <version>${jackson.version}</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ <version>2.9.9.1</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>javax.annotation</groupId>
+ <artifactId>javax.annotation-api</artifactId>
+ <version>1.3.2</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>javax.inject</groupId>
+ <artifactId>javax.inject</artifactId>
+ <version>1</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>javax.ws.rs</groupId>
+ <artifactId>javax.ws.rs-api</artifactId>
+ <version>2.1.1</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.glassfish.jersey.core</groupId>
+ <artifactId>jersey-client</artifactId>
+ <version>${jersey.version}</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.glassfish.jersey.core</groupId>
+ <artifactId>jersey-common</artifactId>
+ <version>${jersey.version}</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.glassfish.jersey.containers</groupId>
+ <artifactId>jersey-container-servlet-core</artifactId>
+ <version>${jersey.version}</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.glassfish.jersey.ext</groupId>
+ <artifactId>jersey-entity-filtering</artifactId>
+ <version>${jersey.version}</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.glassfish.jersey.inject</groupId>
+ <artifactId>jersey-hk2</artifactId>
+ <version>${jersey.version}</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.glassfish.jersey.media</groupId>
+ <artifactId>jersey-media-json-jackson</artifactId>
+ <version>${jersey.version}</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.glassfish.jersey.ext</groupId>
+ <artifactId>jersey-mvc</artifactId>
+ <version>${jersey.version}</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.glassfish.jersey.ext</groupId>
+ <artifactId>jersey-mvc-freemarker</artifactId>
+ <version>${jersey.version}</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.glassfish.jersey.core</groupId>
+ <artifactId>jersey-server</artifactId>
+ <version>${jersey.version}</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.eclipse.jetty</groupId>
+ <artifactId>jetty-util</artifactId>
+ <version>${jetty.version}</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.apache.thrift</groupId>
+ <artifactId>libthrift</artifactId>
+ <version>${thrift.version}</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>stax2-api</artifactId>
+ <version>3.1.4</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>javax.validation</groupId>
+ <artifactId>validation-api</artifactId>
+ <version>2.0.1.Final</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>com.fasterxml.woodstox</groupId>
+ <artifactId>woodstox-core</artifactId>
+ <version>5.0.3</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.apache.zookeeper</groupId>
+ <artifactId>zookeeper</artifactId>
+ <version>${zookeeper.version}</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-hdfs-client</artifactId>
+ <version>3.1.4</version>
+ <outputDirectory>${project.build.directory}/lib</outputDirectory>
+ </artifactItem>
+ </artifactItems>
<failOnWarning>true</failOnWarning>
<ignoredUsedUndeclaredDependencies>
<!-- used/undeclared child jars brought in by parents below -->
--
2.27.0

BIN
2.0.1.tar.gz Normal file

Binary file not shown.

12
accumulo-gc.service Normal file
View File

@ -0,0 +1,12 @@
[Unit]
Description=Apache Accumulo Garbage Collector service
After=syslog.target network.target
[Service]
User=accumulo
Group=accumulo
ExecStart=/usr/bin/accumulo gc
SuccessExitStatus=143
[Install]
WantedBy=multi-user.target

12
accumulo-master.service Normal file
View File

@ -0,0 +1,12 @@
[Unit]
Description=Apache Accumulo Master service
After=syslog.target network.target
[Service]
User=accumulo
Group=accumulo
ExecStart=/usr/bin/accumulo master
SuccessExitStatus=143
[Install]
WantedBy=multi-user.target

60
accumulo-metrics.xml Normal file
View File

@ -0,0 +1,60 @@
<!--
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 file follows the conventions for XMLConfiguration files specified in the Apache Commons Configuration 1.5 Library. Changes to this file will be noticed
at runtime (see the FileChangedReloadingStrategy class in Commons Configuration).
-->
<config>
<!--
Metrics log directory
-->
<logging>
<dir>${ACCUMULO_HOME}/metrics</dir>
</logging>
<!--
Enable/Disable metrics accumulation on the different servers and their components
NOTE: Turning on logging can be expensive because it will use several more file handles and will create a lot of short lived objects.
-->
<master>
<enabled type="boolean">false</enabled>
<logging type="boolean">false</logging>
</master>
<tserver>
<enabled type="boolean">false</enabled>
<logging type="boolean">false</logging>
<update>
<enabled type="boolean">false</enabled>
<logging type="boolean">false</logging>
</update>
<scan>
<enabled type="boolean">false</enabled>
<logging type="boolean">false</logging>
</scan>
<minc>
<enabled type="boolean">false</enabled>
<logging type="boolean">false</logging>
</minc>
</tserver>
<thrift>
<enabled type="boolean">false</enabled>
<logging type="boolean">false</logging>
</thrift>
<replication>
<enabled type="boolean">false</enabled>
<logging type="boolean">false</logging>
</replication>
</config>

12
accumulo-monitor.service Normal file
View File

@ -0,0 +1,12 @@
[Unit]
Description=Apache Accumulo Monitor service
After=syslog.target network.target
[Service]
User=accumulo
Group=accumulo
ExecStart=/usr/bin/accumulo monitor
SuccessExitStatus=143
[Install]
WantedBy=multi-user.target

12
accumulo-tracer.service Normal file
View File

@ -0,0 +1,12 @@
[Unit]
Description=Apache Accumulo Tracer service
After=syslog.target network.target
[Service]
User=accumulo
Group=accumulo
ExecStart=/usr/bin/accumulo tracer
SuccessExitStatus=143
[Install]
WantedBy=multi-user.target

12
accumulo-tserver.service Normal file
View File

@ -0,0 +1,12 @@
[Unit]
Description=Apache Accumulo TServer service
After=syslog.target network.target
[Service]
User=accumulo
Group=accumulo
ExecStart=/usr/bin/accumulo tserver
SuccessExitStatus=143
[Install]
WantedBy=multi-user.target

34
accumulo.conf Normal file
View File

@ -0,0 +1,34 @@
#!/usr/bin/bash
# This file is sourced by /usr/bin/accumulo before launching java. It will use
# the $ACCUMULO_OPTS environment variable created here to add options to the
# java command line. This file can be overridden per-user by creating a
# $HOME/.accumulorc to be sourced after this file.
# The $1 parameter is passed with the first argument provided to
# /usr/bin/accumulo, which is usually the name of the accumulo service or
# function to run.
# Append some common arguments
#
# Note: app isn't used for anything, but makes it easier to locate services
# quickly with ps/top/etc output
ACCUMULO_OPTS=("-Dapp=$1" '-XX:+UseConcMarkSweepGC' '-XX:CMSInitiatingOccupancyFraction=75' '-Djava.net.preferIPv4Stack=true' '-XX:-OmitStackTraceInFastThrow' '-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl' '-XX:OnOutOfMemoryError=kill -9 %p')
# Append some service-specific arguments
case "$1" in
gc) ACCUMULO_OPTS=("${ACCUMULO_OPTS[@]}" '-Xmx256m' '-Xms256m') ;;
master) ACCUMULO_OPTS=("${ACCUMULO_OPTS[@]}" '-Xmx1g' '-Xms1g') ;;
monitor) ACCUMULO_OPTS=("${ACCUMULO_OPTS[@]}" '-Xmx1g' '-Xms256m') ;;
tserver) ACCUMULO_OPTS=("${ACCUMULO_OPTS[@]}" '-Xmx1g' '-Xms1g' '-XX:NewSize=500m' '-XX:MaxNewSize=500m') ;;
*) ACCUMULO_OPTS=("${ACCUMULO_OPTS[@]}" '-Xmx1g' '-Xms256m') ;;
esac
# Set this because it's read by the VFS classloader
export ACCUMULO_HOME=/etc/accumulo
# Set these because they could be referenced by logger configuration
export ACCUMULO_CONF_DIR=/etc/accumulo
export ACCUMULO_LOG_DIR=/var/log/accumulo
# See HADOOP-7154 and ACCUMULO-847
export MALLOC_ARENA_MAX=1

236
accumulo.spec Normal file
View File

@ -0,0 +1,236 @@
%global _hardened_build 1
%global longproj Apache Accumulo
# jpackage main class
%global main_class org.apache.%{name}.start.Main
Name: accumulo
Version: 2.0.1
Release: 1
Summary: A software platform for processing vast amounts of data
License: Apache-2.0 and BSD
Group: Development/Libraries
URL: https://github.com/apache/%{name}/
Source0: https://github.com/apache/%{name}/archive/refs/tags/%{version}.tar.gz
Source1: %{name}-master.service
Source2: %{name}-tserver.service
Source3: %{name}-gc.service
Source4: %{name}-tracer.service
Source5: %{name}-monitor.service
Source6: %{name}.conf
Source7: xmvn-reactor
Source8: accumulo-metrics.xml
Source9: auditLog.xml
Patch0: 0001-add-dependent-package-to-lib.patch
BuildRequires: java-1.8.0-openjdk-devel maven maven-local
Requires: java-1.8.0-openjdk
Requires(pre): /usr/sbin/useradd
Requires: apache-commons-cli apache-commons-codec apache-commons-collections apache-commons-configuration
Requires: apache-commons-dbcp apache-commons-daemon apache-commons-io apache-commons-lang apache-commons-logging
Requires: apache-commons-math apache-commons-pool apache-commons-vfs avro beust-jcommander dnf
Requires: glassfish-servlet-api guava google-gson jansi jetty jline nodejs-flot protobuf-java slf4j zookeeper
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
%description
%{longproj} is a sorted, distributed key/value store based on Google's
BigTable design. It is built on top of Apache Hadoop, Zookeeper, and Thrift. It
features a few novel improvements on the BigTable design in the form of
cell-level access labels and a server-side programming mechanism that can
modify key/value pairs at various points in the data management process.
%prep
%autosetup -p1 -n %{name}-rel-%{version}
# Remove flot and jquery bundling from upstream tarball
rm -rf server/monitor/src/main/resources/web/flot/
%pom_remove_plugin :apache-rat-plugin
cp %{SOURCE7} ./.xmvn-reactor
echo `pwd` > absolute_prefix.log
sed -i 's/\//\\\//g' absolute_prefix.log
absolute_prefix=`head -n 1 absolute_prefix.log`
sed -i 's/absolute-prefix/'"$absolute_prefix"'/g' .xmvn-reactor
find -name "*.jar" -delete
find -name "*.cmd" -delete
%build
# TODO Unit tests are skipped, because upstream tries to do some integration
# testing in the unit tests, and they expect certain resources and dependencies
# that are not typically available, or are too complicated to configure,
# especially in the start jar. These should be enabled when possible.
# ITs are skipped, because they time out frequently and take too many resources
# to run reliably. Failures do not reliably indicate meaningful issues.
mvn package -DforkCount=1C -DskipTests -DskipITs -Dtaro
%install
install -d -m 755 %{buildroot}%{_datadir}/java/%{name}
%mvn_install
cp -arf target/lib/* %{buildroot}%{_datadir}/java/%{name}
cp %{SOURCE8} assemble/bin
# create symlink for system-provided web assets to be added to classpath
install -d -m 755 %{buildroot}%{_datadir}/%{name}/lib/web
rm -f %{buildroot}%{_datadir}/%{name}/lib/web/flot
ln -s %{_usr}/lib/node_modules/flot %{buildroot}%{_datadir}/%{name}/lib/web/flot
# native libs
install -d -m 755 %{buildroot}%{_libdir}/%{name}
install -d -m 755 %{buildroot}%{_var}/cache/%{name}
install -p -m 755 server/native/target/%{name}-native-%{version}/%{name}-native-%{version}/lib%{name}.so %{buildroot}%{_libdir}/%{name}
ln -s %{_libdir}/%{name}/lib%{name}.so %{buildroot}%{_prefix}/lib/
# generate default config for Fedora from upstream examples
install -d -m 755 %{buildroot}%{_sysconfdir}/%{name}
install -d -m 755 %{buildroot}%{_sysconfdir}/%{name}/lib
install -d -m 755 %{buildroot}%{_sysconfdir}/%{name}/lib/ext
cp -arf assemble/conf/* %{buildroot}%{_sysconfdir}/%{name}/
cp assemble/conf/templates/hadoop-metrics2-accumulo.properties %{buildroot}%{_sysconfdir}/%{name}/
rm -rf %{buildroot}%{_sysconfdir}/%{name}/templates
for x in gc masters monitor slaves tracers %{name}-env.sh generic_logger.xml generic_logger.properties monitor_logger.xml monitor_logger.properties %{name}.policy.example; do rm -f %{buildroot}%{_sysconfdir}/%{name}/$x; done
cp %{buildroot}%{_sysconfdir}/%{name}/log4j.properties %{buildroot}%{_sysconfdir}/%{name}/generic_logger.properties
cp %{buildroot}%{_sysconfdir}/%{name}/log4j.properties %{buildroot}%{_sysconfdir}/%{name}/monitor_logger.properties
cp %{SOURCE8} %{buildroot}%{_sysconfdir}/%{name}
cp %{SOURCE9} %{buildroot}%{_sysconfdir}/%{name}
# main launcher
%jpackage_script %{main_class} "" "" %{name}:%{name}/%{name}-tserver:jetty:servlet:avro/avro:apache-commons-io:apache-commons-cli:apache-commons-codec:apache-commons-collections:apache-commons-configuration:apache-commons-lang:apache-commons-logging:apache-commons-math:apache-commons-vfs:beust-jcommander:google-gson:guava:hadoop/hadoop-auth:hadoop/hadoop-common:hadoop/hadoop-hdfs:jansi/jansi:jline/jline:libthrift:log4j-1.2.17:slf4j/slf4j-api:slf4j/slf4j-log4j12:zookeeper/zookeeper:protobuf-java %{name} true
# fixup the generated jpackage script
sed -i -e 's/^#!\/bin\/sh$/#!\/usr\/bin\/bash/' %{buildroot}%{_bindir}/%{name}
# ensure the java configuration options know which service is being called
sed -i -e 's/^\s*\.\s\s*\/etc\/java\/'%{name}'\.conf/& "\$1"/' %{buildroot}%{_bindir}/%{name}
sed -i -e 's/^\s*\.\s\s*\$HOME\/\.'%{name}'rc$/& "\$1"/' %{buildroot}%{_bindir}/%{name}
# options may have spaces in them, so replace run with an exec that properly
# parses arguments as arrays.
sed -i -e '/^run .*$/d' %{buildroot}%{_bindir}/%{name}
sed -i -e '/^set_flags .*$/d' %{buildroot}%{_bindir}/%{name}
sed -i -e '/^set_options .*$/d' %{buildroot}%{_bindir}/%{name}
cat <<EOF >>%{buildroot}%{_bindir}/%{name}
CLASSPATH="%{_sysconfdir}/%{name}:%{_datadir}/%{name}/lib/:\${CLASSPATH}"
set_javacmd
if [ -n "\${VERBOSE}" ]; then
echo "Java virtual machine used: \${JAVACMD}"
echo "classpath used: \${CLASSPATH}"
echo "main class used: \${MAIN_CLASS}"
echo "flags used: \${FLAGS[*]}"
echo "options used: \${ACCUMULO_OPTS[*]}"
echo "arguments used: \${*}"
fi
export CLASSPATH
exec "\${JAVACMD}" "\${FLAGS[@]}" "\${ACCUMULO_OPTS[@]}" "\${MAIN_CLASS}" "\${@}"
EOF
# scripts for services/utilities
for service in master tserver shell init admin gc tracer classpath version rfile-info login-info zookeeper create-token info jar; do
cat <<EOF >"%{name}-$service"
#!/usr/bin/bash
echo "%{name}-$service script is deprecated. Use '%{name} $service' instead." 1>&2
%{_bindir}/%{name} $service "\$@"
EOF
install -p -m 755 %{name}-$service %{buildroot}%{_bindir}
done
# systemd services
install -d -m 755 %{buildroot}%{_unitdir}
install -p -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}-master.service
install -p -m 644 %{SOURCE2} %{buildroot}%{_unitdir}/%{name}-tserver.service
install -p -m 644 %{SOURCE3} %{buildroot}%{_unitdir}/%{name}-gc.service
install -p -m 644 %{SOURCE4} %{buildroot}%{_unitdir}/%{name}-tracer.service
install -p -m 644 %{SOURCE5} %{buildroot}%{_unitdir}/%{name}-monitor.service
# java configuration file for Fedora
install -d -m 755 %{buildroot}%{_javaconfdir}
install -p -m 755 %{SOURCE6} %{buildroot}%{_javaconfdir}/%{name}.conf
#fix absence
install -d -m 755 %{buildroot}%{_datadir}/doc/%{name}/
install -p -m 644 README.md %{buildroot}%{_datadir}/doc/%{name}/
%files -f .mfiles
%doc LICENSE
%doc README.md
%doc NOTICE
%dir %{_javadir}/%{name}
%dir %{_mavenpomdir}/%{name}
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/lib
%{_javadir}/%{name}/*
%{_bindir}/%{name}
%{_bindir}/%{name}-shell
%{_bindir}/%{name}-classpath
%{_bindir}/%{name}-version
%{_bindir}/%{name}-rfile-info
%{_bindir}/%{name}-login-info
%{_bindir}/%{name}-zookeeper
%{_bindir}/%{name}-create-token
%{_bindir}/%{name}-info
%{_bindir}/%{name}-jar
%attr(0750, %{name}, -) %dir %{_var}/cache/%{name}
%attr(0755, %{name}, -) %dir %{_sysconfdir}/%{name}
%attr(0755, %{name}, -) %dir %{_sysconfdir}/%{name}/lib
%attr(0755, %{name}, -) %dir %{_sysconfdir}/%{name}/lib/ext
%attr(0755, %{name}, -) %config(noreplace) %{_javaconfdir}/%{name}.conf
%attr(0640, %{name}, -) %config(noreplace) %{_sysconfdir}/%{name}/%{name}-metrics.xml
%attr(0640, %{name}, -) %config(noreplace) %{_sysconfdir}/%{name}/auditLog.xml
%attr(0640, %{name}, -) %config(noreplace) %{_sysconfdir}/%{name}/generic_logger.properties
%attr(0644, %{name}, -) %config(noreplace) %{_sysconfdir}/%{name}/log4j.properties
%attr(0640, %{name}, -) %config(noreplace) %{_sysconfdir}/%{name}/monitor_logger.properties
%attr(0640, %{name}, -) %config(noreplace) %{_sysconfdir}/%{name}/hadoop-metrics2-accumulo.properties
%attr(0640, %{name}, -) %config(noreplace) %{_sysconfdir}/%{name}/log4j-monitor.properties
%attr(0640, %{name}, -) %config(noreplace) %{_sysconfdir}/%{name}/log4j-service.properties
%attr(0640, %{name}, -) %config(noreplace) %{_sysconfdir}/%{name}/accumulo.properties
%{_bindir}/%{name}-init
%{_bindir}/%{name}-admin
%{_bindir}/%{name}-master
%{_unitdir}/%{name}-master.service
%dir %{_jnidir}/%{name}
%{_bindir}/%{name}-tserver
%{_unitdir}/%{name}-tserver.service
%{_bindir}/%{name}-gc
%{_unitdir}/%{name}-gc.service
%dir %{_datadir}/%{name}/lib/web
%{_datadir}/%{name}/lib/web/flot
%{_unitdir}/%{name}-monitor.service
%{_bindir}/%{name}-tracer
%{_unitdir}/%{name}-tracer.service
%dir %{_libdir}/%{name}
%{_libdir}/%{name}/lib%{name}.so
%{_prefix}/lib/lib%{name}.so
%preun
%systemd_preun %{name}-master.service
%systemd_preun %{name}-tserver.service
%systemd_preun %{name}-gc.service
%systemd_preun %{name}-tracer.service
%systemd_preun %{name}-monitor.service
%postun
%systemd_postun_with_restart %{name}-master.service
%systemd_postun_with_restart %{name}-tserver.service
%systemd_postun_with_restart %{name}-gc.service
%systemd_postun_with_restart %{name}-tracer.service
%systemd_postun_with_restart %{name}-monitor.service
%pre
getent group %{name} >/dev/null || /usr/sbin/groupadd -r %{name}
getent passwd %{name} >/dev/null || /usr/sbin/useradd --comment "%{longproj}" --shell /sbin/nologin -M -r -g %{name} --home %{_var}/cache/%{name} %{name}
%post
%systemd_post %{name}-master.service
%systemd_post %{name}-tserver.service
%systemd_post %{name}-gc.service
%systemd_post %{name}-tracer.service
%systemd_post %{name}-monitor.service
hadoop_info=`dnf list installed | grep hadoop`
if [ -z ${hadoop_info} ];then
echo "WARNING: Package hadoop or hadoop-3.1 should be installed first"
fi
%changelog
* Mon Jun 21 2021 Ge Wang <wangge20@huawei> - 2.0.1-1
- Initial packaging

35
auditLog.xml Normal file
View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<!-- Write out Audit info to an Audit file -->
<appender name="Audit" class="org.apache.log4j.DailyRollingFileAppender">
<param name="File" value="${org.apache.accumulo.core.dir.log}/${org.apache.accumulo.core.ip.localhost.hostname}.audit"/>
<param name="MaxBackupIndex" value="10"/>
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss,SSS/Z} [%c{2}] %-5p: %m%n"/>
</layout>
</appender>
<logger name="Audit" additivity="false">
<appender-ref ref="Audit" />
<level value="OFF"/>
</logger>
</log4j:configuration>

356
xmvn-reactor Normal file
View File

@ -0,0 +1,356 @@
<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://fedorahosted.org/xmvn/METADATA/3.0.0">
<artifacts>
<artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-shell</artifactId>
<version>2.0.1</version>
<path>absolute-prefix/shell/target/accumulo-shell-2.0.1.jar</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact>
<artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-shell</artifactId>
<extension>pom</extension>
<version>2.0.1</version>
<path>absolute-prefix/shell/pom.xml</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact>
<artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-core</artifactId>
<version>2.0.1</version>
<path>absolute-prefix/core/target/accumulo-core-2.0.1.jar</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact>
<artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-core</artifactId>
<extension>pom</extension>
<version>2.0.1</version>
<path>absolute-prefix/core/pom.xml</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact>
<artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-tracer</artifactId>
<version>2.0.1</version>
<path>absolute-prefix/server/tracer/target/accumulo-tracer-2.0.1.jar</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact>
<artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-tracer</artifactId>
<extension>pom</extension>
<version>2.0.1</version>
<path>absolute-prefix/server/tracer/pom.xml</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact>
<!--artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-fate</artifactId>
<version>2.0.1</version>
<path>absolute-prefix/fate/target/accumulo-fate-2.0.1.jar</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact>
<artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-fate</artifactId>
<extension>pom</extension>
<version>2.0.1</version>
<path>absolute-prefix/fate/pom.xml</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact-->
<!--artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-trace</artifactId>
<version>2.0.1</version>
<path>absolute-prefix/trace/target/accumulo-trace-2.0.1.jar</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact>
<artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-trace</artifactId>
<extension>pom</extension>
<version>2.0.1</version>
<path>absolute-prefix/trace/pom.xml</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact-->
<artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-tserver</artifactId>
<version>2.0.1</version>
<path>absolute-prefix/server/tserver/target/accumulo-tserver-2.0.1.jar</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact>
<artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-tserver</artifactId>
<extension>pom</extension>
<version>2.0.1</version>
<path>absolute-prefix/server/tserver/pom.xml</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact>
<artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-minicluster</artifactId>
<version>2.0.1</version>
<path>absolute-prefix/minicluster/target/accumulo-minicluster-2.0.1.jar</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact>
<artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-minicluster</artifactId>
<extension>pom</extension>
<version>2.0.1</version>
<path>absolute-prefix/minicluster/pom.xml</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact>
<!--artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-proxy</artifactId>
<version>2.0.1</version>
<path>absolute-prefix/proxy/target/accumulo-proxy-2.0.1.jar</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact>
<artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-proxy</artifactId>
<extension>pom</extension>
<version>2.0.1</version>
<path>absolute-prefix/proxy/pom.xml</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact-->
<artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-monitor</artifactId>
<version>2.0.1</version>
<path>absolute-prefix/server/monitor/target/accumulo-monitor-2.0.1.jar</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact>
<artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-monitor</artifactId>
<extension>pom</extension>
<version>2.0.1</version>
<path>absolute-prefix/server/monitor/pom.xml</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact>
<artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-start</artifactId>
<version>2.0.1</version>
<path>absolute-prefix/start/target/accumulo-start-2.0.1.jar</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact>
<artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-start</artifactId>
<extension>pom</extension>
<version>2.0.1</version>
<path>absolute-prefix/start/pom.xml</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact>
<artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-server-base</artifactId>
<version>2.0.1</version>
<path>absolute-prefix/server/base/target/accumulo-server-base-2.0.1.jar</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact>
<artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-server-base</artifactId>
<extension>pom</extension>
<version>2.0.1</version>
<path>absolute-prefix/server/base/pom.xml</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact>
<artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-gc</artifactId>
<version>2.0.1</version>
<path>absolute-prefix/server/gc/target/accumulo-gc-2.0.1.jar</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact>
<artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-gc</artifactId>
<extension>pom</extension>
<version>2.0.1</version>
<path>absolute-prefix/server/gc/pom.xml</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact>
<artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-master</artifactId>
<version>2.0.1</version>
<path>absolute-prefix/server/master/target/accumulo-master-2.0.1.jar</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact>
<artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-master</artifactId>
<extension>pom</extension>
<version>2.0.1</version>
<path>absolute-prefix/server/master/pom.xml</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact>
<!--artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-maven-plugin</artifactId>
<version>2.0.1</version>
<path>absolute-prefix/maven-plugin/target/accumulo-maven-plugin-2.0.1.jar</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact>
<artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-maven-plugin</artifactId>
<extension>pom</extension>
<version>2.0.1</version>
<path>absolute-prefix/maven-plugin/pom.xml</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact-->
<artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-hadoop-mapreduce</artifactId>
<version>2.0.1</version>
<path>absolute-prefix/hadoop-mapreduce/target/accumulo-hadoop-mapreduce-2.0.1.jar</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact>
<artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-hadoop-mapreduce</artifactId>
<extension>pom</extension>
<version>2.0.1</version>
<path>absolute-prefix/hadoop-mapreduce/pom.xml</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact>
<artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-iterator-test-harness</artifactId>
<version>2.0.1</version>
<path>absolute-prefix/iterator-test-harness/target/accumulo-iterator-test-harness-2.0.1.jar</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact>
<artifact>
<groupId>org.apache.accumulo</groupId>
<artifactId>accumulo-iterator-test-harness</artifactId>
<extension>pom</extension>
<version>2.0.1</version>
<path>absolute-prefix/iterator-test-harness/pom.xml</path>
<properties>
<type>jar</type>
<requiresJava>1.6</requiresJava>
</properties>
</artifact>
</artifacts>
</metadata>