set hive.metastore.warehouse.dir=/user/myname/hive/warehouse; 用户设定自己的数据仓库目录.不影响其他用户.也在$HOME/.hiverc中设置,则每次启动hive自动加载 hive -(d,ef,H,h,i,p,S,v) 定义变量var,在hql中直接引用${var} set (显示或修改) set; (看所有变量) set env:HOME; set -V; 不加-V打印命名空间 hive --define foo=bar (-d简…
1.基本的线程机制 定义任务 public class LiftOff implements Runnable{ protected int countDown = 10; private static int taskCount = 0; private final int id = taskCount++; public LiftOff(){} public LiftOff(int countDown){ this.countDown = countDown; } public String…
java对于将一个较大作用域的变量“隐藏”的场景会有保护:编译告警.比如: int x = 5; { int x = 6; } 但是对于类中方法的局部变量和类成员变量确是可以重名的,比如 class Test { int x = 4; String s = "hello"; void show() { int x = 5; System.out.println(this.x); System.out.println(x); System.out.println(s); } public…