Hive两种模式安装
Hive两种模式安装 数据仓库工具,可以把Hadoop下的原始结构化数据变成Hive中的表。 支持一种与SQL几乎完全相同的语言HiveQL,除了不支持更新、索引和事务。 可以看成是从SQL到Map-Reduce的映射器。 提供shell、JDBC/ODBC、thrift、Web等接口。 一、内嵌模式
Hive两种模式安装
数据仓库工具,可以把Hadoop下的原始结构化数据变成Hive中的表。
支持一种与SQL几乎完全相同的语言HiveQL,除了不支持更新、索引和事务。
可以看成是从SQL到Map-Reduce的映射器。
提供shell、JDBC/ODBC、thrift、Web等接口。
一、内嵌模式安装
这样安装的元数据保持在内嵌的Derby数据库中,只能允许一个会话连接,只适用于简单的测试。
1、解压Hive
[coder@h1 ~]$ tar -zxvf hive-0.10.0.tar.gz
2、配置环境变量/etc/profile
加入Hive的安装目录,并把Hive的bin目录配置到PATH
HIVE_HOME=/home/coder/hive-0.10.0
PATH=$HADOOP_INSTALL/bin:$PIG_INSTALL/bin:$JAVA_HOME/bin:$HIVE_HOME/bin:$PATH
执行 source /etc/profile命令,使得配置生效
3、新建Hive所需目录
在HDFS上建立/tmp和/user/hive/warehouse目录,并赋予组用户写权限。这是Hive默认的数据文件存放目录,可以在hive-site.xml文件中配置。
[coder@h1 hadoop-0.20.2]$ bin/hadoop fs -mkdir /tmp
[coder@h1 hadoop-0.20.2]$ bin/hadoop fs -mkdir /user/hive/warehouse
[coder@h1 hadoop-0.20.2]$ bin/hadoop fs -chmod g+w /tmp
[coder@h1 hadoop-0.20.2]$ bin/hadoop fs -chmod g+w /user/hive/warehouse
4、输入hive命令,出现类似下面的内容,说明安装成功。
[coder@h1 hadoop-0.20.2]$ hive
Logging initialized using configuration in jar:file:/home/coder/hive-0.10.0/lib/hive-common-0.10.0.jar!/hive-log4j.properties
Hive history file=/tmp/coder/hive_job_log_coder_201305072118_1272944282.txt
hive>
hive> show tables;
OK
Time taken: 24.479 seconds
hive> exit;
二、独立模式安装
支持多用户会话,需要一个独立的元数据库,常用的是使用MySQL作为元数据库。
1、启动MySQL
[root@h1 ~]# service mysqld start
Starting mysqld: [ OK ]
[root@h1 ~]#
2、为Hive建立相应的MySQL账号
[root@h1 ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.66 Source distribution
Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> create user 'hive' identified by '123456';
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON *.* TO 'hive'@'localhost' IDENTIFIED BY '123456' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
[root@h1 ~]#
然后从客户端用hive账号登陆MySQL
3、建立Hive专用元数据库
mysql>create database hive;
4、配置Hive
在Hive安装目录的conf目录下,将hive-default.xml.template复制一份命名为:hive-site.xml
修改以下内容,配置上mysql数据连接、驱动、用户名和密码
5、把mysql的驱动包拷贝到Hive安装路径下的lib目录
6、进入Hive,没报错说明独立模式安装成功
[coder@h1 ~]$ hive
Logging initialized using configuration in jar:file:/home/coder/hive-0.10.0/lib/hive-common-0.10.0.jar!/hive-log4j.properties
Hive history file=/tmp/coder/hive_job_log_coder_201305072212_717503278.txt
hive> show tables;
OK
Time taken: 24.783 seconds
hive> exit;

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



DDREASE is a tool for recovering data from file or block devices such as hard drives, SSDs, RAM disks, CDs, DVDs and USB storage devices. It copies data from one block device to another, leaving corrupted data blocks behind and moving only good data blocks. ddreasue is a powerful recovery tool that is fully automated as it does not require any interference during recovery operations. Additionally, thanks to the ddasue map file, it can be stopped and resumed at any time. Other key features of DDREASE are as follows: It does not overwrite recovered data but fills the gaps in case of iterative recovery. However, it can be truncated if the tool is instructed to do so explicitly. Recover data from multiple files or blocks to a single

0.What does this article do? We propose DepthFM: a versatile and fast state-of-the-art generative monocular depth estimation model. In addition to traditional depth estimation tasks, DepthFM also demonstrates state-of-the-art capabilities in downstream tasks such as depth inpainting. DepthFM is efficient and can synthesize depth maps within a few inference steps. Let’s read about this work together ~ 1. Paper information title: DepthFM: FastMonocularDepthEstimationwithFlowMatching Author: MingGui, JohannesS.Fischer, UlrichPrestel, PingchuanMa, Dmytr

The performance of JAX, promoted by Google, has surpassed that of Pytorch and TensorFlow in recent benchmark tests, ranking first in 7 indicators. And the test was not done on the TPU with the best JAX performance. Although among developers, Pytorch is still more popular than Tensorflow. But in the future, perhaps more large models will be trained and run based on the JAX platform. Models Recently, the Keras team benchmarked three backends (TensorFlow, JAX, PyTorch) with the native PyTorch implementation and Keras2 with TensorFlow. First, they select a set of mainstream

Facing lag, slow mobile data connection on iPhone? Typically, the strength of cellular internet on your phone depends on several factors such as region, cellular network type, roaming type, etc. There are some things you can do to get a faster, more reliable cellular Internet connection. Fix 1 – Force Restart iPhone Sometimes, force restarting your device just resets a lot of things, including the cellular connection. Step 1 – Just press the volume up key once and release. Next, press the Volume Down key and release it again. Step 2 – The next part of the process is to hold the button on the right side. Let the iPhone finish restarting. Enable cellular data and check network speed. Check again Fix 2 – Change data mode While 5G offers better network speeds, it works better when the signal is weaker

Installing Android applications on Linux has always been a concern for many users. Especially for Linux users who like to use Android applications, it is very important to master how to install Android applications on Linux systems. Although running Android applications directly on Linux is not as simple as on the Android platform, by using emulators or third-party tools, we can still happily enjoy Android applications on Linux. The following will introduce how to install Android applications on Linux systems.

I cry to death. The world is madly building big models. The data on the Internet is not enough. It is not enough at all. The training model looks like "The Hunger Games", and AI researchers around the world are worrying about how to feed these data voracious eaters. This problem is particularly prominent in multi-modal tasks. At a time when nothing could be done, a start-up team from the Department of Renmin University of China used its own new model to become the first in China to make "model-generated data feed itself" a reality. Moreover, it is a two-pronged approach on the understanding side and the generation side. Both sides can generate high-quality, multi-modal new data and provide data feedback to the model itself. What is a model? Awaker 1.0, a large multi-modal model that just appeared on the Zhongguancun Forum. Who is the team? Sophon engine. Founded by Gao Yizhao, a doctoral student at Renmin University’s Hillhouse School of Artificial Intelligence.

The latest video of Tesla's robot Optimus is released, and it can already work in the factory. At normal speed, it sorts batteries (Tesla's 4680 batteries) like this: The official also released what it looks like at 20x speed - on a small "workstation", picking and picking and picking: This time it is released One of the highlights of the video is that Optimus completes this work in the factory, completely autonomously, without human intervention throughout the process. And from the perspective of Optimus, it can also pick up and place the crooked battery, focusing on automatic error correction: Regarding Optimus's hand, NVIDIA scientist Jim Fan gave a high evaluation: Optimus's hand is the world's five-fingered robot. One of the most dexterous. Its hands are not only tactile

If you have used Docker, you must understand daemons, containers, and their functions. A daemon is a service that runs in the background when a container is already in use in any system. Podman is a free management tool for managing and creating containers without relying on any daemon such as Docker. Therefore, it has advantages in managing containers without the need for long-term backend services. Additionally, Podman does not require root-level permissions to be used. This guide discusses in detail how to install Podman on Ubuntu24. To update the system, we first need to update the system and open the Terminal shell of Ubuntu24. During both installation and upgrade processes, we need to use the command line. a simple
