Technology Sharing

Start the Hive metadata service

2024-07-12

한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina

nohup hive --service metastore >> metastore.log 2>&1 &

This command is used to run Hive's metadata storage service (metastore) in the background. Let me explain step by step:

1. nohup: is a Unix/Linux command used toRun a command in the background, while ignoring all hangup (SIGHUP) signals. This means that the command will continue to run even if the user exits the terminal or disconnects from the server.

2. hive --service metastore: This part of the command tells the system to start the Hive metadata storage service. Hive is a data warehouse tool built on Hadoop for querying and analyzing large-scale data sets.

3. >> metastore.log 2>&1: This part isRedirectOutput command. This means appending the command's standard output (stdout) to the metastore.log file and redirecting the standard error output (stderr) to the standard output, that is, appending it to the metastore.log file.

4. &: Adding an & symbol at the end of a command means that the command will be executed in the background without blocking the current terminal, and you can continue to enter other commands.

In summary, this command starts the Hive metadata storage service in the background and appends all output (including standard output and standard error) to the metastore.log file.