create table ori_trans (account string, maker string, tdate string) partitioned by (country string);

hive  -f test1.hql --hiveconf country='china'

hive  -f test2.hql --hiveconf country='china' --define account=account2 --define maker=yaoxiaohua

hive  -f test2.hql --hiveconf country='japan' --define account=account3 --define maker=yaoyuanyie

 insert overwrite table ori_trans partition(country='${hiveconf:country}')
select
'${account}' as account, '${maker}' as maker, '2012-03-03'
from nums limit 20; hive -f test3.hql --define table_pre=china --define account=account3 --define maker=yaoyuanyie drop table ${table_pre}_ori_trans;
create table ${table_pre}_ori_trans as
select
'${account}' as account, '${maker}' as maker, '2012-03-03'
from nums limit 20; issue1. hive query ‘s job 提交到yarn集群,但是状态一直是accepted,不能进入running.
解决方案:重启DFS服务。
issue2.hadoop yarn如何查看job执行情况?
http://jobtrackerip:8088/
http://jobtrackerip:50070
 

Hive variable demo的更多相关文章

  1. Spark SQL Hive Support Demo

    前提: 1.spark1.0的包编译时指定支持hive:./make-distribution.sh --hadoop 2.3.0-cdh5.0.0 --with-yarn --with-hive - ...

  2. oozie调度hive脚本demo

    1. 环境配置 2. 脚本配置 3. 执行job 4. 查看结果 待发布 ..

  3. 【转】Hive配置文件中配置项的含义详解(收藏版)

    http://www.aboutyun.com/thread-7548-1-1.html 这里面列出了hive几乎所有的配置项,下面问题只是说出了几种配置项目的作用.更多内容,可以查看内容问题导读:1 ...

  4. oozie 运行demo

    昨晚装好了oozie,能启动了,并且配置了mysql作为数据库,好了,今天要执行oozie自带的demo了,好家伙,一执行就报错!报错很多,就不一一列举了,就说我最后解决的方法吧. oozie job ...

  5. Hive配置文件中配置项的含义详解(收藏版)

    这里面列出了hive几乎所有的配置项,下面问题只是说出了几种配置项目的作用.更多内容,可以查看内容 问题导读: 1.hive输出格式的配置项是哪个? 2.hive被各种语言调用如何配置? 3.hive ...

  6. hive 上篇

    hive 是以hadoop为基础的数据仓库,使用HQL查询存放在HDFS上面的数据,HSQL是一种类SQL的语句,最终会被编译成map/reduce,HSQL可以查询HDFS上面的数据:不支持记录级别 ...

  7. Hive分区表创建,增加及删除

    1.创建Hive分区表,按字段分区 CREATE TABLE test1 ( id bigint , create_time timestamp , user_id string) partition ...

  8. hive配置参数的说明:

    hive.ddl.output.format:hive的ddl语句的输出格式,默认是text,纯文本,还有json格式,这个是0.90以后才出的新配置: hive.exec.script.wrappe ...

  9. hive 学习系列二(数据库的创建删除修改) 拿走,不谢。

    database 相当于一个目录或者命名空间,用来更好地进行表的管理 在hdfs 的目录位置大致如下: [root@iZbp12vtv76y9q3d633bh6Z /]# hadoop fs -ls ...

随机推荐

  1. MVC控制器向View视图传值的三种方法

    首先创建一个MVC的项目,其中需要一个控制器(TestController),三个视图(index,edit,detail) 1.项目结构如下:

  2. sql:Oracle11g 表,视图,存储过程结构查询

    -- Oracle 11 G --20160921 涂聚文再次修改 --Geovin Du --GetTables SELECT owner, object_name, created FROM al ...

  3. Interlocked.CompareExchange

    class SourceManager { private SourceManager() { } private static SourceManager sourceManager; public ...

  4. DP---Mahjong tree

    HDU  5379 Problem Description Little sun is an artist. Today he is playing mahjong alone. He suddenl ...

  5. KMP--Cyclic Nacklace

    题目网址:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=110060#problem/D Description CC always be ...

  6. php学习笔记:读取文档的内容,利用php修改文档内容

    直接上代码 <?php /** * Created by PhpStorm. * User: Administrator * Date: 2016/9/10 0010 * Time: 20:27 ...

  7. Jquery_Ajax GET方式传递文本

    第一个网页: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www. ...

  8. 各个平台的mysql重启命令

    linux平台及windows平台mysql重启方法 Linux下重启MySQL的正确方法: 1.通过rpm包安装的MySQL service mysqld restart 2.从源码包安装的MySQ ...

  9. ASP.NET WebAPI 11 参数验证

    在绑定完Action的所有参数后,WebAPI并不会马上执行该方法,而要对参数进行验证,以保证输入的合法性. ModelState 在ApiController中一个ModelState属性用来获取参 ...

  10. c++之函数重载(函数匹配)

    Case void f(); void f(int); void f(int, int); void f(double, double = 3.14); 匹配原则: 1)其形参数量与本次调用提供的实参 ...