[PDF] Apache Hive Guide Cloudera the Cloudera logo





Previous PDF Next PDF



Apache HTTP Server Documentation Version 2.4

Tir 21 1394 AP About The PDF Documentation. Licensed to the Apache Software Foundation ... Apache httpd Tutorial: Introduction to Server Side Includes .



Apache HTTP Server Documentation Version 2.0

Mehr 14 1384 AP About The PDF Documentation ... This version of the Apache HTTP Server Documentation is converted from XML source files to LATEX using XSLT.



Apache Web Server Complete Guide

document. The Web server - Apache - Complete Guide was one of the many topics covered in a series of books that I started writing on Linux 



Apache HTTP Server Documentation Version 2.5

Khordad 12 1395 AP About The PDF Documentation. Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NO-.



Apache Kafka Guide

Mehr 8 1400 AP The information in this document is subject to change without notice. Cloudera shall not be liable for any damages resulting from technical ...



Apache Kafka Guide

Mordad 11 1400 AP The information in this document is subject to change without notice. Cloudera shall not be liable for any damages resulting from technical ...



Apache Spark Guide

Mehr 8 1400 AP Cloudera



Apache Hive Guide

Cloudera the Cloudera logo



Apache HBase ™ Reference Guide

7 items DisabledRegionSplitPolicy blocks manual region splitting. Default org.apache.hadoop.hbase.regionserver.SteppingSplitPolicy hbase.regionserver.



Amazon Managed Workflows for Apache Airflow - User Guide

8 days ago Accessing the VPC endpoint for your Apache Airflow Web server ... Upload Apache Airflow's tutorial DAG for the latest Amazon MWAA supported.

hive.zookeeper.client.port core-site.xml hive.metastore.uris javax.jdo.option.ConnectionURL stdout stderr operation_logs_dir /tmp [mysqld] datadir=/var/lib/mysql max_connections=8192 [Service]

LimitNOFILE=24000

hive.server2.async.exec.threads 8192 hive.server2.async.exec.wait.queue.size 8192 hive.server2.thrift.max.worker.threads 8192 datanucleus.connectionPool.maxPoolSize sudo yum install mysql-server sudo zypper install mysql sudo zypper install libmysqlclient_r17 sudo apt-get install mysql-server mysql sudo service mysqld start sudo service mysql start root $ sudo /usr/bin/mysql_secure_installation

Enter current password for root (enter for none):

OK, successfully used password, moving on...

Set root password? [Y/n] y

New password:

Re-enter new password:

Remove anonymous users? [Y/n] Y

Disallow root login remotely? [Y/n] N

Remove test database and access to it [Y/n] Y

Reload privilege tables now? [Y/n] Y

All done!

$ sudo /sbin/chkconfig mysqld on

sudo /sbin/chkconfig --list mysqldmysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off

sudo chkconfig --add mysql sudo chkconfig mysql on metastorehost 'metastorehost'CREATE USER'localhost' jdbc:mysql://localhost/metastore hive-schema-n.n.n.mysql.sql hive-schema-n.n.n.mysql.sql $ mysql -u root -p

Enter password:

