Member since
03-22-2019
46
Posts
8
Kudos Received
3
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
5162 | 07-20-2016 07:28 PM | |
1042 | 07-16-2016 07:19 PM | |
1004 | 06-30-2016 04:54 AM |
12-06-2018
09:39 PM
Introduction Performance of a cluster
running on Hadoop can be impacted by the OS partitioning. This document is
intended to understand the best practices to setup the “/var” folder/partition
with optimum size. Lets
try to approach this problem by asking some important questions.
What is “/var” used for?
How can the “/var” folder run out of disk
space?
Common issue to expect on a Hadoop cluster if
“/var” is out of disk space.
How is the current setup of “/var” in my
cluster ? Question 1 - What is
/var used for? From
OS perspective, “/var” is commonly used for constantly changing files i.e.
variable. The short form of which is “var”. Example
of such files could be the log file, mail, transient file, the printer spool,
temporary files, cached data, etc. For
example - “/var/tmp” holds the temporary files between system reboots. On any node (Hadoop or
non-Hadoop), /var directory holds content for a number of applications. It also
is used to store downloaded update packages on a temporary basis. The PackageKit update software
downloads updated packages to /var/cache/yum/ by default. /var/ partition
should be large enough to download package updates. An example of application which
uses /var is MySql, which by default uses “/var/lib/mysql” as the
MySql directory location. Question 2 - How can
/var folder run out of disk space? /var is much more susceptible to filling up - by accident
or by attack. Some of the directories which
can be affected by this is “/var/log”, “/var/tmp”, “/var/crash” etc. If there is a serious OS issue,
the logging can increase tremendously. If the disk space is set too low, like
10GB, this excessive logging can fill in the “disk” space for /var. Question 3 - Common
issue to expect on a Hadoop cluster if “/var” is out of disk space. /var
has been seen to be easily filled by a (possibly misbehaved) application, and
that if it wasn't separate from /, the filling of / could cause a kernel panic. “/var” folder has some very
important file/folders locations which are used by default by many kernel and
OS applications. For example –
“/var/run” is used for all the running
process to keep their PIDs and system information. If “/var” is full due
to low disk space configuration, then the application will fail to run.
“/var/lock” is the folder which contains
locks of the running applications for the files/devices they have locked
on. If the disk space runs out the lock is not possible and the
existing/new applications will fail.
“/var/lib” holds all the dynamic data
libraries and files for the applications. If there is no device space
left, the application will fail to work. “/var” is very important from
Hadoop perspective to keep all the service running. Running out of Disk space
on “/var” can cause Hadoop and dependent services to fail to run on that node. Question 4 - How is the
setup of “/var” in the clusters on my cluster?
Are the “Hadoop” separated from the “/var” folder location.
Are the huge sized logs or huge number of OS
logs still located on the “/var” location, example - “/var/log/messages”
and “/var/crash”.
If the Kdump is configured to capture the
crashdump logs, then risk increases, since these logs are usually huge
file sizes - sometime 100 GB or more.
The default configuration of the kdump logs
use the directory location “/var/crash”.
These days, the size of Physical Memory can
easily be 500GB ot 1TB, which would spill the kdump logs of huge size (
*note* - kdump logs can be compressed) The size of “/var” therefore plays important role
if /var/crash can be too low for saving the “crashdump” logs. If there is a OS crash (Kernel
Panic etc.) then the crashdump will never be captured complete, since the size
of “/var” is too low i.e. 10 GB or 50GB. Without the complete crashdump logs,
there can never be a complete analysis of the cause of Kernel Crash. Answer - Recommendations
on the optimum setup of “/var”. Increase the size of “/var” to 50GB at least
for all the nodes and have a uniform size across the clusters. Change the location of log file for the
“kdump”. Existing log file location is “/var/crash”. Kdump can be
configured to put the logs on any other local disk with a size of
around 300 - 500GB or as a best measure it can be dumped over
network to a remote disk. /var should by default should be separated from
the root partition. Depending on the requirement, the “/var/log” and
“/var/log/audit” can also be created as a separate partitions. /var should
be mounted on a LVM disk to allow increasing the sizes with ease if
required. All the
Hadoop Services logs should be separated from /var. The Hadoop Logs ideally
should be placed in a separate Disk. This disk should be used only for Logs
(from Hadoop and Dependent Applications Like MySql etc) and not for anything
else. This Log location should never be shared with the core Hadoop Services
like HDFS,YARN,ZOOKEEPER directory locations One way to achieve this could
be by creating a symlink of "/var/<hadoop_logs> to separate LVM
disks.
... View more
Labels:
08-08-2018
08:36 PM
@Victor
L
This can be done via Ambari UI. For each component (example HBase) there are configuration options for log file size, number, rotation etc. This is done via Log4j. For example for HBase, the default is: hbase.log.maxfilesize=256MB
hbase.log.maxbackupindex=20 HBase uses, the DRFA "org.apache.log4j.DailyRollingFileAppender". If you want the log rotation to happen based on filesize, then you should consider using - "org.apache.log4j.RollingFileAppender". You can tune the Log4j as per your exact requirement. Hope this helps. Regards Ravi
... View more
08-03-2018
06:34 AM
What do you see in the HBase Master logs during the time of these logs in RegionServer?
... View more
08-03-2018
06:33 AM
@Prashant Verma Seems the Split Task is failing. 2018-08-0310:49:47,695 WARN [RS_LOG_REPLAY_OPS-CHMCISPRBDDN01:16020-0]
regionserver.SplitLogWorker: log splitting of
WALs/chmcisprbddn08.chm.intra,16020,1503542010122-splitting/chmcisprbddn08.chm.intra%2C16020%2C1503542010122.default.1503542017092
failed, returning error java.io.IOException:Cannotget log reader Also there seems to be issue with the Class. Caused by: java.lang.UnsupportedOperationException:Unable to find org.apache.hadoop.hbase.regionserver.wal.WALCellCodec,org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.regionserver.wal.WALCellCodec,org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec RegionServer seems to be unable to find the class. What is the HDP, Ambari and HBase version? Share the rpm -qa if that is okay. Also, can you check the content of the WAL : # hdfs dfs -cat /apps/hbase/data/WALs/chmcisprbddn08.chm.intra,16020,1503542010122-splitting/chmcisprbddn08.chm.intra%2C16020%2C1503542010122.default.1503542017092
... View more
08-03-2018
04:01 AM
/usr/hdp/current/hive/bin/schematool -info -dbType mysql -userName hive -passWord <password> -verbose Try following command and share the output.
... View more
08-03-2018
03:34 AM
@Harry Li Try following: create user 'hive'@'msl-dpe-perf74.msl.lab' identified by 'hive';
grant all privileges on *.* to 'hive'@'msl-dpe-perf74.msl.lab';
SHOW GRANTS FOR 'hive'@'msl-dpe-perf74.msl.lab';
flush privileges;
commit;
quit; Set the password of 'hive'@'msl-dpe-perf74.msl.lab' same as what you have given via Ambari. Other thing I could see from the error you mentioned in the beginning on this post was : org.apache.hadoop.hive.metastore.HiveMetaException:Failed to get schema version Can you check if following works for you: /usr/hdp/current/hive/bin/schematool -initSchema -dbType mysql
... View more
08-01-2018
07:15 PM
@Harry Li Can you try to login mysql as "hive" user: mysql -u hive -passWord <Password> -h <FQDN>
... View more
08-01-2018
07:11 PM
@Daniel Müller Are these inserts into hive, Single Inserts or Batch Inserts? If Single Inserts then it will take time for the 1000 inserts to complete. If these are batch inserts then we need to take a look into the HS2 Logs to idenitfy where is the query spending most of its time.
... View more
01-15-2018
12:49 PM
@n c I see that you have mentioned : " We have a hive database in one cluster. I want to have a copy of that database in a different cluster." One way to do this is to take a back of the hive database in MySql. 1. Stop the Hive Services. This is done to make sure that there is no new metadata update to the MetaStore. 2. On the node running the MySql, do following mysqldump hive > /backup_folder/hive_backup.sql 3. Start the services of Hive Again. On the other node, where you want to have the MySql backup to be restored, you need to install and configure MySql. Refer following document ( this is for HDP 2.5.6): https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.5.6/bk_command-line-installation/content/meet-min-system-requirements.html#metastore-db-requirements-getting-started Once MySql is setup, you can create a database in MySql called "hive" : mysql> create database hive; Now dump the DB which was backed up earlier: mysql hive < /backup_folder/hive_backup.sql You can use this Node to run another instance of Hive services, which can be effective as HA or simply use the MySql on the node to be as a Backup location. Make a regular backup by mysqldump and restore it on the other node. The other way of achieving your requirement could be to setup a HA for MySql database.
... View more
09-21-2017
03:36 PM
The HiveServer2 and HiveMetaStore can be configured for captured the GC logs based on Timestamp. This is useful in a production cluster, where having a timestamp on the log file add clarity and also avoids overwritting. Navigate as below in Ambari: Ambari UI > Hive > Configs > Advanced hive-env > hive-env template Add following : if [ "$SERVICE" = "metastore" ]; then
export HADOOP_HEAPSIZE={{hive_metastore_heapsize}} # Setting for HiveMetastore
else
export HADOOP_HEAPSIZE={{hive_heapsize}} # Setting for HiveServer2 and Client
fi
export HADOOP_CLIENT_OPTS="-Xmx${HADOOP_HEAPSIZE}m -Xloggc:/var/log/hive/gc.log-$SERVICE-`date +'%Y%m%d%H%M'`
-XX:ErrorFile=/var/log/hive/hive-metastore-error.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps $HADOOP_CLIENT_OPTS"
if [ "$SERVICE" = "hiveserver2" ]; then
export HADOOP_CLIENT_OPTS="-Xmx${HADOOP_HEAPSIZE}m -Xloggc:/var/log/hive/gc.log-$SERVICE-`date +'%Y%m%d%H%M'`
-XX:ErrorFile=/var/log/hive/hive-server2-error.log-`date +'%Y%m%d%H%M'` -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCDateStamps $HADOOP_CLIENT_OPTS"
fi
... View more
Labels: