Flinkはハイブの読み取りと書き込みを行い、細部に注意を払います

Linux環境にFLink1.11.1をインストールし、SQLクライアントを起動してHiveデータを読み取ります

まず、公式Webサイトにアクセスして、Flink1.11.1のtgzパッケージをダウンロードします。チュートリアルは、前の記事の前半のプロセスと同じで、構成しますFLINK_HOME/conf/sql-client-defaults.yaml

catalogs:
   - name: myhive   #自己定个名字就行
     type: hive
     hive-conf-dir: /etc/hive/conf  # hive-site.xml的路径
     hive-version: 1.2.1    # hive版本
 execution:
  # select the implementation responsible for planning table programs
  # possible values are 'blink' (used by default) or 'old'
  planner: blink
  # 'batch' or 'streaming' execution
  type: batch  #这里streaming和batch都行
  # allow 'event-time' or only 'processing-time' in sources
  time-characteristic: event-time
  # interval in ms for emitting periodic watermarks
  periodic-watermarks-interval: 200
  # 'changelog' or 'table' presentation of results
  result-mode: table
  # maximum number of maintained rows in 'table' presentation of results
  max-table-

おすすめ

転載: blog.csdn.net/Baron_ND/article/details/109667896