mysql> CREATE DATABASE metastore; mysql> USE metastore; mysql> SOURCE /usr/lib/hive/scripts/metastore/upgrade/mysql/hive-schema-n.n.n.mysql.sql; hive.metastore.schema.verification /usr/lib/hive/conf/hive-site.xml mysql> CREATE USER 'hive'@'metastorehost' IDENTIFIED BY 'mypassword'; mysql> REVOKE ALL PRIVILEGES, GRANT OPTION FROM 'hive'@'metastorehost'; mysql> GRANT ALL PRIVILEGES ON metastore.* TO 'hive'@'metastorehost'; mysql> FLUSH PRIVILEGES; mysql> quit; hive-site.xml /usr/lib/hive/conf/hive-site.xml hive-site.xml hive.metastore.uris myhosthivemypassword hive.metastore.local hive.metastore.uris the URL of the MySQL database com.mysql.jdbc.Driver hive mypassword false datanucleus.fixedDatastore true SchemaTable hive.metastore.uris thrift://:9083 IP address (or fully-qualified domain name) and port of the metastore host true sudo yum install postgresql-server sudo zypper install postgresql-server sudo apt-get install postgresql sudo service postgresql initdb postgresql.conflisten_addresses* standard_conforming_stringsoff $ sudo cat /var/lib/pgsql/data/postgresql.conf | grep -e listen -e standard_conforming_strings listen_addresses = '*' standard_conforming_strings = off $ sudo cat /var/lib/pgsql/data/postgresql.conf | grep -e listen -e standard_conforming_strings listen_addresses = '*' standard_conforming_strings = off $ cat /etc/postgresql/9.1/main/postgresql.conf | grep -e listen -e standard_conforming_strings listen_addresses = '*' standard_conforming_strings = off pg_hba.conf pg_hba.con host md5 host all all 0.0.0.0 0.0.0.0 md5 sudo service postgresql start chkconfig chkconfig postgresql on chkconfig chkconfig --list postgresql postgresql-jdbc /usr/lib/hive/lib/ sudo yum install postgresql-jdbc ln -s /usr/share/java/postgresql-jdbc.jar /usr/lib/hive/lib/postgresql-jdbc.jar postgresql-jdbc /usr/lib/hive/lib/ $ sudo zypper install postgresql-jdbc $ ln -s /usr/share/java/postgresql-jdbc.jar /usr/lib/hive/lib/postgresql-jdbc.jar libpostgresql-jdbc-java /usr/lib/hive/lib/ sudo apt-get install libpostgresql-jdbc-java ln -s /usr/share/java/postgresql-jdbc4.jar /usr/lib/hive/lib/postgresql-jdbc4.jar $ sudo -u postgres psql postgres=# CREATE USER hiveuser WITH PASSWORD 'mypassword'; postgres=# CREATE DATABASE metastore; postgres=# \c metastore;

You are now connected to database 'metastore'.

postgres=# \i SET SET hiveuser sudo -u postgres psql bash# sudo -u postgres psql metastore=# \c metastore metastore=# \pset tuples_only on metastore=# \o /tmp/grant-privs metastore=# SELECT 'GRANT SELECT,INSERT,UPDATE,DELETE ON "' || schemaname || '". "' ||tablename ||'" TO hiveuser ;' metastore-# FROM pg_tables metastore-# WHERE tableowner = CURRENT_USER and schemaname = 'public'; metastore=# \o metastore=# \pset tuples_only off metastore=# \i /tmp/grant-privs psql -h myhost -U hiveuser -d metastore metastore=# hive-site.xml /usr/lib/hive/conf/hive-site.xml hive-site.xml hive.metastore.uris myhosthivemypassword hive.metastore.local hive.metastore.uris org.postgresql.Driver hiveuser mypassword false hive.metastore.uris thrift://:9083 IP address (or fully-qualified domain name) and port of the metastore host true hive -e "show tables;" /usr/lib/hive/lib/ojdbc6.jar ojdbc6.jarojdbc8.jar sudo mv ojdbc.jar /usr/lib/hive/lib/ $ sqlplus "sys as sysdba" SQL> create user hiveuser identified by mypassword;

SQL> grant connect to hiveuser;

SQL> grant all privileges to hiveuser;

hiveuser $ sqlplus hiveuser SQL> @/usr/lib/hive/scripts/metastore/upgrade/oracle/hive-schema-n.n.n.oracle.sql hiveuser $ sqlplus "sys as sysdba"

SQL> revoke all privileges from hiveuser;

SQL> BEGIN

2 FOR R IN (SELECT owner, table_name FROM all_tables WHERE owner='HIVEUSER') LOOP

3 EXECUTE IMMEDIATE 'grant SELECT,INSERT,UPDATE,DELETE on

'||R.owner||'.'||R.table_name||' to hiveuser';

4 END LOOP;

5 END;

