Skip to content

Commit

Permalink
BIGTOP-4132: Add Hive component on Bigtop-3.3.0 stack (apache#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinw66 authored Dec 21, 2024
1 parent de461bb commit 47b9aeb
Show file tree
Hide file tree
Showing 21 changed files with 2,771 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@
regardless of whether 'dfs.namenode.checkpoint.period' has expired.
</description>
</property>
<property>
<name>hadoop.proxyuser.hive.hosts</name>
<value>*</value>
</property>
<property>
<name>dfs.replication.max</name>
<value>512</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"NAMENODE-STOP": [
"DATANODE-STOP",
"SECONDARYNAMENODE-STOP",
"HBASE_MASTER-STOP"
"HBASE_MASTER-STOP",
"HIVE_METASTORE-STOP"
],
"NAMENODE-START": [
"ZKFC-START",
Expand Down Expand Up @@ -43,6 +44,10 @@
"NODEMANAGER-RESTART": [
"NAMENODE-RESTART"
],
"NODEMANAGER-STOP": [
"HIVE_METASTORE-STOP",
"HIVESERVER2-STOP"
],
"HISTORY_SERVER-START": ["NAMENODE-START", "DATANODE-START"],
"HISTORY_SERVER-RESTART": ["NAMENODE-RESTART"]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?xml version="1.0"?>
<!--
~ 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.
-->

<configuration>
<property>
<name>content</name>
<display-name>beeline-log4j2 template</display-name>
<description>Custom beeline-log4j2.properties</description>
<value><![CDATA[
# 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.
status = INFO
name = BeelineLog4j2
packages = org.apache.hadoop.hive.ql.log
<#noparse>
# list of properties
property.hive.log.level = WARN
property.hive.root.logger = console
# list of all appenders
appenders = console
# console appender
appender.console.type = Console
appender.console.name = console
appender.console.target = SYSTEM_ERR
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = %d{yy/MM/dd HH:mm:ss} [%t]: %p %c{2}: %m%n
# list of all loggers
loggers = HiveConnection
# HiveConnection logs useful info for dynamic service discovery
logger.HiveConnection.name = org.apache.hive.jdbc.HiveConnection
logger.HiveConnection.level = INFO
# root logger
rootLogger.level = ${sys:hive.log.level}
rootLogger.appenderRefs = root
rootLogger.appenderRef.root.ref = ${sys:hive.root.logger}
</#noparse>
]]>
</value>
<attrs>
<type>longtext</type>
</attrs>
</property>
</configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
<?xml version="1.0"?>
<!--
~ 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.
-->

<configuration>
<property>
<name>hive_log_dir</name>
<value>/var/log/hive</value>
<display-name>Hive Log Dir</display-name>
<description>Directory for Hive Log files.</description>
</property>
<property>
<name>hive_pid_dir</name>
<value>/var/run/hive</value>
<display-name>Hive PID Dir</display-name>
<description>Hive PID Dir.</description>
</property>
<property>
<name>hive_heapsize</name>
<value>512</value>
<description>Hive Java heap size</description>
<display-name>HiveServer2 Heap Size</display-name>
</property>
<property>
<name>hive_metastore_heapsize</name>
<value>1024</value>
<description>Hive Metastore Java heap size</description>
<display-name>Metastore Heap Size</display-name>
</property>
<property>
<name>heap_dump_path</name>
<value>/tmp</value>
<description>Path for heap dump file</description>
<display-name>Heap dump path</display-name>
</property>

<!-- hive-env.sh -->
<property>
<name>content</name>
<display-name>hive-env template</display-name>
<description>This is the freemarker template for hive-env.sh file</description>
<value><![CDATA[
# The heap size of the jvm, and jvm args stared by hive shell script can be controlled via:
if [ "$SERVICE" = "metastore" ]; then
export HADOOP_HEAPSIZE=${hive_metastore_heapsize} # Setting for HiveMetastore
export HADOOP_OPTS="$HADOOP_OPTS -Xloggc:${hive_log_dir}/hivemetastore-gc-%t.log
-XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCCause -XX:+UseGCLogFileRotation
-XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=10M -XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=${hive_log_dir}/hms_heapdump.hprof -Dhive.log.dir=${hive_log_dir}
-Dhive.log.file=hivemetastore.log"
fi
if [ "$SERVICE" = "hiveserver2" ]; then
export HADOOP_HEAPSIZE=${hive_heapsize} # Setting for HiveServer2 and Client
export HADOOP_OPTS="$HADOOP_OPTS -Xloggc:${hive_log_dir}/hiveserver2-gc-%t.log
-XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCCause -XX:+UseGCLogFileRotation
-XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=10M -XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=${hive_log_dir}/hs2_heapdump.hprof -Dhive.log.dir=${hive_log_dir}
-Dhive.log.file=hiveserver2.log"
fi
<#noparse>
export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Xms${HADOOP_HEAPSIZE}m -Xmx${HADOOP_HEAPSIZE}m"
</#noparse>
export HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${heap_dump_path}"
# Larger heap size may be required when running queries over large number of files or partitions.
# By default hive shell scripts use a heap size of 256 (MB). Larger heap size would also be
# appropriate for hive server (hwi etc).
# Set HADOOP_HOME to point to a specific hadoop install directory
HADOOP_HOME=${hadoop_home}
export HIVE_HOME=${hive_home}
# Hive Configuration Directory can be controlled by:
export HIVE_CONF_DIR=${hive_conf_dir}
# Folder containing extra libraries required for hive compilation/execution can be controlled by:
if [ "$HIVE_AUX_JARS_PATH" != "" ]; then
export HIVE_AUX_JARS_PATH=$HIVE_AUX_JARS_PATH
fi
export METASTORE_PORT=${hive_metastore_port}
]]>
</value>
<attrs>
<type>longtext</type>
</attrs>
</property>
</configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<?xml version="1.0"?>
<!--
~ 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.
-->

<configuration>
<property>
<name>content</name>
<display-name>hive-exec-log4j2 template</display-name>
<description>Custom hive-exec-log4j2.properties</description>
<value><![CDATA[
# 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.
status = INFO
name = HiveExecLog4j2
packages = org.apache.hadoop.hive.ql.log
<#noparse>
# list of properties
property.hive.log.level = INFO
property.hive.root.logger = FA
property.hive.query.id = hadoop
property.hive.log.dir = ${sys:java.io.tmpdir}/${sys:user.name}
property.hive.log.file = ${sys:hive.query.id}.log
# list of all appenders
appenders = console, FA
# console appender
appender.console.type = Console
appender.console.name = console
appender.console.target = SYSTEM_ERR
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = %d{ISO8601} %5p [%t] %c{2}: %m%n
# simple file appender
appender.FA.type = RandomAccessFile
appender.FA.name = FA
appender.FA.fileName = ${sys:hive.log.dir}/${sys:hive.log.file}
appender.FA.layout.type = PatternLayout
appender.FA.layout.pattern = %d{ISO8601} %5p [%t] %c{2}: %m%n
# list of all loggers
loggers = NIOServerCnxn, ClientCnxnSocketNIO, DataNucleus, Datastore, JPOX
logger.NIOServerCnxn.name = org.apache.zookeeper.server.NIOServerCnxn
logger.NIOServerCnxn.level = WARN
logger.ClientCnxnSocketNIO.name = org.apache.zookeeper.ClientCnxnSocketNIO
logger.ClientCnxnSocketNIO.level = WARN
logger.DataNucleus.name = DataNucleus
logger.DataNucleus.level = ERROR
logger.Datastore.name = Datastore
logger.Datastore.level = ERROR
logger.JPOX.name = JPOX
logger.JPOX.level = ERROR
# root logger
rootLogger.level = ${sys:hive.log.level}
rootLogger.appenderRefs = root
rootLogger.appenderRef.root.ref = ${sys:hive.root.logger}
</#noparse>
]]>
</value>
<attrs>
<type>longtext</type>
</attrs>
</property>
</configuration>
Loading

0 comments on commit 47b9aeb

Please sign in to comment.