只是打印set param_name;
hive> set hive.cbo.enable;
hive.cbo.enable=true
或者在查詢:
hive> select ${hiveconf:hive.cbo.enable};
OK
true
Time taken: 1.042 seconds, Fetched: 1 row(s)
更復雜的例子(在的情況下,檢查布爾變量):
hive> select case when ${hiveconf:hive.cbo.enable} then 1 else 0 end;
OK
1
Time taken: 0.041 seconds, Fetched: 1 row(s)
hive>
在shell:
hive_cbo_enable=$(hive -e 'select ${hiveconf:hive.cbo.enable} ;')
echo "$hive_cbo_enable"
真正
所有PARAMS這是真的:
hive -e 'set;' | grep "=true"
datanucleus.fixedDatastore=true
datanucleus.rdbms.useLegacyNativeValueStrategy=true
dfs.block.access.token.enable=true
dfs.client.block.write.replace-datanode-on-failure.enable=true
dfs.client.mmap.enabled=true
dfs.datanode.drop.cache.behind.reads=true
dfs.datanode.drop.cache.behind.writes=true
...
由於一噸..這是我想要的東西:) – sk7979