6 7 / hive-site.xml /usr/lib/hive/conf/hive-site.xml hive-site.xml hive.metastore.uris myhosthiveusermypassword oracle.jdbc.OracleDriver hiveuser mypassword false datanucleus.fixedDatastore true hive.metastore.uris thrift://:9083 IP address (or fully-qualified domain name) and port of the metastore host true jdbc:mysql://:/ ?key=value jdbc:postgresql://:/ ?key=value jdbc:oracle:thin:@//:/ jdbc:oracle:thin:@:: jdbc:oracle:thin:@ stdout stderr operation_logs_dir /tmp hive.zookeeper.client.port

ClientPorthive.zookeeper.client.port

/etc/hive/conf/hive-site.xml hive.zookeeper.client.portClientPort hive.zookeeper.client.port hive.zookeeper.client.port 2222

The port at which the clients will connect.

org.apache.hive.jdbc.HiveDriver hive.server2.authentication hive-site.xml hive.server2.thrift.port hive-site.xml hive.server2.thrift.port 10001 TCP port number to listen on, default 10000 sudo service hive-metastore start /user/hive/warehouse/user/hive /user/hive/warehouse /tmp 1777
hive.metastore.execute.setugitrue sudo service hive-server2 start sudo service hive-server2 stop beelineSHOW TABLES $ /usr/lib/hive/bin/beeline beeline> !connect jdbc:hive2://localhost:10000 username password org.apache.hive.jdbc.HiveDriver

0: jdbc:hive2://localhost:10000> SHOW TABLES;

show tables; | tab_name |

No rows selected (0.238 seconds)

0: jdbc:hive2://localhost:10000>

hive.server2.transport.mode=http beeline localhost10000 $ beeline beeline> !connect jdbc:hive2://localhost:10000 username password org.apache.hive.jdbc.HiveDriver

0: jdbc:hive2://localhost:10000>

$ beeline beeline> !connect hive grant 'hive', 'RWXC' hbase schematool schematool Caused by: MetaException(message:Version information not found in metastore. ) at org.apache.hadoop.hive.metastore.ObjectStore.checkSchema(ObjectStore.java:5638) schematool schematool schematool schematool $ schematool -help usage: schemaTool -dbType Metastore database type -dryRun List SQL scripts (no execute) -help Print this message -info Show config and schema details -initSchema Schema initialization -initSchemaTo Schema initialization to a version -passWord Override config file password -upgradeSchema Schema upgrade -upgradeSchemaFrom Schema upgrade from a version -userName Override config file user name -validate Validate the database -verbose Only print SQL statements dbType derby|mysql|postgres|oracle schematool/etc/hive/conf/hive-site.xml hive-site.xml hive1 com.mysql.jdbc.Driver schematool schematool schematool /usr/lib/hive/bin/schematool schematool initSchema $ schematool -dbType mysql -initSchema -passWord -userName

Metastore connection URL:

Metastore Connection Driver : com.mysql.jdbc.Driver

Metastore connection User:

Starting metastore schema initialization to Initialization script hive-schema-.mysql.sql

Initialization script completed

schemaTool completed info $ schematool -dbType mysql -info -passWord -userName

Metastore connection URL:

Metastore Connection Driver : com.mysql.jdbc.Driver

Metastore connection User:

Hive distribution version:

Required schema version:

Metastore schema version:

schemaTool completed $ schematool -dbType mysql -info -passWord -userName

Metastore connection URL:

Metastore Connection Driver : com.mysql.jdbc.Driver

Metastore connection User:

Hive distribution version:

Required schema version:

org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version,

Cause:

*** schemaTool failed *** -upgradeSchemaFrom -upgradeSchemaFrom $ schematool -dbType mysql -passWord -upgradeSchemaFrom

0.13.1 -userName

Metastore connection URL:

Metastore Connection Driver : com.mysql.jdbc.Driver

Metastore connection User:

Starting upgrade metastore schema from version 0.13.1 to Upgrade script upgrade-0.13.1-to-.mysql.sql Completed pre-0-upgrade-0.13.1-to-.mysql.sql Completed upgrade-0.13.1-to-.mysql.sql schemaTool completed -validate schematool $ schematool -dbType mysql -passWord -userName -validate

