配置
新建conf/sql-conf.sql
CREATE CATALOG myhive WITH ('type' = 'hive','default-database' = 'default','hive-conf-dir' = '/export/server/hive-2.1.0/conf','hadoop-conf-dir'='/export/server/hadoop2.7/etc/hadoop');-- set the HiveCatalog as the current catalog of the sessionUSE CATALOG myhive;



bin/config.sh 增加 export HADOOP_CLASSPATH=hadoop classpath
启动yarn-session
bin/yarn-session.sh -s 2 -jm 1024 -tm 2048 -nm test1 -d\
启动flink-sql客户端
bin/sql-client.sh embedded -i conf/sql-conf.sql -s yarn-session
切换hive方言
set table.sql-dialect=hive;
session集群关闭
echo “stop” | ./bin/yarn-session.sh -id
