Member since
08-16-2016
35
Posts
8
Kudos Received
6
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
11608 | 09-26-2016 06:08 AM | |
3190 | 09-26-2016 05:55 AM | |
11637 | 09-21-2016 01:44 PM | |
4270 | 09-06-2016 05:26 AM | |
28144 | 09-02-2016 10:51 AM |
10-05-2016
01:12 PM
Could you please post an update so we can determine if there is a regression or not? Thanks
... View more
09-27-2016
07:13 AM
Hey, First you want to ensure that variable substitution is not disabled in your hive environment. So check the value of "hive.variable.substitute" property in your configuration. A few examples are provided in the documentation wiki below. https://cwiki.apache.org/confluence/display/Hive/LanguageManual+VariableSubstitution There are multiple namespaces in hive (system, hiveconf, env etc). env looks at the environment variables. I think you want to use something other than hiveconf (because it meant for propertiesi n hive-site.xml file) Please find examples below and let me know if you still need help. Thanks
... View more
09-26-2016
06:10 AM
replied to the other thread regarding the Qs you posted. Hope this helps. Lets move this conversation to the other thread. Please accept the solution to close this thread. Thanks
... View more
09-26-2016
06:08 AM
1 Kudo
There are multiple ways to load data into your hive table. 1) Local file using "load data local inpath". Please be aware that if you are running this from beeline, this path actually refers to the local file on the HiveServer2 node because HS2 is the service actually executing this command not beeline. 2) Load from HDFS path using "load data inpath". Notice that there is no "LOCAL" keyword in the command. This indicates that this is a HDFS path. 3) Load from another hive table, like insert into table A select * from B where B.col1 > 100; 4) Or you could add a file to the HDFS directory for a hive table, and it will pick up. create table A (b int) location '/tmp/tableA'; you can add files to HDFS path '/tmp/tableA' directory and hive will see this data for table A. Please accept this solution if I have answered your questions on this topic.
... View more
09-26-2016
05:55 AM
Is this issue specific to CDH5.9? What is he behavior on CDH5.8. AFAIK, this is the expected behavior. The HoS application on yarn keeps running even after the query result is running. This application on yarn is treated as a container to run future queries. Starting a new container is an expensive operation. Having them warmed up speeds up the execution of future queries. You should observe that the next queries are noticeably faster. Please provide us additional info on the behavior in CDH5.8, so we can further assist you. Thanks
... View more
09-21-2016
01:47 PM
Hey, I just posted a reply to the other thread you created.
... View more
09-21-2016
01:44 PM
2 Kudos
I think the problem is that you havent defined what the ROW FORMAT is for your hive table. hive needs to understand how to separate rows in the inputfile (think the default is '\n') and how to separate columns from each row (I am not certain on what the default is but guessing that it might be COMMA) CREATE TABLE test(name STRING, value STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'; cat test.txt name1,value1, name2,value2, name3,value3 then load the file above LOAD DATA LOCAL INPATH '/tmp/test.txt' INTO TABLE test; select * from test; this should work. If you can provide the content of your file, I can give you a more specific answer. Hope this helps
... View more
09-06-2016
05:26 AM
Yes, HMS and HS2 have separate log4j.properties files. However, I find it odd that one cluster has the threadname in the log records while the other does not (both CDH5.4.7). The defaults should be exactly the same on both the clusters. Perhaps, you could confirm that you have not overridden the configuration in a safety valve. To add a threadname to the log records for the HMS, Select Hive Service --> Instances --> Hive Metastore Server --> Configuration then type in log4j and look for "Hive Metastore Server Logging Advanced Configuration Snippet (Safety Valve)" This is where I would set it to something like this .. log4j.appender.RFA.layout.ConversionPattern=%d{ISO8601} %-5p [%t]: %c{2} (%F:%M(%L)) - %m%n or just %d{ISO8601} %p [%t]: %c: %m%n the %t is what adds the thread name to the log records. Hope this helps. Thanks
... View more
09-02-2016
11:59 AM
Hey Alina, I have tried this with CDH5.3.10 (a bit newer than your version) and with the new CDH releases, and round seems to be functioning as expected. Connected to: Apache Hive (version 0.13.1-cdh5.3.10) Driver: Hive JDBC (version 0.13.1-cdh5.3.10) Transaction isolation: TRANSACTION_REPEATABLE_READ Beeline version 0.13.1-cdh5.3.10 by Apache Hive 0: jdbc:hive2://localhost:10000/default> show databases; +--------------------------------------------------------------------------------------------------+--+ | database_name | +--------------------------------------------------------------------------------------------------+--+ | cloudera_manager_metastore_canary_test_db_hive_1_hivemetastore_03567ed21d1b892110ff1cd925ae25bd | | default | +--------------------------------------------------------------------------------------------------+--+ 2 rows selected (1.916 seconds) 0: jdbc:hive2://localhost:10000/default> use default; No rows affected (0.127 seconds) 0: jdbc:hive2://localhost:10000/default> show tables; +------------+--+ | tab_name | +------------+--+ | sample_07 | | sample_08 | +------------+--+ 2 rows selected (0.153 seconds) 0: jdbc:hive2://localhost:10000/default> select round((20456079/100000),5); +------------+--+ | _c0 | +------------+--+ | 204.56079 | +------------+--+ 1 row selected (30.771 seconds) 0: jdbc:hive2://localhost:10000/default> select round((20456079/100000),1); +--------+--+ | _c0 | +--------+--+ | 204.6 | +--------+--+ 1 row selected (23.981 seconds) 0: jdbc:hive2://localhost:10000/default> select round((20456079/100000),3); +----------+--+ | _c0 | +----------+--+ | 204.561 | +----------+--+ 1 row selected (23.257 seconds) 0: jdbc:hive2://localhost:10000/default> select round(150,3); +------+--+ | _c0 | +------+--+ | 150 | +------+--+ 1 row selected (22.973 seconds) 0: jdbc:hive2://localhost:10000/default> Against CDH5.8, same results. The big difference between the 2 releases is the time of execution. It consistently take 23-30 seconds on CDH5.3.10 where as it takes about 0.1 seconds on CDH5.8.0. It is possible that my enviroment for CDH5.3.10 is not so kosher. I do not have a CDH5.3.4 environment anymore. But let me know if you would like me to try it with CDH5.3.4. Hope this helps.
... View more
09-02-2016
10:51 AM
If this is from HUE, hue can execute multiple command in a sequence until it reaches the first query that returns results (like a select query). For example, the following should be executed entirely in a single go. drop table if exists foo; create table if not exists foo (code string, description string, salary int); insert into foo select code, description, salary from sample s where s.salary > 50000 and s.salary < 100000; select * from foo where salary < 75000; The following will stop after the select query, so the drop table will not be executed. drop table if exists foo; create table if not exists foo (code string, description string, salary int); insert into foo select code, description, salary from sample_07 s where s.salary > 50000 and s.salary < 100000; select * from foo where salary < 75000; drop table foo; But if you use beeline to execute a file containing multiple select queries, this should work without pausing.
... View more
- « Previous
-
- 1
- 2
- Next »