Starting metastore validation

Validating schema version

Succeeded in schema version validation.

[SUCCESS]

Validating sequence number for SEQUENCE_TABLE

Succeeded in sequence number validation for SEQUENCE_TABLE [SUCCESS]

Validating metastore schema tables

Succeeded in schema table validation.

[SUCCESS]

Validating database/table/partition locations

Succeeded in database/table/partition location validation [SUCCESS]

Validating columns for incorrect NULL values

Succeeded in column validation for incorrect NULL values [SUCCESS]

Done with metastore validation: [SUCCESS]

schemaTool completed dryRun $ schematool -dbType mysql -upgradeSchemaFrom 0.10.0 -dryRun -passWord -userName

Metastore connection URL:

Metastore Connection Driver : com.mysql.jdbc.Driver

Metastore connection User:

Starting upgrade metastore schema from version 0.10.0 to

Upgrade script upgrade-0.10.0-to-0.11.0.mysql.sql

Upgrade script upgrade-0.11.0-to-0.12.0.mysql.sql

Upgrade script upgrade-0.12.0-to-0.13.0.mysql.sql

Upgrade script upgrade-0.13.0-to-0.14.0.mysql.sql

Upgrade script upgrade-0.14.0-to-1.1.0.mysql.sql

Upgrade script upgrade-1.1.0-to-.mysql.sql schemaTool completed

HADOOP_MAPRED_HOME

export HADOOP_MAPRED_HOME=/usr/lib/hadoop-mapreduce

HADOOP_MAPRED_HOME

export HADOOP_MAPRED_HOME=/usr/lib/hadoop-0.20-mapreduce hive-site.xml export HIVE_CONF_DIR=/var/run/cloudera-scm-agent/process/4595-hive-HIVEMETASTORE export HADOOP_CREDSTORE_PASSWORD=abcdefg1234... export AUX_CLASSPATH=/opt/cloudera/parcels/CDH-5.13.3-1.cdh5.13.3.p0.2.... hive --service metatool -listFSRoot

Listing FS Roots..

/etc/hive/conf/ jdbc:mysql://[ENTER BACKEND DATABASE HOSTNAME]:[ENTER PORT]/[ENTER HIVE BACKEND DATABASE USERNAME]?useUnicode=true&characterEncoding=UTF-8 [ENTER BACKEND DATABASE USERNAME] [ENTER BACKEND DATABASE PASSWORD]

Hive Metastore Database

set hive.execution.engine=engine mrsparkmr set hive.execution.engine=spark; set hive.execution.engine; serialization.null.format

INSERTINSERT OVERWRITECREATE TABLE AS SELECT

/usr/lib/parquet /opt/cloudera/parcels/CDH/lib/parquet

PARQUET_TABLE

CREATE TABLE parquet_table_name (x INT, y STRING) STORED AS PARQUET; dfs.block.sizehdfs-site.xml CREATE EXTERNAL TABLE parquet_table_name (x INT, y STRING)

LOCATION '/test-warehouse/tinytable'

STORED AS PARQUET;

INSERTSELECT

parquet.compression

SET parquet.compression=GZIP;

INSERT OVERWRITE TABLE tinytable SELECT * FROM texttable;

UNCOMPRESSEDGZIPSNAPPY

20MB SET

SET hive.auto.convert.join=true;

SET hive.auto.convert.join.noconditionaltask.size=; hive.spark.dynamic.partition.pruningtrue falsequotesdbs_dbs10.pdfusesText_16
[PDF] apache dontlog

[PDF] apache download

[PDF] apache dump http requests

[PDF] apache enable https

[PDF] apache errors

[PDF] apache file download configuration

[PDF] apache file download example

[PDF] apache file download forbidden

[PDF] apache file download limit

[PDF] apache file download permission

[PDF] apache file download size limit

[PDF] apache file download timeout

[PDF] apache hadoop 2.7 documentation

[PDF] apache hadoop api documentation

[PDF] apache hadoop documentation download